|
|||||||||||
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 componentpublic 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 componentMethod Detail |
public GenericAttribute getAttribute(java.lang.Object key)
getAttribute
in interface ComponentFacet
key
- The key of the attribute
public boolean hasAttribute(java.lang.Object id)
hasAttribute
in interface ComponentFacet
id
- The key of the attribute to check
public java.util.Hashtable getProperties()
getProperties
in interface ComponentFacet
public boolean addAttribute(GenericAttribute attr)
addAttribute
in interface ComponentFacet
attr
- The attribute to add
public java.lang.String toString()
public boolean isEnabled()
isEnabled
in interface ComponentFacet
public void setEnabled(boolean enabled)
setEnabled
in interface ComponentFacet
enabled
- public boolean match(java.util.Hashtable properties)
public boolean construct()
ComponentFacet
construct
in interface ComponentFacet
public void destroy()
ComponentFacet
destroy
in interface ComponentFacet
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |