com.ibm.ftt.properties.util
Class AbstractCategoryInstance

java.lang.Object
  extended by com.ibm.ftt.properties.util.AbstractCategoryInstance
All Implemented Interfaces:
ICategoryInstance

public abstract class AbstractCategoryInstance
extends Object
implements ICategoryInstance

Implementation of part of the ICategoryInstance interface. You can subclass this class to provide your own implementation.


Field Summary
static String COPY_RIGHT
           
 
Constructor Summary
AbstractCategoryInstance(ICategory category)
           
 
Method Summary
 ICategoryInstance copy()
           
 boolean equals(Object object)
           
 ICategory getCategory()
          Returns the category that defines this instance.
abstract  String getName()
          The name of this instance.
 List getProperties()
          Returns all of the properties for this category instance.
 List getPropertyGroups()
          Returns the property groups this category instance belongs to.
 String getValue(String name)
          Convenience method for returning the value of a property belonging to this category instance.
abstract  void setName(String name)
          Sets the name of this instance.
abstract  void setValue(String name, String value)
          Sets the value of a property belonging to the category instance.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COPY_RIGHT

public static final String COPY_RIGHT
See Also:
Constant Field Values
Constructor Detail

AbstractCategoryInstance

public AbstractCategoryInstance(ICategory category)
Method Detail

getCategory

public ICategory getCategory()
Description copied from interface: ICategoryInstance
Returns the category that defines this instance.

Specified by:
getCategory in interface ICategoryInstance
Returns:
The category that defines this instance.

getName

public abstract String getName()
Description copied from interface: ICategoryInstance
The name of this instance. The name is unique among all of the instances of a category.

Specified by:
getName in interface ICategoryInstance
Returns:
The instance name.

getProperties

public List getProperties()
Description copied from interface: ICategoryInstance
Returns all of the properties for this category instance.

Specified by:
getProperties in interface ICategoryInstance
Returns:
The properties belonging to this category instance. The returned list is unmodifiable.

getPropertyGroups

public List getPropertyGroups()
Description copied from interface: ICategoryInstance
Returns the property groups this category instance belongs to.

Specified by:
getPropertyGroups in interface ICategoryInstance
Returns:
The property groups this category instance belongs to. The returned list is an unmodifiable list.

getValue

public String getValue(String name)
                throws UnregisteredPropertyException
Description copied from interface: ICategoryInstance
Convenience method for returning the value of a property belonging to this category instance. This method returns null if there is no property value for the given property.

Specified by:
getValue in interface ICategoryInstance
Parameters:
name - The name of the property

Returns:
The value of the property.

Throws:
UnregisteredPropertyException - If the name given name is not the name of a property belonging to this instance.

setName

public abstract void setName(String name)
                      throws DuplicateInstanceException
Description copied from interface: ICategoryInstance
Sets the name of this instance.

Specified by:
setName in interface ICategoryInstance
Parameters:
name - The instance name. The name must be unique among all of the instances of a category.

Throws:
DuplicateInstanceException - If the name is the name of an existing instance.

setValue

public abstract void setValue(String name,
                              String value)
                       throws UnregisteredPropertyException
Description copied from interface: ICategoryInstance
Sets the value of a property belonging to the category instance.

Specified by:
setValue in interface ICategoryInstance
Parameters:
name - The name of the property
value - The value for the property.

Throws:
UnregisteredPropertyException - If the given name is not the name of a property belonging to this instance.

copy

public ICategoryInstance copy()

equals

public boolean equals(Object object)
Overrides:
equals in class Object