com.ibm.pim.hierarchy
Interface HierarchyMap


public interface HierarchyMap

Mapping can be established between categories belonging to two hierarchies. This interface provides access to the mapping between two hierarchies. The existing mappings can be inspected and manipulated as well as new mapping can be added using the methods in this interface.

Since:
6.0.0
See Also:
HierarchyManager.getHierarchyMap(Hierarchy, Hierarchy)()

Field Summary
static java.lang.String copyright
           
 
Method Summary
 void addMapping(Category sourceCategory, Category destinationCategory)
          Adds a mapping between two categories to the hierarchymap.
 java.util.Collection<Category> getDestinationCategories(Category sourceCategory)
          Returns a collection of destination categories the given source category is mapped to in this hierarchy map.
 Hierarchy getDestinationHierarchy()
          Returns the destination hierarchy.
 java.util.Collection<Category> getSourceCategories()
          Returns a collection of source categories in the hierarchy map.
 Hierarchy getSourceHierarchy()
          Returns the source hierarchy.
 void removeAllMappings()
          Removes all mappings in the hierarchymap.
 void removeMapping(Category sourceCategory, Category destinationCategory)
          Removes a mapping between two categories in the hierarchymap.
 void save()
          Saves the hierarchy map
 

Field Detail

copyright

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

addMapping

void addMapping(Category sourceCategory,
                Category destinationCategory)
Adds a mapping between two categories to the hierarchymap.

Parameters:
sourceCategory - Category to map items from
destinationCategory - Category to map items to
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - if any of the parameters is null
java.lang.IllegalStateException - if any API object passed as a parameter has not yet been saved

getSourceCategories

java.util.Collection<Category> getSourceCategories()
Returns a collection of source categories in the hierarchy map.

Returns:
Collection of source categories.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

getDestinationCategories

java.util.Collection<Category> getDestinationCategories(Category sourceCategory)
Returns a collection of destination categories the given source category is mapped to in this hierarchy map.

Parameters:
sourceCategory - The source category in the hierarchy map
Returns:
Collection of destination categories.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - if sourceCategory is null
java.lang.IllegalStateException - if sourceCategory has not yet been saved

getSourceHierarchy

Hierarchy getSourceHierarchy()
Returns the source hierarchy.

Returns:
the source hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

getDestinationHierarchy

Hierarchy getDestinationHierarchy()
Returns the destination hierarchy.

Returns:
the destination hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

removeMapping

void removeMapping(Category sourceCategory,
                   Category destinationCategory)
Removes a mapping between two categories in the hierarchymap.

Parameters:
sourceCategory - Category to map from
destinationCategory - Category to map to
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - if any of the parameters is null
java.lang.IllegalStateException - if any API object passed as a parameter has not yet been saved

removeAllMappings

void removeAllMappings()
Removes all mappings in the hierarchymap.

Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

save

void save()
Saves the hierarchy map

Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use