com.ibm.pim.hierarchy
Interface Hierarchy


public interface Hierarchy

Interface for the Hierarchy object representing a Hierarchy of categories.

Since:
6.0.0

Field Summary
static java.lang.String copyright
           
 
Method Summary
 Category createCategory(java.lang.String parentCategoryPath, java.lang.String delimiter, java.lang.String pathValue)
          Returns a new category object.
 Category createCategory(java.lang.String parentCategoryPath, java.lang.String delimiter, java.lang.String pathValue, java.lang.String primaryKeyValue)
          Returns a new category object.
 CategoryUserDefinedLog createUserDefinedLog(java.lang.String name, boolean runningLog)
          Creates a CategoryUserDefinedLog for this Hierarchy
 VersionInfo createVersion(java.lang.String name)
          Create a new version of this Hierarchy
 View createView(java.lang.String viewName)
          create a new empty View for this hierarchy
 Schedule deleteAsynchronous()
          Schedules a delete of this hierarchy.
 void deleteCustomParameter(java.lang.String name)
          Delete the custom parameter associated with the hierarchy.
 AccessControlGroup getAccessControlGroup()
          Returns the Access Control Group for this hierarchy
 PIMCollection<Category> getCategories()
          Retrieves a collection of all the Category objects in this hierarchy.
 PIMCollection<Category> getCategoriesAtLevel(int level)
          Retrieves a collection of all the Category objects in this hierarchy residing at a particular level.
 PIMCollection<Category> getCategoriesByItemSecondarySpec(SecondarySpec spec)
          Retrieves a collection of all the Category objects in this hierarchy implementing a particular secondary spec.
 java.util.Collection<Category> getCategoriesByPaths(java.util.Collection<java.lang.String> paths)
          Retrieves a collection of all the Category objects in this hierarchy based upon their path names.
 java.util.Collection<Category> getCategoriesByPaths(java.util.Collection<java.lang.String> paths, java.lang.String delimiter)
          Retrieves a collection of all the Category objects in this hierarchy based upon their path names.
 PIMCollection<Category> getCategoriesByStandAloneSpec(SecondarySpec spec)
          Retrieves a collection of all the Category objects in this hierarchy implementing a particular standalone spec.
 PIMCollection<Category> getCategoriesWithAttributeValue(java.lang.String attributeInstancePath, java.lang.Object attributeValue)
          Retrieves a collection of all the Category objects in this hierarchy based upon a particular attribute value.
 Document getCategoryBuildScript()
          Retrieves the script document associated with an invocation point defined by the Hierarchy
 Category getCategoryByPath(java.lang.String path)
          Retrieves a Category based upon Path name
 Category getCategoryByPath(java.lang.String path, java.lang.String delimiter)
          Retrieves a Category based upon Path name
 Category getCategoryByPrimaryKey(java.lang.String primaryKey)
          Retrieves a Category based upon Primary key
 java.util.Collection<CategoryCollaborationArea> getCollaborationAreas()
          Retrieve the collaboration areas associated with this hierarchy.
 java.util.Collection<java.lang.String> getCustomParameterNames()
          Retrieves a list of user defined custom parameters present in this Hierarchy
 java.util.Collection<java.lang.String> getCustomParameterValues(java.lang.String name)
          Retrieves the values of the given User Defined custom parameter for this Hierarchy
 AttributeDefinition getDisplayAttribute()
          Returns the display attribute for this hierarchy
 java.lang.String getName()
          Retrieves the name of this hierarchy.
 AttributeDefinition getPathAttribute()
          Returns the path attribute for this hierarchy
 Document getPostSaveScript()
          Retrieves the script document associated with an invocation point defined by the Hierarchy
 Document getPostScript()
          Retrieves the script document associated with an invocation point defined by the Hierarchy
 Document getPreScript()
          Retrieves the script document associated with an invocation point defined by the Hierarchy
 PrimarySpec getPrimarySpec()
          Retrieves the Primary spec for this hierarchy.
 ProcessingOptions getProcessingOptions()
          Provide temporary ways to change the default behavior for performance reasons.
 Category getRootCategory()
          Returns the root category for this Hierarchy
 Sequence getSequence(AttributeDefinition sequenceAttribute)
          gets the sequence object for the sequence attribute.
 AttributeCollection getUserDefinedAttributeCollection()
          Retrieves the User Defined Core Attribute Collection for this hierarchy
 CategoryUserDefinedLog getUserDefinedLog(java.lang.String name)
          Retrieves a specific CategoryUserDefinedLog associated with this hierarchy with the specified name
 java.util.Collection<CategoryUserDefinedLog> getUserDefinedLogs()
          Retrieves all CategoryUserDefinedLogs available in the current context for this Hierarchy
 View getView(java.lang.String name)
          retrieve a View on this hierarchy by name
 java.util.Collection<View> getViews()
          Retrieve all Views on this hierarchy.
 boolean isCategoryCheckedOut(java.lang.String categoryPrimaryKey)
          Identifies if a category is checked out
 Schedule rollbackAsynchronous(VersionInfo version)
          Schedules a rollback of this hierarchy.
 java.util.List<ValidationErrors> save()
          Persist the changes to the given hierarchy object
 void setAccessControlGroup(AccessControlGroup acg)
          Sets the Access Control Group for this hierarchy
 void setCategoryBuildScript(Document docStoreDoc)
          Describes the location of a script with an invocation point defined by the Hierarchy
 void setCustomParameter(java.lang.String name, java.lang.String value)
          Sets a User Defined Custom Parameter for this Hierarchy.
 void setDisplayAttribute(AttributeDefinition attribute)
          Set the attribute to be used as the display attribute for the hierarchy
 void setPostSaveScript(Document docStoreDoc)
          Describes the location of a script with an invocation point defined by the Hierarchy
 void setPostScript(Document docStoreDoc)
          Describes the location of a script with an invocation point defined by the Hierarchy
 void setPreScript(Document docStoreDoc)
          Describes the location of a script with an invocation point defined by the Hierarchy
 void setUserDefinedAttributeCollection(AttributeCollection attributeCollection)
          Associate the User defined Attribute Collection with the hierarchy
 

