com.ibm.pim.collaboration
Interface CollaborationCategory

All Superinterfaces:
AttributeOwner, CollaborationObject

public interface CollaborationCategory
extends AttributeOwner, CollaborationObject

The JAVA API interface CollaborationCategory represents a category object that has been checked out to a collaboration area and collaborated upon.
Save method on the containing collaboration area object must be called to persist any modifications on the collaboration category to the database.

Please note that the root category for a category collaboration has the same name as the collaboration area. Therefore, the full paths of the collaboration categories begin with the collaboration area name.

See Also:
CategoryCollaborationArea, Category

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.ibm.pim.collaboration.CollaborationObject
CollaborationObject.Type
 
Field Summary
 
Fields inherited from interface com.ibm.pim.attribute.AttributeOwner
copyright
 
Fields inherited from interface com.ibm.pim.collaboration.CollaborationObject
copyright
 
Method Summary
 void addChild(CollaborationCategory childCategory)
          Adds a category as a child of this category.
 void delete()
          Deletes the given category.
 java.util.Collection<CollaborationCategory> getChildren()
          Returns the categories immediately below this category.
 java.util.Collection<CollaborationCategory> getChildren(Catalog catalog, boolean ordered, boolean restrictToSubtreeWithItems)
          Returns the categories immediately below this category.
 PIMCollection<CollaborationCategory> getDescendents()
          Returns all the descendants of this category.
 java.lang.String getDisplayName()
          Returns the name of this Category object
 java.util.Collection<java.lang.String> getFullPaths(boolean includeRootName)
          Returns the full name paths of this Category.
 java.util.Collection<java.lang.String> getFullPaths(java.lang.String delimiter, boolean includeRootName)
          Returns the full name paths of this Category.
 int[] getLevels()
          Returns the levels of this category in an array of Integers.
 CollaborationCategory getParent()
          Returns this category's parent.
 java.util.Collection<CollaborationCategory> getParents()
          Returns the parent categories of the given Category.
 java.lang.String getPrimaryKey()
          Return the primary key of this Category
 java.util.Collection<SecondarySpec> getSecondarySpecs()
          Returns the secondary specs defining this category’s attributes.
 Category getSourceCategory()
           
 boolean hasChildren()
          Determines if the given category has any children.
 boolean isRoot()
          Identifies whether this Category is the root Category of the Hierarchy it lives within
 void removeChild(CollaborationCategory childCategory)
          Remove the given child Category from this category's children.
 void removeSecondarySpec(SecondarySpec spec)
          Disassociates a secondary spec defining this category’s attributes.
 ValidationErrors validate()
          Validates the category.
 
Methods inherited from interface com.ibm.pim.attribute.AttributeOwner
getAttributeChangesComparedTo, getAttributeChangesSinceLastSave, getAttributeInstance, getAttributeValue, getOriginalAttributeOwner, getRootAttributeInstance, getRootAttributeInstances, getSpecs, isComparable, setAttributeValue
 
Methods inherited from interface com.ibm.pim.collaboration.CollaborationObject
getCollaborationArea, getCollaborationHistory, getCollaborationHistory, getEntranceDate, getLatestComment, getSteps, getType, isReserved, isReserved
 

Method Detail

getSourceCategory

Category getSourceCategory()
Returns:
the category in the source hierarchy for this checked out category

addChild

void addChild(CollaborationCategory childCategory)
Adds a category as a child of this category. No error is returned if the category already exists as a child.

Parameters:
childCategory - the category to be added as a child
Throws:
PIMInternalException - If an internal error occurs

delete

void delete()
Deletes the given category. Save method on the containing Hierarchy object must be called to persist this deletion to the database.

Throws:
PIMInternalException - If an internal error occurs
java.lang.UnsupportedOperationException - if this is a root category

getChildren

java.util.Collection<CollaborationCategory> getChildren()
Returns the categories immediately below this category.

Returns:
a Collection of Category objects.
Throws:
PIMInternalException - If an internal error occurs

getChildren

java.util.Collection<CollaborationCategory> getChildren(Catalog catalog,
                                                        boolean ordered,
                                                        boolean restrictToSubtreeWithItems)
Returns the categories immediately below this category.

Parameters:
catalog - the catalog to use
ordered - If true and if the catalog supports ordering, then return the child categories in catalog order.
restrictToSubtreeWithItems - If true, only return categories that have items in their sub-trees.
Returns:
a Collection of Category objects.
Throws:
PIMInternalException - If an internal error occurs

getDescendents

PIMCollection<CollaborationCategory> getDescendents()
Returns all the descendants of this category.

Returns:
a PIMCollection of Category objects. Please note this is a lazily instantiated collection
Throws:
PIMInternalException - If an internal error occurs

getFullPaths

java.util.Collection<java.lang.String> getFullPaths(boolean includeRootName)
Returns the full name paths of this Category.

Parameters:
includeRootName - If true, the returned full paths include the root category name.
Returns:
List of paths
Throws:
PIMInternalException - If an internal error occurs

getFullPaths

java.util.Collection<java.lang.String> getFullPaths(java.lang.String delimiter,
                                                    boolean includeRootName)
Returns the full name paths of this Category.

Parameters:
delimiter - The delimiter to be used in the full paths that are returned.
includeRootName - If true, the returned full paths include the root category name.
Returns:
Collection of paths for this Category
Throws:
PIMInternalException - If an internal error occurs

getLevels

int[] getLevels()
Returns the levels of this category in an array of Integers.

Returns:
List of levels
Throws:
PIMInternalException - If an internal error occurs

getParent

CollaborationCategory getParent()
Returns this category's parent. If there are multiple parents, only the first one is returned.

Returns:
the parent Category
Throws:
PIMInternalException - If an internal error occurs

getParents

java.util.Collection<CollaborationCategory> getParents()
Returns the parent categories of the given Category.

Returns:
a collection of all parent categories
Throws:
PIMInternalException - If an internal error occurs

getSecondarySpecs

java.util.Collection<SecondarySpec> getSecondarySpecs()
Returns the secondary specs defining this category’s attributes.

Returns:
Collection of Spec objects.
Throws:
PIMInternalException - If an internal error occurs

hasChildren

boolean hasChildren()
Determines if the given category has any children.

Returns:
Returns true if the category has any children.
Throws:
PIMInternalException - If an internal error occurs

validate

ValidationErrors validate()
Validates the category.

Returns:
A ValidationErrors object containing the list of validation errors for this item or null if no validation errors were found.
Throws:
PIMInternalException - If an internal error occurs.

removeChild

void removeChild(CollaborationCategory childCategory)
Remove the given child Category from this category's children. However, orphaned categories are not supported. That means, the child should have more than one one parent before a child can be removed from a parent category.

Parameters:
childCategory - the child category to remove.
Throws:
PIMInternalException - If an internal error occurs

removeSecondarySpec

void removeSecondarySpec(SecondarySpec spec)
Disassociates a secondary spec defining this category’s attributes.

Parameters:
spec - the secondary spec to be disassociated
Throws:
PIMInternalException - If an internal error occurs

getDisplayName

java.lang.String getDisplayName()
Returns the name of this Category object

Returns:
The name of the Category object as a String
Throws:
PIMInternalException - if an internal error occurs

isRoot

boolean isRoot()
Identifies whether this Category is the root Category of the Hierarchy it lives within

Returns:
true if this Category is the root category of its Hierarchy, otherwise false
Throws:
PIMInternalException - if an internal error occurs

getPrimaryKey

java.lang.String getPrimaryKey()
Return the primary key of this Category

Returns:
The primary key for this Category represented as a String
Throws:
PIMInternalException - if an internal error occurs