com.ibm.ftt.properties.util
Class AbstractPropertyGroup

java.lang.Object
  extended by com.ibm.ftt.properties.util.AbstractPropertyGroup
All Implemented Interfaces:
IPropertyGroup

public abstract class AbstractPropertyGroup
extends Object
implements IPropertyGroup

This class is a partial implementation of the IPropertyGroup interface. You can subclass this class to provide your own implementation.


Field Summary
static String COPY_RIGHT
           
 
Method Summary
abstract  void addCategoryInstance(ICategoryInstance instance)
          Adds the category instance to the property group.
abstract  IPropertyGroup copy(String name)
          Makes a copy of the property group and returns it.
 void deleteCategoryInstance(ICategoryInstance instance)
          Removes the category instance from the property group.
 boolean equals(Object object)
           
 List<ICategoryInstance> getCategoryInstances()
          Returns the category instances for the property group.
 String getDescription()
          Returns the description for the property group; it may be null.
 String getName()
          Returns the property group name.
abstract  IPropertyGroupContainer getPropertyGroupContainer()
          Returns the property group container the property group belongs to.
 void setDescription(String description)
          Sets the description for the property group.
abstract  void setName(String name)
          The name must be unique among the property groups in a property group container.
 

Field Detail

COPY_RIGHT

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

addCategoryInstance

public abstract void addCategoryInstance(ICategoryInstance instance)
                                  throws DuplicateInstanceException
Description copied from interface: IPropertyGroup
Adds the category instance to the property group.

Specified by:
addCategoryInstance in interface IPropertyGroup
Parameters:
instance - The category instance to add.

Throws:
DuplicateInstanceException - If the instance already belongs to the property group, or if adding the instance violates a constraint for the particular implementation of this property group.

copy

public abstract IPropertyGroup copy(String name)
                             throws UnsupportedOperationException,
                                    DuplicatePropertyGroupException
Description copied from interface: IPropertyGroup
Makes a copy of the property group and returns it. If instances is true, the category instances are copied and the copies are used in the returned property group. If instances is false, the category instances are not copied; the existing category instances are used in the returned property group.

Specified by:
copy in interface IPropertyGroup
Parameters:
name - The name of the copy of the property group

Returns:
The copy of the property group
Throws:
UnsupportedOperationException
DuplicatePropertyGroupException

deleteCategoryInstance

public void deleteCategoryInstance(ICategoryInstance instance)
Description copied from interface: IPropertyGroup
Removes the category instance from the property group.

Specified by:
deleteCategoryInstance in interface IPropertyGroup
Parameters:
instance - The category instance to remove.

getCategoryInstances

public List<ICategoryInstance> getCategoryInstances()
Description copied from interface: IPropertyGroup
Returns the category instances for the property group.

Specified by:
getCategoryInstances in interface IPropertyGroup
Returns:
The category instances for the property group. The returned list is an unmodifiable list.

getDescription

public String getDescription()
Description copied from interface: IPropertyGroup
Returns the description for the property group; it may be null.

Specified by:
getDescription in interface IPropertyGroup
Returns:
The description for the property group.

getName

public String getName()
Description copied from interface: IPropertyGroup
Returns the property group name.

Specified by:
getName in interface IPropertyGroup
Returns:
The name of the property group.

getPropertyGroupContainer

public abstract IPropertyGroupContainer getPropertyGroupContainer()
Description copied from interface: IPropertyGroup
Returns the property group container the property group belongs to.

Specified by:
getPropertyGroupContainer in interface IPropertyGroup
Returns:
The property group container this property group belongs to.

setDescription

public void setDescription(String description)
Description copied from interface: IPropertyGroup
Sets the description for the property group.

Specified by:
setDescription in interface IPropertyGroup
Parameters:
description - The description can be used to identify the purpose for a property group.

setName

public abstract void setName(String name)
                      throws DuplicatePropertyGroupException
Description copied from interface: IPropertyGroup
The name must be unique among the property groups in a property group container. Use this method to rename a property group.

Specified by:
setName in interface IPropertyGroup
Parameters:
name - Must be unique among the property groups in a property group container.

Throws:
DuplicatePropertyGroupException - If the given name is the name of a property group in the property group container.

equals

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