Field Detail

copyright

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

createCategory

Category createCategory(java.lang.String parentCategoryPath,
                        java.lang.String delimiter,
                        java.lang.String pathValue)
Returns a new category object. The category object must be persisted by calling save() on the containing hierarchy.

Parameters:
parentCategoryPath - The path of the parent category excluding the root name.
delimiter - The delimiter used in the provided parent Path. The delimiter consists of all characters in the delimiter string taken together.
pathValue - The value for the path attribute of the category.
Returns:
Category object
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ADD_HIERARCHY_NODES
PIMInvalidPathException - If the parent Path does not exist.
java.lang.IllegalArgumentException - if any of the parameters is null or if delimiter or pathValue is empty

createCategory

Category createCategory(java.lang.String parentCategoryPath,
                        java.lang.String delimiter,
                        java.lang.String pathValue,
                        java.lang.String primaryKeyValue)
Returns a new category object. The category object must be persisted by calling save() on the containing hierarchy.

Parameters:
parentCategoryPath - The path of the parent category excluding the rootname.
delimiter - The delimiter used in the provided parent Path. The delimiter consists of all characters in the delimiter string taken together.
pathValue - The value for the path attribute of the category.
primaryKeyValue - Primary key value for the category
Returns:
Category object
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ADD_HIERARCHY_NODES
PIMInvalidPathException - If the parent Path does not exist.
java.lang.IllegalArgumentException - if any of the parameters is null or if delimiter, pathValue or primaryKeyValue is empty

createVersion

VersionInfo createVersion(java.lang.String name)
Create a new version of this Hierarchy

Parameters:
name - The name of the version
Returns:
a VersionInfo object
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
java.lang.IllegalArgumentException - if name is null or empty

deleteAsynchronous

Schedule deleteAsynchronous()
Schedules a delete of this hierarchy. The Scheduled Job is run immediately and it's progress can be monitored, via the returned Schedule Object. Please note that subsequent to calling this method the Hierarchy object becomes invalid.

Returns:
A Job Schedule
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_DELETE

deleteCustomParameter

void deleteCustomParameter(java.lang.String name)
Delete the custom parameter associated with the hierarchy.

Parameters:
name - Name of the custom parameter to be deleted
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
java.lang.IllegalArgumentException - if name is null or empty

getAccessControlGroup

AccessControlGroup getAccessControlGroup()
Returns the Access Control Group for this hierarchy

Returns:
Access Control Group for this hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES

getCategories

PIMCollection<Category> getCategories()
Retrieves a collection of all the Category objects in this hierarchy. This does not include the root category.

Returns:
a PIMCollection of category objects. Please note this is a lazily instantiated collection
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES
See Also:
for more info

getCategoriesWithAttributeValue

PIMCollection<Category> getCategoriesWithAttributeValue(java.lang.String attributeInstancePath,
                                                        java.lang.Object attributeValue)
Retrieves a collection of all the Category objects in this hierarchy based upon a particular attribute value. The attribute must be an indexed attribute.

Parameters:
attributeInstancePath - The Path of the attribute instance
attributeValue - The Value of the attribute instance.
Returns:
a PIMCollection of category objects. Please note this is a lazily instantiated collection
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES
PIMInvalidPathException - If the given attribute path does not exist.
java.lang.IllegalArgumentException - if any of the parameters is null, or if attributeInstancePath is empty
See Also:
for more info

getCategoriesByItemSecondarySpec

PIMCollection<Category> getCategoriesByItemSecondarySpec(SecondarySpec spec)
Retrieves a collection of all the Category objects in this hierarchy implementing a particular secondary spec.

Parameters:
spec - the item secondary spec implemented by the categories
Returns:
a PIMCollection of category objects. Please note this is a lazily instantiated collection
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES
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.
See Also:
for more info

getCategoriesAtLevel

PIMCollection<Category> getCategoriesAtLevel(int level)
Retrieves a collection of all the Category objects in this hierarchy residing at a particular level.

Parameters:
level - the level in the hierarchy for which categories to be returned. Level 1 will return all the categories under root.
Returns:
a PIMCollection of category objects. Please note this is a lazily instantiated collection
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES
java.lang.IllegalArgumentException - If the passed in level is not a positive non-zero number.
See Also:
for more info

getCategoriesByPaths

java.util.Collection<Category> getCategoriesByPaths(java.util.Collection<java.lang.String> paths)
Retrieves a collection of all the Category objects in this hierarchy based upon their path names. No exception is thrown if a path does not resolve to an existing category.

Parameters:
paths - Category paths excluding the root category name
Returns:
a collection of category objects
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES
java.lang.IllegalArgumentException - if any of the parameters is null

getCategoriesByPaths

java.util.Collection<Category> getCategoriesByPaths(java.util.Collection<java.lang.String> paths,
                                                    java.lang.String delimiter)
Retrieves a collection of all the Category objects in this hierarchy based upon their path names. No exception is throw if a path does not resolve to an existing category.

Parameters:
paths - Category paths excluding the root category name
delimiter - The delimiter used in the provided paths.
Returns:
a collection of category objects
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES
java.lang.IllegalArgumentException - if any of the parameters is null or if delimiter is empty

getCategoriesByStandAloneSpec

PIMCollection<Category> getCategoriesByStandAloneSpec(SecondarySpec spec)
Retrieves a collection of all the Category objects in this hierarchy implementing a particular standalone spec.

Parameters:
spec - the standalone spec associated with the category.
Returns:
a PIMCollection of category objects. Please note this is a lazily instantiated collection
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES
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.
See Also:
for more info

getCategoryBuildScript

Document getCategoryBuildScript()
Retrieves the script document associated with an invocation point defined by the Hierarchy

Returns:
the category build script Document object for this hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES

getCategoryByPath

Category getCategoryByPath(java.lang.String path)
Retrieves a Category based upon Path name

Parameters:
path - category path excluding the root category name
Returns:
a category object or null if a category at the given path does not exist.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES
java.lang.IllegalArgumentException - if path is null

getCategoryByPath

Category getCategoryByPath(java.lang.String path,
                           java.lang.String delimiter)
Retrieves a Category based upon Path name

Parameters:
path - category path excluding the root category name
delimiter - the delimiter used in the provided path.
Returns:
a category object or null if a category at the given path does not exist.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES
java.lang.IllegalArgumentException - if any of the parameters is null or if delimiter is empty

getCategoryByPrimaryKey

Category getCategoryByPrimaryKey(java.lang.String primaryKey)
Retrieves a Category based upon Primary key

Parameters:
primaryKey - primary key
Returns:
a category object or null if a category with the given primary key does not exist.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES
java.lang.IllegalArgumentException - if primaryKey is null or empty

getCollaborationAreas

java.util.Collection<CategoryCollaborationArea> getCollaborationAreas()
Retrieve the collaboration areas associated with this hierarchy.

Returns:
a list of collaboration areas that have this hierarchy as their source hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use

getCustomParameterNames

java.util.Collection<java.lang.String> getCustomParameterNames()
Retrieves a list of user defined custom parameters present in this Hierarchy

Returns:
the list of user defined parameters for this Hierarchy.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES

getCustomParameterValues

java.util.Collection<java.lang.String> getCustomParameterValues(java.lang.String name)
Retrieves the values of the given User Defined custom parameter for this Hierarchy

Parameters:
name - the name of the parameter
Returns:
list of values for the given custom parameter, or null if a custom parameter with the name does not exist.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
java.lang.IllegalArgumentException - if name is null or empty
See Also:
getCustomParameterNames()

getDisplayAttribute

AttributeDefinition getDisplayAttribute()
Returns the display attribute for this hierarchy

Returns:
The display attribute for this hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES

getName

java.lang.String getName()
Retrieves the name of this hierarchy.

Returns:
String name
Throws:
PIMInternalException - If an internal error occurs

getPathAttribute

AttributeDefinition getPathAttribute()
Returns the path attribute for this hierarchy

Returns:
The path attribute for this hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES

getPostSaveScript

Document getPostSaveScript()
Retrieves the script document associated with an invocation point defined by the Hierarchy

Returns:
the post save script Document object for this hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES

getPostScript

Document getPostScript()
Retrieves the script document associated with an invocation point defined by the Hierarchy

Returns:
the post script Document object for this hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES

getPreScript

Document getPreScript()
Retrieves the script document associated with an invocation point defined by the Hierarchy

Returns:
the pre script Document object for this hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES

getPrimarySpec

PrimarySpec getPrimarySpec()
Retrieves the Primary spec for this hierarchy.

Returns:
String name
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES

getRootCategory

Category getRootCategory()
Returns the root category for this Hierarchy

Returns:
the root Category oject for this Hierarchy
Throws:
PIMInternalException - if an internal exception occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES

getUserDefinedAttributeCollection

AttributeCollection getUserDefinedAttributeCollection()
Retrieves the User Defined Core Attribute Collection for this hierarchy

Returns:
the attribute collection.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES

getProcessingOptions

ProcessingOptions getProcessingOptions()
Provide temporary ways to change the default behavior for performance reasons.

Returns:
processingOptions specific for the hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ADD_HIERARCHY_NODES Permission.HIERARCHY_DELETE_HIERARCHY_NODES Permission.HIERARCHY_MODIFY_HIERARCHY_NODE_ATTRIBUTES

isCategoryCheckedOut

boolean isCategoryCheckedOut(java.lang.String categoryPrimaryKey)
Identifies if a category is checked out

Parameters:
categoryPrimaryKey - the category primary key to search on
Returns:
if the category exists in this hierarchy and is checked out to one or more collaboration areas, this returns true, otherwise returns false
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_VIEW_HIERARCHY_NODES
java.lang.IllegalArgumentException - if any of the parameters is null

rollbackAsynchronous

Schedule rollbackAsynchronous(VersionInfo version)
Schedules a rollback of this hierarchy. The Scheduled Job is run immediately and it's progress can be monitored, via the returned Schedule Object. Please note that subsequent to calling this method the Hierarchy object becomes invalid and should be retrieved again after the Scheduled Job has completed.

Parameters:
version - the version of the hierarchy to use
Returns:
A Job Schedule or null if the version does not exist.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ROLLBACK
java.lang.IllegalArgumentException - if any of the parameters is null

save

java.util.List<ValidationErrors> save()
Persist the changes to the given hierarchy object

Returns:
A list of ValidionErrors objects each of which contain the validation errors for the categories in this Hierarchy that were saved as part of this operation and failed validation. If none of the categories had validation errors, then an empty list is returned.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES

setAccessControlGroup

void setAccessControlGroup(AccessControlGroup acg)
Sets the Access Control Group for this hierarchy

Parameters:
acg - The access control group to associate with a hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
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.

setCategoryBuildScript

void setCategoryBuildScript(Document docStoreDoc)
Describes the location of a script with an invocation point defined by the Hierarchy

