Dresden OCL Toolkit

tudresden.ocl.gui
Class JOCLEditorApp.DefaultOCLEditorModel.DefaultConstraintRepresentation

java.lang.Object
  extended bytudresden.ocl.gui.JOCLEditorApp.DefaultOCLEditorModel.DefaultConstraintRepresentation
All Implemented Interfaces:
ConstraintRepresentation
Enclosing class:
JOCLEditorApp.DefaultOCLEditorModel

public class JOCLEditorApp.DefaultOCLEditorModel.DefaultConstraintRepresentation
extends Object
implements ConstraintRepresentation


Field Summary
private  String m_sData
           
private  String m_sName
           
 
Constructor Summary
JOCLEditorApp.DefaultOCLEditorModel.DefaultConstraintRepresentation(String sName, String sData)
           
 
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_sName

private String m_sName

m_sData

private String m_sData
Constructor Detail

JOCLEditorApp.DefaultOCLEditorModel.DefaultConstraintRepresentation

public JOCLEditorApp.DefaultOCLEditorModel.DefaultConstraintRepresentation(String sName,
                                                                           String sData)
Method Detail

getData

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

Specified by:
getData in interface ConstraintRepresentation

getName

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

Specified by:
getName in interface ConstraintRepresentation

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.

Specified by:
setData in interface ConstraintRepresentation
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.

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.

Specified by:
setName in interface ConstraintRepresentation
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.

Dresden OCL Toolkit

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