Dresden OCL Toolkit

tudresden.ocl.gui
Interface ConstraintRepresentation

All Known Implementing Classes:
JOCLEditorApp.DefaultOCLEditorModel.DefaultConstraintRepresentation, SimpleOCLEditorModel.SimpleConstraintRepresentation

public interface ConstraintRepresentation

A representation of an individual constraint with name and data.

Author:
sz9

Method Summary
 String getData()
          Get the constraint's body text.
 String getName()
          Get the constraint's name.
 void setData(String sData, EditingUtilities euHelper)
          Set the constraint's body text.
 void setName(String sName, EditingUtilities euHelper)
          Set the constraint's name.
 

Method Detail

getName

public String getName()
Get the constraint's name.


setName

public void setName(String sName,
                    EditingUtilities euHelper)
             throws IllegalStateException,
                    IllegalArgumentException
Set the constraint's name. For the exceptions the detailed message must be human readable.

Parameters:
sName - the new name of the constraint
euHelper - utility that can be used to check for syntactical correctness etc.
Throws:
IllegalStateException - if the constraint is not in a state to accept name changes.
IllegalArgumentException - if the specified name is not a legal name for the constraint.

getData

public String getData()
Get the constraint's body text.


setData

public void setData(String sData,
                    EditingUtilities euHelper)
             throws IllegalStateException,
                    OclParserException,
                    OclTypeException
Set the constraint's body text. For the exceptions the detailed message must be human readable.

Parameters:
sData - the new body of the constraint
euHelper - utility that can be used to check for syntactical correctness etc.
Throws:
IllegalStateException - if the constraint is not in a state to accept body changes.
OclParserException - if the specified constraint is not syntactically correct.
OclTypeException - if the specified constraint does not adhere by OCL type rules.

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.