com.ibm.pim.interfaces.catalog
Interface Catalog


public interface Catalog

Read-only interface for Catalog object (holder of Items)


Field Summary
static java.lang.String copyright
           
 
Method Summary
 Item createItem()
          Create a new item in the Catalog.
 CatalogHierarchySpecificDetails getCatalogHierarchySpecificDetails(Hierarchy hierarchy)
          Retrieve an object giving access to details specific to the relationship between this Catalog and a specified Hierarchy, for example, location hierarchy information.
 java.lang.String getDisplayName()
          Retrieve the name of this Catalog
 PIMCollection getHierarchies()
          Retrieve all Hierarchies associated with this Catalog
 Item getItemByPrimaryKey(int primaryKey)
          Retrieve an Item within the catalog using the Item's primary key as an int
 Item getItemByPrimaryKey(java.lang.String primaryKey)
          Retrieve an Item within the catalog using the Item's primary key as a String
 PIMCollection getItems()
          Retrieve a collection of all of the Items within this Catalog
 PIMCollection getItemsByCategory(Category category)
          Retrieve a collection of the Items within this Catalog belong to the specified Category
 Hierarchy getPrimaryHierarchy()
          Retrieve the primary Hierarchy associated with this Catalog
 PrimarySpec getPrimarySpec()
          Retrieve the Primary Spec of the Items within this Catalog
 

Field Detail

copyright

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

createItem

public Item createItem()
                throws PIMInternalException,
                       PIMAuthorizationException
Create a new item in the Catalog.

Returns:
the newly created Item object
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user is not allowed to perform this operation

getHierarchies

public PIMCollection getHierarchies()
                             throws PIMInternalException,
                                    PIMAuthorizationException
Retrieve all Hierarchies associated with this Catalog

Returns:
a PIMCollection of Hierarchy objects. Please note this is a lazily instantiated collection
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user is not allowed to perform this operation
See Also:
for more info

getPrimaryHierarchy

public Hierarchy getPrimaryHierarchy()
                              throws PIMInternalException,
                                     PIMAuthorizationException
Retrieve the primary Hierarchy associated with this Catalog

Returns:
the primary Hierarchy object associated with this Catalog
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user is not allowed to perform this operation

getItemByPrimaryKey

public Item getItemByPrimaryKey(java.lang.String primaryKey)
                         throws PIMInternalException,
                                PIMAuthorizationException
Retrieve an Item within the catalog using the Item's primary key as a String

Parameters:
primaryKey - String containing the primary key of the item
Returns:
the Item object with the matching key, or null if there is no Item with this primary key
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user is not allowed to perform this operation

getItemByPrimaryKey

public Item getItemByPrimaryKey(int primaryKey)
                         throws PIMInternalException,
                                PIMAuthorizationException
Retrieve an Item within the catalog using the Item's primary key as an int

Parameters:
primaryKey - primary key of the item to be retrieved, as an integer
Returns:
the Item object with the matching key, or null if there is no Item with this primary key
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user is not allowed to perform this operation

getDisplayName

public java.lang.String getDisplayName()
                                throws PIMInternalException,
                                       PIMAuthorizationException
Retrieve the name of this Catalog

Returns:
the name of this Catalog as a String
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user is not allowed to perform this operation

getPrimarySpec

public PrimarySpec getPrimarySpec()
                           throws PIMInternalException,
                                  PIMAuthorizationException
Retrieve the Primary Spec of the Items within this Catalog

Returns:
The Primary Spec for the Items within this Catalog
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user is not allowed to perform this operation

getItems

public PIMCollection getItems()
                       throws PIMInternalException,
                              PIMAuthorizationException
Retrieve a collection of all of the Items within this Catalog

Returns:
a PIMCollection of Item objects, or an empty PIMCollection if no items exist in this Catalog. Please note this is a lazily instantiated collection
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user is not allowed to perform this operation
See Also:
for more info

getItemsByCategory

public PIMCollection getItemsByCategory(Category category)
                                 throws PIMInternalException,
                                        PIMAuthorizationException
Retrieve a collection of the Items within this Catalog belong to the specified Category

Parameters:
category - The Category for which to retrieve Items
Returns:
a PIMCollection of Item objects, or an empty PIMCollection if no items are associated with this Category in this Catalog. Please note this is a lazily instantiated collection
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user is not allowed to perform this operation
See Also:
for more info

getCatalogHierarchySpecificDetails

public CatalogHierarchySpecificDetails getCatalogHierarchySpecificDetails(Hierarchy hierarchy)
                                                                   throws PIMInternalException,
                                                                          PIMAuthorizationException
Retrieve an object giving access to details specific to the relationship between this Catalog and a specified Hierarchy, for example, location hierarchy information.

Parameters:
hierarchy - the Hierarchy for whose relationship with this Catalog, the specific details will be retrieved
Returns:
a CatalogHierarchySpecificDetails object contain relationship attributes, or null if the specified Hierarchy is not associated with this Catalog.
Throws:
PIMInternalException - If there an internal error occurs or if specific details cannot be retrieved
PIMAuthorizationException - If the user is not allowed to perform this operation