com.tensegrity.generic.attribute
Interface Attributable

All Known Subinterfaces:
AttributableOnSet, BaseComposite, Composite, CompositeControl, CompositeGroup, CompositeLabel, CompositeLine, CompositeSwimLane, CompositeSwimLanePool, CompositeTable, CompositeViewGrid, CompositeViewMeasurementObject, CompositeViewRuler, Edge, Graph, GraphObject, Node, PortDenotation, Primitive, Subgraph, VisualEdge, VisualEdgeComposite, VisualGraphObject, VisualGraphObjectComposite, VisualNode, VisualNodeComposite, VisualSubgraph, VisualSubgraphComposite
All Known Implementing Classes:
AbstractPrimitive, AttributableOnSetCollection, AttributableOnSetList, AttributeTreeCategory, EditorStateAttributableOnSet, ElementDefinitionUtil.RenameAttributable, GenericAttributableOnSet, HiddenSlidesAttributableOnSet, LayoutController, TemplateAttributableOnSet

public interface Attributable

This interface marks an object to be attributable.

Notice:
There is no predefinition that a class implementing this interface will work with AttributeSets or with AttributeCollections in general.

Version:
$Id: Attributable.java,v 1.17 2005/04/01 15:40:21 MichaelKegel Exp $
Author:
MichaelKegel
See Also:
Attribute, AttributeSet, AttributeCollection, AttributableOnSet

Method Summary
 Attribute getAttribute(java.lang.String name)
          Returns the attribute with the given name or null if there is no Attribute with the given name.
 AttributeType getAttributeType(java.lang.String name)
          Returns the AttributeType of the attribute with the given name.
 java.lang.Object getAttributeValue(java.lang.String name)
          Return the value of the attribute with the given name.
 void setAttribute(Attribute attribute)
          Sets the value of the attribute with the same name to the value of the given attribute.
 void setAttributeValue(java.lang.String name, java.lang.Object value)
          Sets the value of the attribute with the name to the given value.
 

Method Detail

getAttribute

public Attribute getAttribute(java.lang.String name)
Returns the attribute with the given name or null if there is no Attribute with the given name.

Parameters:
name - name of the attribute to return.
Returns:
the attribute with the given name or null.

setAttribute

public void setAttribute(Attribute attribute)
                  throws IllegalValueException,
                         ConstraintViolationException
Sets the value of the attribute with the same name to the value of the given attribute.
Notice: If the specific implementor of the Attributable interface doesn't support an Attribute with the name of the Attribute given by attribute, the given attribute is not handled by nor added to the attributes of the Attributable.

Parameters:
attribute - the attribute to be set.
Throws:
IllegalValueException - is thrown when the value of the given Attribute is illegal (for instance when it is null).
ConstraintViolationException - is thrown when the value of the given Attribute violates the constraint of the Attribute to set.

getAttributeValue

public java.lang.Object getAttributeValue(java.lang.String name)
Return the value of the attribute with the given name.

Parameters:
name - the name of the attribute to return the value from.
Returns:
the value of the attribute with the given name.

setAttributeValue

public void setAttributeValue(java.lang.String name,
                              java.lang.Object value)
                       throws IllegalValueException,
                              ConstraintViolationException
Sets the value of the attribute with the name to the given value.
Notice: If the specific implementor of the Attributable interface doesn't support an Attribute with the name given by name, the attribute given through name and value is not handled nor created by Attributable.

Parameters:
name - the name of the attribute.
value - the value to set the attributes value to.
Throws:
IllegalValueException - is thrown when the given value is illegal (for instance when it is null).
ConstraintViolationException - is thrown when the given value violates the constraint of the Attribute to set.

getAttributeType

public AttributeType getAttributeType(java.lang.String name)
Returns the AttributeType of the attribute with the given name.

Parameters:
name - the name of the attribute.
Returns:
the attribute type with given name.


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.