|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.UCL.satin.arch.components.Component
The SATIN component generalisation
| Field Summary | |
protected boolean |
immutable
|
protected java.util.Hashtable |
properties
|
| Fields inherited from interface edu.UCL.satin.arch.facets.ComponentFacet |
DISABLED, ENABLED |
| Constructor Summary | |
Component(java.lang.Object id)
Creates a new changeable component |
|
Component(java.lang.Object id,
boolean immutable,
java.util.Hashtable properties)
Creates a new component with the given identifier. |
|
| Method Summary | |
boolean |
addAttribute(GenericAttribute attr)
Adds a new attribute to this component if it is not immutable |
boolean |
construct()
The component constructor. |
void |
destroy()
Destroys the component. |
GenericAttribute |
getAttribute(java.lang.Object key)
Returns the attribute matching the given key. |
java.util.Hashtable |
getProperties()
Returns a hashtable of all component attributes |
boolean |
hasAttribute(java.lang.Object id)
Checks whether this component has the given attribute |
boolean |
isEnabled()
Returns whether this component is enabled/active or not. |
boolean |
match(java.util.Hashtable properties)
Checks whether this component satisfies the attributes given |
void |
setEnabled(boolean enabled)
Activates or deactivates this component (if applicable). |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected java.util.Hashtable properties
protected final boolean immutable
| Constructor Detail |
public Component(java.lang.Object id)
id - the identifier of the component
public Component(java.lang.Object id,
boolean immutable,
java.util.Hashtable properties)
id - the identifier of the componentimmutable - whether or not the component is immutable. An immutable component cannot be reflective and cannot have any new attributes.properties - the properties of this component| Method Detail |
public GenericAttribute getAttribute(java.lang.Object key)
getAttribute in interface ComponentFacetkey - The key of the attribute
public boolean hasAttribute(java.lang.Object id)
hasAttribute in interface ComponentFacetid - The key of the attribute to check
public java.util.Hashtable getProperties()
getProperties in interface ComponentFacetpublic boolean addAttribute(GenericAttribute attr)
addAttribute in interface ComponentFacetattr - The attribute to add
public java.lang.String toString()
public boolean isEnabled()
isEnabled in interface ComponentFacetpublic void setEnabled(boolean enabled)
setEnabled in interface ComponentFacetenabled - public boolean match(java.util.Hashtable properties)
public boolean construct()
ComponentFacet
construct in interface ComponentFacetpublic void destroy()
ComponentFacet
destroy in interface ComponentFacet
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||