|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PropertiedObjectEditor
This interface represents an object that can view and edit properties for a PropertiedObject. It is conceptually a stateless object that requires in all methods the reference to the PropertiedObject.
Field Summary | |
---|---|
static java.lang.Object |
NO_VALUE
The value object that is returned by this interface's methods when there is no value for the specified PropertyDefinition. |
Fields inherited from interface com.metamatrix.common.object.PropertyAccessPolicy |
---|
DEFAULT_READ_ONLY_PRIVILEGE |
Method Summary | |
---|---|
java.util.List |
getAllowedValues(PropertiedObject obj,
PropertyDefinition def)
Get the allowed values for the property on the specified object. |
PropertyAccessPolicy |
getPolicy()
|
java.util.List |
getPropertyDefinitions(PropertiedObject obj)
Obtain the list of PropertyDefinitions that apply to the specified object's type. |
java.lang.Object |
getValue(PropertiedObject obj,
PropertyDefinition def)
Obtain from the specified PropertiedObject the property value that corresponds to the specified PropertyDefinition. |
boolean |
isReadOnly(PropertiedObject obj)
Return whether this editor may be used to set property values on the specified PropertiedObject. |
boolean |
isValidValue(PropertiedObject obj,
PropertyDefinition def,
java.lang.Object value)
Return whether the specified value is considered valid. |
void |
setPolicy(PropertyAccessPolicy policy)
|
void |
setValue(PropertiedObject obj,
PropertyDefinition def,
java.lang.Object value)
Set on the specified PropertiedObject the value defined by the specified PropertyDefinition. |
Methods inherited from interface com.metamatrix.common.object.PropertyAccessPolicy |
---|
isReadOnly, reset, setReadOnly, setReadOnly |
Methods inherited from interface com.metamatrix.common.transaction.UserTransactionFactory |
---|
createReadTransaction, createWriteTransaction, createWriteTransaction |
Field Detail |
---|
static final java.lang.Object NO_VALUE
Method Detail |
---|
java.util.List getPropertyDefinitions(PropertiedObject obj)
obj
- the propertied object for which the PropertyDefinitions are
to be obtained; may not be null
java.lang.AssertionError
- if obj
is nulljava.util.List getAllowedValues(PropertiedObject obj, PropertyDefinition def)
obj
- the propertied object whose property value is to be obtained;
may not be nulldef
- the reference to the PropertyDefinition describing the
property whose value is to be returned; may not be null
#hasAllowedValues
boolean isReadOnly(PropertiedObject obj)
isReadOnly
in interface PropertyAccessPolicy
obj
- the propertied object; may not be null
java.lang.AssertionError
- if obj
is nulljava.lang.Object getValue(PropertiedObject obj, PropertyDefinition def)
obj
- the propertied object whose property value is to be obtained;
may not be nulldef
- the reference to the PropertyDefinition describing the
property whose value is to be returned; may not be null
java.lang.AssertionError
- if either of obj
or def
is nullboolean isValidValue(PropertiedObject obj, PropertyDefinition def, java.lang.Object value)
obj
- the propertied object whose property value is to be validated;
may not be nulldef
- the reference to the PropertyDefinition describing the
property whose value is to be validated; may not be nullvalue
- the proposed value for the property, which must be an object array if
the property is multi-valued, and which may be null if the multiplicity
includes "0"
java.lang.AssertionError
- if either of obj
or def
is null,
or if the property is multi-valued and the value
is not an instance
of Object[].void setValue(PropertiedObject obj, PropertyDefinition def, java.lang.Object value)
obj
- the propertied object whose property value is to be set;
may not be nulldef
- the reference to the PropertyDefinition describing the
property whose value is to be changed; may not be nullvalue
- the proposed value for the property, which must be an object array if
the property is multi-valued, and which may be null if the multiplicity
includes "0"
java.lang.IllegalArgumentException
- if the value does not correspond
to the PropertyDefinition requirements.
java.lang.AssertionError
- if either of obj
or def
is null,
or if the property is multi-valued and the value
is not an instance
of Object[].PropertyAccessPolicy getPolicy()
void setPolicy(PropertyAccessPolicy policy)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |