com.ibm.pim.hierarchy
Interface HierarchyManager

All Superinterfaces:
Manager

public interface HierarchyManager
extends Manager

Interface for the Manager of Hierarchy objects. Hierarchy Manager can be used to create or retrieve hierarchies and retrieve hierarchy maps.

Since:
6.0.0
See Also:
Context.getHierarchyManager()

Field Summary
static java.lang.String copyright
           
 
Method Summary
 Hierarchy createHierarchy(PrimarySpec spec, java.lang.String name)
          Creates a new hierarchy object.
 Hierarchy createHierarchy(PrimarySpec spec, java.lang.String name, AttributeDefinition pathAttribute)
          Creates a new hierarchy object.
 Hierarchy createHierarchy(PrimarySpec spec, java.lang.String name, AttributeDefinition pathAttribute, AccessControlGroup accessControlGroup, AttributeDefinition displayAttribute)
          Create a new hierarchy object.
 java.util.Collection<ScreenType> getApplicableScreenTypes()
          Returns all the screen types that a View on a hierarchy can be attached to
 java.util.Collection<Hierarchy> getHierarchies()
          Retrieves all Hierarchies current user is authorized to As prescribed via Permission.HIERARCHY_LIST
 Hierarchy getHierarchy(java.lang.String name)
          Retrieves a specific hierarchy by name.
 Hierarchy getHierarchy(java.lang.String name, VersionInfo versionInfo)
          Retrieves a particular version of a specified Hierarchy
 Hierarchy getHierarchy(View view)
          Get the Hierarchy by which a particular view is owned
 HierarchyMap getHierarchyMap(Hierarchy sourceHierarchy, Hierarchy destinationHierarchy)
          Returns the hierarchy map between the two given hierarchies.
 java.util.List<VersionInfo> getVersionInfo(java.lang.String hierarchyName)
          Retrieves all Version Information for a hierarchy
 java.util.List<VersionInfo> getVersionInfo(java.lang.String hierarchyName, java.lang.String versionName)
          Retrieves the list of Version Information objects for the given hierarchy with the given version name.
 
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

createHierarchy

Hierarchy createHierarchy(PrimarySpec spec,
                          java.lang.String name)
Creates a new hierarchy object. Hierarchy is not persisted until Hierarchy.save() is called on it. The path attribute for the hierarchy is set to the primary key attribute in the spec. The display attribute for the hierarchy is set to the path attribute for the hierarchy. The access control group for the hierarchy is set to default access control group.

Parameters:
spec - The primary spec for the hierarchy.
name - A name to be given to the hierarchy.
Returns:
New Hierarchy object
Throws:
PIMInternalException - if an internal exception occurs
PIMAuthorizationException - reserved for future use
java.lang.IllegalArgumentException - if any of the parameters is null, or name is empty
java.lang.IllegalStateException - if any API object passed as a parameter that has not yet been saved.

createHierarchy

Hierarchy createHierarchy(PrimarySpec spec,
                          java.lang.String name,
                          AttributeDefinition pathAttribute)
Creates a new hierarchy object. Hierarchy is not persisted until Hierarchy.save() is called on it. The display attribute for the hierarchy is set to the path attribute. The access control group for the hierarchy is set to default access control group.

Parameters:
spec - The primary spec for the hierarchy.
name - A name to be given to the hierarchy.
pathAttribute - The attribute to be used as the path attribute for the objects in the hierarchy.
Returns:
Hierarchy object
Throws:
PIMInternalException - if an internal exception occurs
PIMAuthorizationException - reserved for future use
java.lang.IllegalArgumentException - if any of the parameters is null or if name is empty.
java.lang.IllegalStateException - if any API object passed as a parameter that has not yet been saved.

createHierarchy

Hierarchy createHierarchy(PrimarySpec spec,
                          java.lang.String name,
                          AttributeDefinition pathAttribute,
                          AccessControlGroup accessControlGroup,
                          AttributeDefinition displayAttribute)
