|
IBM Rational Software Modeler Release 6.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Allows working with properties and registering listeners when the properties change.
The IDataModel interface is not intended to be implemented by clients.
| Field Summary | |
static Object |
NULL
The property that represents a null value. |
| Method Summary | |
void |
addDataModelListener(IDataModelListener theListener)
Adds the model listener that is notified when the model changes. |
boolean |
containsProperty(String theName)
Checks if the model contains a property with the specified name. |
Object |
getProperty(String theName)
Retrieves the property with the specified name. |
Boolean |
getPropertyAsBoolean(String theName)
Retrieves the property with the specified name as a Boolean.
|
Integer |
getPropertyAsInteger(String theName)
Retrieves a property with the specified name as an Integer.
|
String |
getPropertyAsString(String theName)
Retrieves the property with the specified name as a String. |
void |
registerValidator(String theName,
IPropertyValidator dataModelValidator)
Indicate to the data model that the custom validator specified should be used for validating the property. |
void |
removeDataModelListener(IDataModelListener theListener)
Removes a model listener. |
void |
removeProperty(String theName)
Removes the property with the specified name and its corresponding value from this list of properties. |
void |
setProperty(String theName,
boolean theValue)
Sets the property with the specified name to the specified boolean value. |
void |
setProperty(String theName,
int theValue)
Sets a property with the specified name to the specified int
value. |
void |
setProperty(String theName,
Object theValue)
Set a property with the specified name to the specified value. |
void |
unregisterValidator(String theName)
Remove the registered validator if one exists for the property with the specified name from the data model. |
IStatus |
validateAll(IProgressMonitor progressMonitor)
Validates the properties of the data model to determine if it is in an acceptable state. |
IStatus |
validateProperty(String theName,
IProgressMonitor progressMonitor)
Validate the property to determine if the property with the specified name is in an acceptable state. |
| Field Detail |
public static final Object NULL
null value.
| Method Detail |
public void addDataModelListener(IDataModelListener theListener)
throws IllegalArgumentException
The method does not add the listener if the listener is already registered.
theListener - The listener to register.
IllegalArgumentException - Thrown if theListener is null.
public void removeDataModelListener(IDataModelListener theListener)
throws IllegalArgumentException
The method cannot remove the listener, if the listener was not
registered. Use the addDataModelListener
method to register a new model listener.
theListener - The listener to remove.
IllegalArgumentException - Thrown if theListener is null.
public boolean containsProperty(String theName)
throws IllegalArgumentException
theName - The name of the property contained in the model.
true, if the model contains a
property with the specified name; otherwise, it returns a value
of false.
IllegalArgumentException - Thrown if theName is not a valid argument to
the method.
public Object getProperty(String theName)
throws IllegalArgumentException
theName - The name of the property to retrieve from the model.
null
if the model does not contain the property.
IllegalArgumentException - Thrown if theName is not a valid argument to
the method.
public String getPropertyAsString(String theName)
throws IllegalArgumentException
String.
theName - The name of the property to retrieve from the model.
null
if the model does not contain the property.
IllegalArgumentException - Thrown if theName is not a valid argument to
the method.
public Boolean getPropertyAsBoolean(String theName)
throws IllegalArgumentException
Boolean.
The Boolean that is returned has a value of
true if the string argument is not null and
is equal to the string "true".
Example: Boolean.valueOf("True") returns true.
Example: Boolean.valueOf("yes") returns false.
theName - The name of the property to retrieve from the model.
Boolean or null if the model does
not contain the property.
IllegalArgumentException - Thrown if theName is null.
public Integer getPropertyAsInteger(String theName)
throws IllegalArgumentException
Integer.
The value is interpreted as representing a signed decimal integer as if
the argument was given to the
java.lang.Boolean#parseInt(java.lang.String) method. The result is an
Integer object that represents the integer value specified
by the value.
Integer object equal to the value
of:
new Integer(Integer.parseInt(s))
theName - The name of the parameter to retrieve from the model.
Integer or null if the model does
not contain the property.
IllegalArgumentException - Thrown when theName is null.
public void setProperty(String theName,
boolean theValue)
throws IllegalArgumentException
boolean value.
theName - The name for the property.theValue - The boolean value for the property.
IllegalArgumentException - Thrown when theName or theValue
is null.
public void setProperty(String theName,
int theValue)
throws IllegalArgumentException
int
value.
theName - The name for the property.theValue - The int value for the property.
IllegalArgumentException - Thrown if theName or theValue
is null.
public void setProperty(String theName,
Object theValue)
throws IllegalArgumentException
theName - The name for the property.theValue - The value for the property.
IllegalArgumentException - Thrown if theName or theValue
is null.
public void removeProperty(String theName)
throws IllegalArgumentException
theName - The name of the property to remove.
IllegalArgumentException - Thrown if theName is null.
public void registerValidator(String theName,
IPropertyValidator dataModelValidator)
throws IllegalArgumentException
theName - the name of the property to validate.dataModelValidator - the custom validator that should be used for validating the
property.
IllegalArgumentException - if propertyName or
dataModelValidator is not a valid argument to
the method.
public void unregisterValidator(String theName)
throws IllegalArgumentException
theName - the name of the property whose registered validator is to be
removed.
IllegalArgumentException - if propertyName or
dataModelValidator is not a valid argument to
the method.
public IStatus validateProperty(String theName,
IProgressMonitor progressMonitor)
throws IllegalArgumentException
theName - the name of the property to validateprogressMonitor - to monitor progress of the validate operation. This can be
null if necessary
IStatus the status object that holds the status
code and any messages
IllegalArgumentException - if theName is not a valid argument to the
method.public IStatus validateAll(IProgressMonitor progressMonitor)
progressMonitor - to monitor progress of validate data model operation. This can
be null if necessary.
IStatus that holds the status code and status
messages if any
|
IBM Rational Software Modeler Release 6.0 |
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp. and others 2004. All rights reserved.