com.ibm.pim.collaboration
Interface CollaborationItem

All Superinterfaces:
AttributeOwner, CollaborationObject, ExtendedAttributeOwner

public interface CollaborationItem
extends ExtendedAttributeOwner, CollaborationObject

The JAVA API interface CollaborationItem represents an item object that has been checked out to a collaboration area and collaborated upon.

Since:
6.0.0
See Also:
CollaborationItem, Item

Nested Class Summary
static class CollaborationItem.SaveResult
          Describes the Item Status after a Save operation
 
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 addToCategory(Category category)
          Add this item to a category.
 void delete()
          Deletes the item from the Product Information Manager.
 java.util.Collection<Category> getCategories()
          Returns all the categories to which this item belongs.
 java.lang.String getDisplayName()
          Returns the display name.
 java.util.Collection<Hierarchy> getLocationHierarchies()
          Returns all the location hierarchies which are available on this catalog for this item, regardless of whether it has stored any data in them.
 java.lang.String getPrimaryKey()
          Returns the primary key.
 CollaborationItem.SaveResult getSaveResult()
          Returns an enumeration of the net effect of the last save on this item UNKNOWN, ADDED, MODIFIED, DELETED
 Item getSourceItem()
          Get the item in the source catalog corresponding to this checked out item.
 void mapToCategory(Category category)
          Map an item to a category.
 void moveToCategories(java.util.Collection<Category> categories)
          Move item from existing categories to new set of categories.
 void moveToCategoriesWithMapping(java.util.Collection<Category> categories)
          Move item from existing categories to new set of categories and add mappings.
 void removeFromCategory(Category category)
          Remove an item from a category.
 ExtendedValidationErrors save()
          Saves the item.
 void setCategorySpecificAttributeProcessing(boolean setEnabled)
          Set whether or not category specific attributes should be processed for the item Default would be true to process them
 void setPrimaryKey(java.lang.String primaryKey)
          Sets the primary key.
 ExtendedValidationErrors validate()
          Validates the item.
 
Methods inherited from interface com.ibm.pim.attribute.ExtendedAttributeOwner
executeNonPersistedScript, getAttributeChangesComparedTo, getAttributeChangesSinceLastSave, getAvailableLocations, getLocationAttributeInstance, getLocationAttributeValue, getLocationsHavingData, getRootLocationAttributeInstance, isAvailableInLocation, makeAvailableInLocation, makeAvailableInLocationRecursively, makeUnavailableInLocation, makeUnavailableInLocationRecursively, setLocationAttributeValue
 
Methods inherited from interface com.ibm.pim.attribute.AttributeOwner
getAttributeChangesComparedTo, 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

getSourceItem

Item getSourceItem()
Get the item in the source catalog corresponding to this checked out item.

Returns:
the item in the source catalog for this checked out item.
Throws:
PIMInternalException - if an internal error occurs.

addToCategory

void addToCategory(Category category)
Add this item to a category.

Parameters:
category - Must be one which belongs to a hierarchy contained by the catalog which contains the item, and must not be null.

If the item was already mapped to the category then no change will take place.

Throws:
java.lang.IllegalArgumentException - if the argument is null.
PIMInternalException - if an internal error occurs.
PIMAuthorizationException - if the current user does not have the equivalent of Permission.HIERARCHY_MODIFY_HIERARCHY_NODE_ATTRIBUTES.

delete

void delete()
Deletes the item from the Product Information Manager.

Throws:
PIMInternalException - If an internal error occurs.

getCategories

java.util.Collection<Category> getCategories()
Returns all the categories to which this item belongs.

Returns:
The Collection of Category to which this item belongs. If the item does not belong to any categories (in other words, it is unassigned), then an empty Collection is returned.
Throws:
PIMInternalException - If an internal error occurs.

getDisplayName

java.lang.String getDisplayName()
Returns the display name.

Returns:
The display name. If there is no display name set on this item then the primary key is returned.
Throws:
PIMInternalException - If an internal error occurs.

getLocationHierarchies

java.util.Collection<Hierarchy> getLocationHierarchies()
Returns all the location hierarchies which are available on this catalog for this item, regardless of whether it has stored any data in them.

Returns:
A Collection of Hierarchy
Throws:
PIMInternalException - If an internal error occurs.

getPrimaryKey

java.lang.String getPrimaryKey()
Returns the primary key.

Returns:
The primary key

getSaveResult

CollaborationItem.SaveResult getSaveResult()
Returns an enumeration of the net effect of the last save on this item UNKNOWN, ADDED, MODIFIED, DELETED

Returns:
a SaveResult enumeration
Throws:
PIMInternalException - If an internal error occurs.

validate

ExtendedValidationErrors validate()
Validates the item.

Returns:
An ExtendedValidationErrors 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.

mapToCategory

void mapToCategory(Category category)
                   throws PIMInvalidOperationException
Map an item to a category.

Parameters:
category - The category to map the item to.
Throws:
PIMInternalException - If an internal error occurs
PIMInvalidOperationException - If map is not allowed by category

moveToCategories

void moveToCategories(java.util.Collection<Category> categories)
Move item from existing categories to new set of categories.

Parameters:
categories - new collection of categories to move the item to.
Throws:
PIMInternalException - If an internal error occurs

moveToCategoriesWithMapping

void moveToCategoriesWithMapping(java.util.Collection<Category> categories)
Move item from existing categories to new set of categories and add mappings.

Parameters:
categories - collection of categories to move the item to.
Throws:
PIMInternalException - If an internal error occurs

removeFromCategory

void removeFromCategory(Category category)
Remove an item from a category.

Parameters:
category - There will be no effect if the item does not belong to the given category.
Throws:
PIMInternalException - If an internal error occurs

save

ExtendedValidationErrors save()
Saves the item. This must be done for any changes to the item to take effect.

Returns:
An ExtendedValidationErrors 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.

setCategorySpecificAttributeProcessing

void setCategorySpecificAttributeProcessing(boolean setEnabled)
Set whether or not category specific attributes should be processed for the item Default would be true to process them

Parameters:
setEnabled - to process them (default) or false to ignore processing them
Throws:
PIMInternalException - If an internal error occurs.

setPrimaryKey

void setPrimaryKey(java.lang.String primaryKey)
Sets the primary key.

Parameters:
primaryKey - The primary key
Throws:
PIMInternalException - If an internal error occurs.