|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ImportList
An interface representing an object that holds name, type and action mode of objects present in a zip file obtained from the environment export tool. Allows the user to create a new zip file containing selected objects from this list.
Method Summary | |
---|---|
void |
addHierarchyMap(java.lang.String sourceHierarchyName,
java.lang.String destinationHierarchyName)
Adds the hierarchy map to this list. |
void |
addObject(ExportList.Type type,
java.lang.String objectName)
Adds the object of specified type and name to this list. |
void |
addObjects(ExportList.Type type)
Adds all the objects of the specified type to this list. |
boolean |
areAllRequisitesMet()
Determines whether any object dependency is present. |
void |
createZip(java.lang.String documentPath)
Creates a zip file containing only those objects present in this import list and stores it at the specified path in the docstore. |
void |
createZip(java.lang.String documentPath,
boolean checkRequisites)
Creates a zip file containing only those objects present in this import list and stores it at the specified path in the docstore after checking for pre-requisites if checkRequisites is true. |
ExportList.ActionMode |
getActionModeForObject(ExportList.Type type,
java.lang.String objectName)
Returns the action mode for the PIM object of specified type and name. |
java.util.List<java.util.HashMap> |
getHierarchyMaps()
Fetches the names of all hierarchy maps as a list of HashMap. |
java.util.List<java.lang.String> |
getObjectNames(ExportList.Type type)
Fetches the names of all objects of the given type in the list. |
java.util.Set<ExportList.Type> |
getObjectTypes()
Fetches the object types in the Import list. |
ImportRequisiteList |
getRequisites()
Fetches the names of objects that the objects in this export list are dependent on. |
void |
removeHierarchyMap(java.lang.String sourceHierarchyName,
java.lang.String destinationHierarchyName)
Removes the hierarchy map from this list. |
void |
removeObject(ExportList.Type type,
java.lang.String objectName)
Removes the object of specified type and name from this list. |
void |
removeObjects(ExportList.Type type)
Removes all the objects of the specified type from this list |
Method Detail |
---|
java.util.Set<ExportList.Type> getObjectTypes()
PIMInternalException
- If an internal error occurs.java.util.List<java.lang.String> getObjectNames(ExportList.Type type)
type
- The object type
PIMInternalException
- If an internal error occurs.
java.lang.IllegalArgumentException
- If type is null or if the type is
ExportList.Type.HIERARCHY_MAP
Use
getHierarchyMaps()
to retrieve Hierarchy Map namesjava.util.List<java.util.HashMap> getHierarchyMaps()
PIMInternalException
- If an internal error occurs.void removeObjects(ExportList.Type type)
type
- The PIM object type
PIMInternalException
- If an internal error occurs.
java.lang.IllegalArgumentException
- If type is null or if objects of the specified type are not
present in the list.void removeObject(ExportList.Type type, java.lang.String objectName)
type
- The PIM object typeobjectName
- The name of the object to be removed from the list.
PIMInternalException
- If an internal error occurs.
java.lang.IllegalArgumentException
- If type is null or objectName is null or if the objectName is
an empty string or if the object specified is not in this
list.void removeHierarchyMap(java.lang.String sourceHierarchyName, java.lang.String destinationHierarchyName)
sourceHierarchyName
- The name of the source hierarchydestinationHierarchyName
- The name of the destination hierarchy.
PIMInternalException
- If an internal error occurs.
java.lang.IllegalArgumentException
- If the arguments are null or an empty string or if the
hierarchy map specified is not in this list.void addObjects(ExportList.Type type)
removeObjects(ExportList.Type type)
can be added
back to the list. Only objects which were persent in the list when the
list was created are added back to the list.
type
- The PIM object type
PIMInternalException
- If an internal error occurs.
java.lang.IllegalArgumentException
- If type is null or if objects of the specified type were not
present in the list when the list was created.void addObject(ExportList.Type type, java.lang.String objectName)
removeObjects(ExportList.Type type)
can be added back to
the list.
type
- The PIM object typeobjectName
- The name of the object to be added to the list.
PIMInternalException
- If an internal error occurs.
java.lang.IllegalArgumentException
- If arguments are null or an empty string or the object
specified was not in this list when this list was created.void addHierarchyMap(java.lang.String sourceHierarchyName, java.lang.String destinationHierarchyName)
removeHierarchyMap(String sourceHierarchyName, String destinationHierarchyName)
can be added back to the list.
sourceHierarchyName
- The name of the source hierarchy.destinationHierarchyName
- The name of the destination hierarchy.
PIMInternalException
- If an internal error occurs.
java.lang.IllegalArgumentException
- If arguments are null or an empty string or the object
specified was not in this list when this list was created.ExportList.ActionMode getActionModeForObject(ExportList.Type type, java.lang.String objectName)
type
- The PIM object type.Return null if the type is any of the
followingExportList.Type.CATALOG_CONTENT
,ExportList.Type.HIERARCHY_CONTENT
,ExportList.Type.ORGANIZATION_HIERARCHY_CONTENT
,ExportList.Type.USER_DEFINED_LOG_CONTENT
,ExportList.Type.LOOKUP_TABLE_CONTENT
objectName
- The PIM object name
PIMInternalException
- If an internal error occurs.
java.lang.IllegalArgumentException
- If arguments are null or an empty string or the object of the
specified type and objectName is not present in the list.ImportRequisiteList getRequisites()
Assume Catalog Catalog1 needs Spec Spec1, Hierarchy hierarchy1 and
Attribute Collection AttrColl1. Assuming that the zip file contains only
Catalog1, calling getRequisites()
on the ImportList obtained
from this zip file would return Spec1, Hierarchy1 and AttrColl1,
regardless of whether these objects are present in the target
environment.
When the objects which are required are part of the zip file and need to
be added back to this list, use the
addObjects(ExportList.Type type)
or
addObject(ExportList.Type type, String objectName)
.
PIMInternalException
- If an internal error occurs.void createZip(java.lang.String documentPath)
documentPath
- The path in the docstore at which the zip file will be
stored.The path must end with a file name.
PIMInternalException
- If an internal error occurs.
java.lang.IllegalArgumentException
- If documentPath is null or an empty string or the
documentPath does not end with '.zip'.void createZip(java.lang.String documentPath, boolean checkRequisites)
documentPath
- The path in the docstore at which the zip file will be
stored.The path must end with a file name.checkRequisites
- When this parameter is true, the createZip method first checks
whether all the required objects are present in the import
list,throws an exception if objects present in this list
require objects which are not in this list
PIMInternalException
- If an internal error occurs or if there is an object
dependency found. getRequisites()
method has to be
invoked on this list to get the list of required objects.
Required objects can then be added to the list, if they were
part of the list when the list was created, using
addObject(ExportList.Type type, String objectName)
or addObjects(ExportList.Type type)
.
java.lang.IllegalArgumentException
- If documentPath is null or an empty string or the
documentPath does not end with '.zip'.createZip(String documentPath)
boolean areAllRequisitesMet()
getRequisites()
method,user can call this method to identify
whether any dependency is present.
PIMInternalException
- If an internal error occurs.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |