com.ibm.pim.selection
Interface SelectionManager

All Superinterfaces:
Manager

public interface SelectionManager
extends Manager

Manager for Selection objects

Since:
6.0.0

Field Summary
static java.lang.String copyright
           
 
Method Summary
 DynamicCollaborationItemSelection createDynamicCollaborationItemSelection(java.lang.String selectionName, java.lang.String query)
          Creates a DynamicCollaborationItemSelection.
 DynamicItemSelection createDynamicItemSelection(java.lang.String selectionName, java.lang.String query)
          Creates a DynamicItemSelection.
 StaticItemSelection createStaticItemSelection(Catalog catalog, Hierarchy hierarchy, java.lang.String selectionName)
          Creates a StaticItemSelection.
 Selection getSelection(java.lang.String selectionName)
          Fetches the selection with the given selectionName
 java.util.Collection<Selection> getSelections()
          Fetches all Selection objects in this company, for which the user has the permission Permission.SELECTION_LIST.
 java.util.Collection<Selection> getSelections(Catalog catalog)
          Fetches all Selection objects defined for this catalog, for which the user has the permission Permission.SELECTION_LIST.
 
Methods inherited from interface com.ibm.pim.common.Manager
getManagerName
 

Field Detail

copyright

static final java.lang.String copyright
See Also:
Constant Field Values
Method Detail

createStaticItemSelection

StaticItemSelection createStaticItemSelection(Catalog catalog,
                                              Hierarchy hierarchy,
                                              java.lang.String selectionName)
Creates a StaticItemSelection. The given hierarchy is set as the hierarchy for use with the Static selection. The access control group for the catalog is set as the access control group for the selection. The selection is persisted when Selection.save() is invoked on it.

Parameters:
catalog - The catalog object whose items the selection will contain
hierarchy - The hierarchy object to be used with this selection. Categories from this hierarchy can be added
to the selection that gets created. When a category is added to a selection, the items present in
that category shall be returned when the user invokes getItems() on the selection.
A PIMInternalException will be thrown if the specified hierarchy is not a primary or secondary
hierarchy for the given catalog.
selectionName - The name of the selection
Returns:
a StaticItemSelection object
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the current user does not have the equivalent of Permission.CATALOG_VIEW_ITEMS or Permission.SELECTION_MEMBERS_VIEW_ITEMS
java.lang.IllegalArgumentException - If catalog is null or hierarchy is null or selectionName is empty.
java.lang.IllegalStateException - If the catalog has not been persisted or the hierarchy has not been persisted.

createDynamicItemSelection

DynamicItemSelection createDynamicItemSelection(java.lang.String selectionName,
                                                java.lang.String query)
Creates a DynamicItemSelection. The access control group of the catalog which is used in the query, is used as the access control group for the selection. The selection is persisted when Selection.save() is invoked on it.

Parameters:
selectionName - The name of the selection
query - The query that will be executed to fetch items in this selection.
Returns:
a DynamicItemSelection Object
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the current user does not have the equivalent of Permission.CATALOG_VIEW_ITEMS or Permission.SELECTION_MEMBERS_VIEW_ITEMS
java.lang.IllegalArgumentException - If the selectionName is empty or query is empty

createDynamicCollaborationItemSelection

DynamicCollaborationItemSelection createDynamicCollaborationItemSelection(java.lang.String selectionName,
                                                                          java.lang.String query)
Creates a DynamicCollaborationItemSelection. The access control group of the CollaborationItem which is used in the query, is used as the access control group for the selection. The selection is persisted when Selection.save() is invoked on it.

Parameters:
selectionName - The name of the selection
query - The query that will be executed to fetch items in this selection.
Returns:
a DynamicItemSelection Object
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use.
java.lang.IllegalArgumentException - If the selectionName is empty or query is empty

getSelections

java.util.Collection<Selection> getSelections(Catalog catalog)
Fetches all Selection objects defined for this catalog, for which the user has the permission Permission.SELECTION_LIST. Both static and dynamic selections are returned.

Parameters:
catalog - The catalog object for which the associated selections has to be fetched.
Returns:
a Collection of Selection objects. Returns an empty Collection if there are no selections defined on items of this catalog.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use.
java.lang.IllegalArgumentException - If the catalog is null.
java.lang.IllegalStateException - If the catalog has not been persisted.

getSelections

java.util.Collection<Selection> getSelections()
Fetches all Selection objects in this company, for which the user has the permission Permission.SELECTION_LIST.

Returns:
a Collection of Selection objects. Returns an empty Collection if there are no selections defined in this company.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use.

getSelection

Selection getSelection(java.lang.String selectionName)
Fetches the selection with the given selectionName

Parameters:
selectionName - The name of the selection
Returns:
a Selection object. Returns null if a selection with the given selectionName does not exist.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the current user does not have the equivalent of Permission.SELECTION_LIST
java.lang.IllegalArgumentException - If selectionName is empty.