Create a new hierarchy object. Hierarchy is not persisted until Hierarchy.save() is called on it.

Parameters:
spec - The primary spec for the hierarchy.
name - A name to be given to the hierarchy.
pathAttribute - The attribute to be used as the path attribute for the objects in the hierarchy.
accessControlGroup - The Access Control Group for the hierarchy.
displayAttribute - The spec node to be used as the display attribute for the objects in the hierarchy.
Returns:
Hierarchy object
Throws:
PIMInternalException - if an internal exception occurs
PIMAuthorizationException - reserved for future use
java.lang.IllegalArgumentException - if any of the parameters is null or if name is empty
java.lang.IllegalStateException - if any API object passed as a parameter that has not yet been saved.

getHierarchies

java.util.Collection<Hierarchy> getHierarchies()
Retrieves all Hierarchies current user is authorized to As prescribed via Permission.HIERARCHY_LIST

Returns:
A Collection of Hierarchies.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - reserved for future use

getHierarchy

Hierarchy getHierarchy(java.lang.String name)
Retrieves a specific hierarchy by name.

Parameters:
name - The name of the Hierarchy to be retrieved, or null is hierarchy does not exist.
Returns:
The Hierarchy matching the given name.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_LIST
java.lang.IllegalArgumentException - if any of the parameters is null or name is empty

getHierarchy

Hierarchy getHierarchy(java.lang.String name,
                       VersionInfo versionInfo)
Retrieves a particular version of a specified Hierarchy

Parameters:
name - The name of the Hierarchy to be retrieved or null if a hierarchy with the given name and version does not exist
versionInfo - The version info object representing the version to be retrieved
Returns:
The Hierarchy matching the given name and the version.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_LIST
java.lang.IllegalArgumentException - if any of the parameters is null or name is empty

getVersionInfo

java.util.List<VersionInfo> getVersionInfo(java.lang.String hierarchyName,
                                           java.lang.String versionName)
Retrieves the list of Version Information objects for the given hierarchy with the given version name.

Parameters:
hierarchyName - The name of the Hierarchy
versionName -
Returns:
A list of VersionInfo objects or null if either hierarchyName or versionName is not found.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_LIST and Permission.HIERARCHY_ATTRIBUTES
java.lang.IllegalArgumentException - if any of the parameters is null or empty

getVersionInfo

java.util.List<VersionInfo> getVersionInfo(java.lang.String hierarchyName)
Retrieves all Version Information for a hierarchy

Parameters:
hierarchyName - the name of the Hierarchy
Returns:
A list of VersionInfo objects or null if hierarchy with hierarchyName is not found
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_LIST Permission.HIERARCHY_ATTRIBUTES
java.lang.IllegalArgumentException - if hierarchyName is null or empty

getHierarchyMap

HierarchyMap getHierarchyMap(Hierarchy sourceHierarchy,
                             Hierarchy destinationHierarchy)
Returns the hierarchy map between the two given hierarchies.

Parameters:
sourceHierarchy - The source hierarchy
destinationHierarchy - The destination hierarchy
Returns:
HierarchyMap The mapping between the two hierarchies.
Throws:
PIMInternalException - if an internal exception 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 that has not yet been saved.

getApplicableScreenTypes

java.util.Collection<ScreenType> getApplicableScreenTypes()
Returns all the screen types that a View on a hierarchy can be attached to

Returns:
a collection of screen types that can be used for ScreenViews
Throws:
PIMInternalException - if an internal error occurs

getHierarchy

Hierarchy getHierarchy(View view)
Get the Hierarchy by which a particular view is owned

Parameters:
view - the View object
Returns:
the owning Hierarchy object
Throws:
PIMInternalException - if an internal error occurs
PIMAutorizationException - If the user does not have the equivalent of Permission.HIERARCHY_LIST
java.lang.IllegalArgumentException - if the View is not a Hierarchy View or if view is null
java.lang.IllegalStateException - if view has not been persisted