com.ibm.ftt.properties
Interface IPropertyGroupContainer


public interface IPropertyGroupContainer

A property group container has property groups. Property group containers are created by a property group manager.

Property groups can be created, deleted, loaded, saved, imported, and exported using this interface. The names of property groups must be unique within a property group container.

The IPropertyGroupContainer.load() method is invoked by a property group manager when the workspace is started. Property group containers can also load property groups when actions that affect them are performed by users. For example, when a user connects to a system, a property group container might load property groups for that system.

The IPropertyGroupContainer.save() method is invoked by a property group manager when the workspace is stopped. Property group containers can also save the property groups in them when actions that affect them are performed by users.

See Also:
IPropertyGroup

Field Summary
static String COPY_RIGHT
           
 
Method Summary
 IPropertyGroup createPropertyGroup(String name, String description)
          Creates a property group with the given name and description, and adds the property group to the container.
 void deletePropertyGroup(IPropertyGroup propertyGroup)
          Removes the given property group from the container.
 void exportAllPropertyGroups(OutputStream output)
          Exports all of the property groups from this container into a file.
 void exportPropertyGroups(List propertyGroups, OutputStream output)
          Exports the given property groups from this container to the given file.
 IPropertyGroupManager getPropertyGroupManager()
          Returns the property group manager the container belongs to.
 List getPropertyGroups()
          Returns the property groups in the container.
 void importPropertyGroups(InputStream input)
          Imports property groups from the given input stream into this container.
 void load()
          Loads all of the property groups in the container from a persistent store.
 void save()
          Saves all of the property groups in the container to a persistent store.
 

Field Detail

COPY_RIGHT

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

getPropertyGroups

List getPropertyGroups()
Returns the property groups in the container.

Returns:
The property groups in the container. The list is an unmodifiable list.

save

void save()
          throws IOException
Saves all of the property groups in the container to a persistent store. This is called when the workspace shuts down.

Throws:
IOException - If an input output error occurs when saving.

load

void load()
Loads all of the property groups in the container from a persistent store. This is called when the workspace starts.


importPropertyGroups

void importPropertyGroups(InputStream input)
                          throws DuplicatePropertyGroupException,
                                 IOException,
                                 UnregisteredCategoryException,
                                 UnregisteredPropertyException,
                                 DuplicateInstanceException
Imports property groups from the given input stream into this container.

Parameters:
input - The input stream to read. It must be open and ready to be read from.

Throws:
DuplicatePropertyGroupException - If there is a property group in the input stream with the same name as one in the container.
IOException - If there is an error reading from the input stream.
UnregisteredCategoryException - If there is a category instance that points to a category that has not been registered with the property group manager.
UnregisteredPropertyException - If there is a property in the file that has not been registered with the property group manager.
DuplicateInstanceException - If there is a category instance in the file that is a duplicate.

exportAllPropertyGroups

void exportAllPropertyGroups(OutputStream output)
                             throws IOException
Exports all of the property groups from this container into a file.

Parameters:
output - The output stream to write the property groups to. The output stream must be open and ready to be written to.

Throws:
IOException - If there is a error writing to the output stream.

exportPropertyGroups

void exportPropertyGroups(List propertyGroups,
                          OutputStream output)
                          throws IOException
Exports the given property groups from this container to the given file.

Parameters:
propertyGroups - A list of property groups from this container to export.
output - An output stream to write the property groups to. The output stream must be open and ready to be written to.

Throws:
IOException - If there is an error writing to the output stream.

createPropertyGroup

IPropertyGroup createPropertyGroup(String name,
                                   String description)
                                   throws DuplicatePropertyGroupException
Creates a property group with the given name and description, and adds the property group to the container.

Parameters:
name - This name must be unique among the property groups belonging to the container.
description - This is optional; you can use it to describe the purpose of the property group.

Returns:
The property group

Throws:
DuplicatePropertyGroupException - If there is already a property group with the same name belonging to the container.

deletePropertyGroup

void deletePropertyGroup(IPropertyGroup propertyGroup)
Removes the given property group from the container.

Parameters:
propertyGroup - The property group to delete

getPropertyGroupManager

IPropertyGroupManager getPropertyGroupManager()
Returns the property group manager the container belongs to.

Returns:
The property group manager