Parameters:
docStoreDoc - the post script document for this hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
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.

setCustomParameter

void setCustomParameter(java.lang.String name,
                        java.lang.String value)
Sets a User Defined Custom Parameter for this Hierarchy. If the parameter already exists, then adds the given value to the list of values for the parameter.

Parameters:
name - the name of the parameter.
value - the value of the parameter
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
java.lang.IllegalArgumentException - if any of the parameters is null or if name is empty
See Also:
getCustomParameterNames()

setDisplayAttribute

void setDisplayAttribute(AttributeDefinition attribute)
Set the attribute to be used as the display attribute for the hierarchy

Parameters:
attribute - an attribute
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
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.

getSequence

Sequence getSequence(AttributeDefinition sequenceAttribute)
gets the sequence object for the sequence attribute.

Parameters:
sequenceAttribute - the sequence attribute definition.
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
java.lang.IllegalArgumentException - If the passed argument is null

setPostSaveScript

void setPostSaveScript(Document docStoreDoc)
Describes the location of a script with an invocation point defined by the Hierarchy

Parameters:
docStoreDoc - the post script document for this hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
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.

setPostScript

void setPostScript(Document docStoreDoc)
Describes the location of a script with an invocation point defined by the Hierarchy

Parameters:
docStoreDoc - the post script document for this hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
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.

setPreScript

void setPreScript(Document docStoreDoc)
Describes the location of a script with an invocation point defined by the Hierarchy

Parameters:
docStoreDoc - the post script document for this hierarchy
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
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.

setUserDefinedAttributeCollection

void setUserDefinedAttributeCollection(AttributeCollection attributeCollection)
Associate the User defined Attribute Collection with the hierarchy

Parameters:
attributeCollection - an attribute collection
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_ATTRIBUTES
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.

createView

View createView(java.lang.String viewName)
create a new empty View for this hierarchy

Parameters:
viewName - the name for the View
Returns:
the newly created View. Currently it will have empty ScreenViews, one for each of the applicableScreenTypes (as returned by hierarchyManager.getApplicableScreenTypes). These can be retrieved from the View and edited.
Throws:
PIMInternalException - if an internal error occurs, or a view already exists by that name
PIMAuthorizationException - If the user does not have the equivalent of Permission.HIERARCHY_EDIT_HIERARCHY_VIEWS
java.lang.IllegalArgumentException - if viewName is null or empty

getView

View getView(java.lang.String name)
retrieve a View on this hierarchy by name

Parameters:
name - the name of the hierarchy View to retrieve
Returns:
the hierarchy View object with the specified name. Returns null if a view with the given name does not exist for this hierarchy.
Throws:
PIMInternalException - if an internal error occurs, or a view already exists by that name
PIMAuthorizationException - reserved for future use
java.lang.IllegalArgumentException - if name is null or empty

getViews

java.util.Collection<View> getViews()
Retrieve all Views on this hierarchy. If the user does not have permission to edit views for this hierarchy, an empty collection will be returned.

Returns:
a collection of Views for this hierarchy. If this hierarchy has no Views defined, an empty collection will be returned.
Throws:
PIMInternalException - if an internal error occurs
PIMAuthorizationException - reserved for future use

createUserDefinedLog

CategoryUserDefinedLog createUserDefinedLog(java.lang.String name,
                                            boolean runningLog)
Creates a CategoryUserDefinedLog for this Hierarchy

Parameters:
name - The log name
runningLog - boolean. true if log is running false if not
Returns:
UserDefinedLog
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - If the name is null or if the name is an empty string

getUserDefinedLogs

java.util.Collection<CategoryUserDefinedLog> getUserDefinedLogs()
Retrieves all CategoryUserDefinedLogs available in the current context for this Hierarchy

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

getUserDefinedLog

CategoryUserDefinedLog getUserDefinedLog(java.lang.String name)
Retrieves a specific CategoryUserDefinedLog associated with this hierarchy with the specified name

Parameters:
name - The name of the CategoryUserDefinedLog to be retrieved
Returns:
The CategoryUserDefinedLog matching that name, Returns null if the CategoryUserDefinedLog with the given name does not exist
Throws:
PIMInternalException - If an internal error occurs
PIMAuthorizationException - Reserved for future use
java.lang.IllegalArgumentException - If the name is null or if the name is an empty string