|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RemoteEntityInterface
RemoteEntityInterface extends the functionality of RemoteBaseEntityInterface. It allows the user to specify customizers and validators for Entities as well as obtaining attribute information.
RemoteBaseEntityInterface
Method Summary | |
---|---|
void |
addAttributeValidator(java.lang.String attributeName,
java.beans.VetoableChangeListener listener)
Set a validator for an attribute. |
void |
clear()
Clear ("unset") all attribute values. |
void |
clearAttribute(java.lang.String attributeName)
Clear ("unset") an individual attribute. |
AttributeDescriptorInterface |
getAttributeDescriptor(java.lang.String attributeName)
Returns an AttributeDescriptor |
AttributeDescriptorInterface[] |
getAttributeDescriptors()
Returns an array of AttributeDescriptors |
AttributeGroupInterface |
getAttributeGroup()
Return a list of attributes and their descriptions. |
AttributeTypeInterface |
getAttributeType(java.lang.String attributeName)
Returns the type of an attribute. |
java.util.Map |
getAttributeValidators()
Return a map of attribute validators. |
AttributeDescriptorInterface[] |
getBooleanSpecifiedAttributeDescriptors(java.util.Map map)
Returns an array of AttributeDescriptors that meet specified boolean attribute criteria. |
java.lang.String |
getCustomizer(java.lang.String context)
Return this object's customizer. |
java.util.List |
getCustomizerContexts()
Returns a list of customizer contexts. |
java.lang.String |
getEntityKey()
Return the Entity's unique key. |
RemoteEntityInterface |
getPrototype()
Get the prototype object from which the Entity inherits dynamic attributes from. |
boolean |
isAllRequiredAttributesAssigned()
Returns true if all attributes, designated as required, have had a value assigned or the attribute has a default value. |
boolean |
isAttributeAssigned(java.lang.String attributeName)
Returns true if an attribute has had a value assigned or the attribute has a default value. |
void |
removeAttributeValidator(java.lang.String attributeName,
java.beans.VetoableChangeListener listener)
Remove a validator for an attribute. |
boolean |
sameEntity(EntityKeyInterface entity)
Test if this Entity's key equals the key of another Entity. |
void |
setCustomizer(java.lang.String context,
java.lang.String customizer)
Set the customizer for a specific context. |
void |
setEntityKey(java.lang.String key)
Assign an entity key to the Entity. |
void |
setPrototype(RemoteEntityInterface prototype)
Set the prototype object from which the Entity inherits dynamic attributes from. |
Methods inherited from interface com.sas.entities.RemoteBaseEntityInterface |
---|
containsAttributeNamed, getAttribute, getAttributes, getStringAttribute, listAttributeNames, removeAllAttributes, removeAttribute, setAttributes |
Methods inherited from interface com.sas.entities.RemoteBaseEntityValueInterface |
---|
getAttribute, setAttribute |
Method Detail |
---|
AttributeGroupInterface getAttributeGroup() throws java.rmi.RemoteException
AttributeGroupInterface
from which you can access
each attribute by name or get them all as an array.
AttributeGroupInterface provides a structured, hierarchical grouping of an Entity's
attributes.
java.rmi.RemoteException
- if there was an IO error communicating with the EntityAttributeTypeInterface getAttributeType(java.lang.String attributeName) throws java.rmi.RemoteException, java.util.NoSuchElementException
attributeName
- attribute name
java.rmi.RemoteException
- if there was an IO error communicating with the Entity
java.util.NoSuchElementException
- if there
is no such value in the Entity
(this is necessary to distinguish between
no such attributeName and a value of null)AttributeTypeInterface
AttributeDescriptorInterface[] getAttributeDescriptors() throws java.rmi.RemoteException
java.rmi.RemoteException
- if there was an IO error communicating with the EntityAttributeDescriptorInterface getAttributeDescriptor(java.lang.String attributeName) throws java.rmi.RemoteException, java.util.NoSuchElementException
java.rmi.RemoteException
- if there was an IO error communicating with the Entity
java.util.NoSuchElementException
- if there
is no such value in this entity
(this is necessary to distinguish between
no such attributeName and a value of null)boolean isAttributeAssigned(java.lang.String attributeName) throws java.rmi.RemoteException, java.util.NoSuchElementException
java.rmi.RemoteException
- if there was an IO error communicating with the Entity
java.util.NoSuchElementException
- if there
is no such value in the Entity
(this is necessary to distinguish between
no such attributeName and a value of null)boolean isAllRequiredAttributesAssigned() throws java.rmi.RemoteException
java.rmi.RemoteException
- if there was an IO error communicating with the Entityvoid clear() throws java.rmi.RemoteException
java.rmi.RemoteException
- if there was an IO error communicating with the Entityvoid clearAttribute(java.lang.String attributeName) throws java.rmi.RemoteException
java.rmi.RemoteException
- if there was an IO error communicating with the Entityvoid addAttributeValidator(java.lang.String attributeName, java.beans.VetoableChangeListener listener) throws java.rmi.RemoteException
setAttribute
stores the new value, the Entity fires a PropertyChangeEvent
to all listeners and one or more listeners may veto the change by
throwing a PropertyVetoException
.
attributeName
- name of the attributelistener
- object that implements VetoableChangeListener
java.rmi.RemoteException
- if there was an IO error communicating with the Entityvoid removeAttributeValidator(java.lang.String attributeName, java.beans.VetoableChangeListener listener) throws java.rmi.RemoteException
java.rmi.RemoteException
- if there was an IO error communicating with the EntityaddAttributeValidator(String, VetoableChangeListener)
java.util.Map getAttributeValidators() throws java.rmi.RemoteException
java.rmi.RemoteException
- if there was an IO error communicating with the EntityRemoteEntityInterface getPrototype() throws java.rmi.RemoteException
java.rmi.RemoteException
- if there was an IO error communicating with the Entityvoid setPrototype(RemoteEntityInterface prototype) throws java.rmi.RemoteException
prototype
- object from which the Entity inherits dynamic attributes from
java.rmi.RemoteException
- if there was an IO error communicating with the Entityjava.lang.String getCustomizer(java.lang.String context) throws java.rmi.RemoteException
context
- the context, such as a Java, COM, or WEB context
java.rmi.RemoteException
- if there was an IO error communicating with the EntityEntityContextInterface
void setCustomizer(java.lang.String context, java.lang.String customizer) throws java.rmi.RemoteException
context
- the context, such as a Java, COM, or WEB contextcustomizer
- the name of the customizer
java.rmi.RemoteException
- if there was an IO error communicating with the EntityEntityContextInterface
java.util.List getCustomizerContexts() throws java.rmi.RemoteException
java.rmi.RemoteException
AttributeDescriptorInterface[] getBooleanSpecifiedAttributeDescriptors(java.util.Map map) throws java.rmi.RemoteException, java.lang.NoSuchMethodException
HashMap map = new HashMap(); map.put(AttributeDescriptorInterface.MODIFIABLE,Boolean.FALSE); map.put(AttributeDescriptorInterface.VISIBLE,Boolean.TRUE); try { RemoteEntity rentity = new RemoteEntity(); AttributeDescriptorInterface[] adi = rentity.getBooleanSpecifiedAttributeDescriptors(map); } catch(NoSuchMethodException e) {}
map
- set of name/value pairs consisting of attribute/value
java.rmi.RemoteException
- if there was an IO error communicating with the Entity
java.lang.NoSuchMethodException
- if method does not exist on the AttributeDescriptorInterface
java.lang.IllegalArgumentException
- if map parameter is empty or a non-boolean value is specified
for the value (name/value pair)AttributeDescriptorInterface
java.lang.String getEntityKey() throws java.rmi.RemoteException
java.rmi.RemoteException
- if there was an IO error communicating with the Entityvoid setEntityKey(java.lang.String key) throws java.rmi.RemoteException, java.lang.IllegalStateException
key
- the key with which the Entity can be identified
java.rmi.RemoteException
- if there was an IO error communicating with the Entity
java.lang.IllegalStateException
- if the Entity already has a non-null key.
Not all Entity implementations are required to throw this exception; some
may allow replacing a non-null key.boolean sameEntity(EntityKeyInterface entity) throws java.rmi.RemoteException
getEntityKey()
. Return false if entity is
null
.
java.rmi.RemoteException
- if there was an IO error communicating with the Entity
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |