com.ibm.pim.utils
Interface ExportList


public interface ExportList

An interface representing an object that holds the list of objects to be exported from a company. For each object, the action mode in which the object has to be exported is also stored.

Since:
6.0.0

Nested Class Summary
static class ExportList.ActionMode
          Enumeration of action modes for environment export and import tool.
static class ExportList.Type
          Enumeration of object types for use by environment export and import tool.
 
Field Summary
static java.lang.String copyright
           
 
Method Summary
 void addAllContents(ExportList.Type type)
          Adds contents of all objects of type specified by parameter 'type' to the export list.
 void addAllObjects(ExportList.Type type, ExportList.ActionMode actionMode)
          Adds all objects of type specified by parameter 'type' in the action mode specified by the parameter 'actionMode' to this export list.
 void addAllRequisites()
          Adds all the objects on which the objects in this list are dependent on, to the list.
 void addContent(ExportList.Type type, java.lang.Object object)
          Adds contents of objects to the ExportList
 void addObject(ExportList.Type type, java.lang.Object object, ExportList.ActionMode actionMode)
          Adds the objects of type specified by parameter 'type' in the action mode specified by the parameter 'actionMode' to the ExportList.
 boolean areAllRequisitesMet()
          Determines whether any object dependency is present for this export list.
 java.util.Set<ExportList.Type> getObjectTypes()
          Returns the type of objects which were added to this ExportList.
 ExportRequisiteList getRequisites()
          Returns the objects that the objects in this export list are dependent on.
 

Field Detail

copyright

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

addAllObjects

void addAllObjects(ExportList.Type type,
                   ExportList.ActionMode actionMode)
Adds all objects of type specified by parameter 'type' in the action mode specified by the parameter 'actionMode' to this export list.

Parameters:
type - The PIM object type
actionMode - The action mode in which the object has to be exported.
Throws:
PIMInternalException - if an internal error occurs
java.lang.IllegalArgumentException - If type or actionMode is null or if actionMode is not supported by the specified type.
See Also:
Supported ActionModes for Type

addObject

void addObject(ExportList.Type type,
               java.lang.Object object,
               ExportList.ActionMode actionMode)
Adds the objects of type specified by parameter 'type' in the action mode specified by the parameter 'actionMode' to the ExportList.

Parameters:
type - The PIM object type
object - The PIM object
actionMode - The action mode to be used for export of this object.
Throws:
PIMInternalException - if an internal error occurs
java.lang.IllegalArgumentException - If type is null or object is null or actionMode is null or if there is any mismatch between the object type and PIM object
java.lang.UnsupportedOperationException - If type is ExportList.Type.ALERT or ExportList.Type.QUEUE. Use addAllObjects(com.ibm.pim.utils.ExportList.Type, com.ibm.pim.utils.ExportList.ActionMode) to export these objects.
java.lang.IllegalStateException - If the object has not been persisted

Any mismatch between the object type and the PIM object passed in would result in IllegalArgumentException. If the action mode passed in not supported by the type, then an IllegalArgumentException is thrown.

The following list gives the PIM object type to be used for each of the export types
Type PIM Object Supported ActionMode
ExportList.Type.ACCESS_CONTROL_GROUP AccessControlGroup ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE,
ExportList.Type.ATTRIBUTE_COLLECTION AttributeCollection ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.CATALOG Catalog ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.CATALOG_VIEW View ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.COLLABORATION_AREA CollaborationArea ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.COMPANY_ATTRIBUTES Company ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.UPDATE
ExportList.Type.CONTAINER_ACCESS_PRIVILEGE Catalog, Hierarchy ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.DATASOURCE DataSource ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.DESTINATION_SPEC DestinationSpec ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.DISTRIBUTION Distribution ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.DISTRIBUTION_GROUP DistributionGroup ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.DOCUMENT Document ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.EXPORT Export ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.DELETE
ExportList.Type.FEED Import ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.DELETE
ExportList.Type.FILE_SPEC FileSpec ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.HIERARCHY Hierarchy ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.HIERARCHY_MAP HierarchyMap ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.HIERARCHY_VIEW View ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.JOB Job ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.LOOKUP_TABLE LookupTable ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.LOOKUP_TABLE_SPEC LookupSpec ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.MAP SpecMap ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.MY_SETTINGS User ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.UPDATE,
ExportList.Type.ORGANIZATION_HIERARCHY OrganizationHierarchy ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.PRIMARY_SPEC PrimarySpec ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.REPORT Report ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.DELETE
ExportList.Type.ROLE Role ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.ROLE_LOCALE_ACCESS Role ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.SELECTION Selection ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.SCRIPT_INPUT_SPEC ScriptInputSpec ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.SECONDARY_SPEC SecondarySpec ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.SPEC Spec ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.SUB_SPEC SubSpec ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.USER_DEFINED_LOG UserDefinedLog ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.USER User ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE,
ExportList.Type.WEBSERVICE WebService ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE
ExportList.Type.WORKFLOW Workflow ExportList.ActionMode.CREATE_OR_UPDATE, ExportList.ActionMode.CREATE, ExportList.ActionMode.UPDATE, ExportList.ActionMode.DELETE

addContent

void addContent(ExportList.Type type,
                java.lang.Object object)
Adds contents of objects to the ExportList

Parameters:
type - The PIM object type
object - The PIM object
Throws:
PIMInternalException - if an internal error occurs
java.lang.IllegalArgumentException - If type is null or object is null or if there is any mismatch between the object type and PIM object
java.lang.IllegalStateException - If the object has not been persisted

The following list gives the supported Type and its equivalent PIM objects :
Type PIM Object
ExportList.Type.CATALOG_CONTENT Catalog
ExportList.Type.HIERARCHY_CONTENT Hierarchy
ExportList.Type.ORGANIZATION_HIERARCHY_CONTENT OrganizationHierarchy
ExportList.Type.USER_DEFINED_LOG_CONTENT UserDefinedLog
ExportList.Type.LOOKUP_TABLE_CONTENT LookupTable
Any mismatch between the object type and PIM object would result in a IllegalArgumentException.

addAllContents

void addAllContents(ExportList.Type type)
Adds contents of all objects of type specified by parameter 'type' to the export list.

Parameters:
type - The PIM object type
Throws:
PIMInternalException - if an internal error occurs
java.lang.IllegalArgumentException - If type is null or the type is not belongs to the supported Types provided.

The following list gives the supported Types:
Type
ExportList.Type.CATALOG_CONTENT
ExportList.Type.HIERARCHY_CONTENT
ExportList.Type.ORGANIZATION_HIERARCHY_CONTENT
ExportList.Type.USER_DEFINED_LOG_CONTENT
ExportList.Type.LOOKUP_TABLE_CONTENT

getObjectTypes

java.util.Set<ExportList.Type> getObjectTypes()
Returns the type of objects which were added to this ExportList.

Returns:
An Set containing the object types.
Throws:
PIMInternalException - If an internal error occurs.

getRequisites

ExportRequisiteList getRequisites()
Returns the objects that the objects in this export list are dependent on. For example, when a Catalog is added to a newly created export list object and this method is invoked, it returns ExportRequisiteList object which contains objects like Spec, Hierarchy etc... which the Catalog requires for successful creation in a fresh company. User can invoke the methods in ExportRequisiteList interface to retrieve the requisite object details.

For example, user can invoke ExportRequisiteList.getRequisiteObjects(com.ibm.pim.utils.ExportList.Type type) passing ExportList.Type.SPEC as argument to retrieve the Spec objects required for successful creation of the catalog in a fresh company.

Returns:
An ExportRequisiteList
Throws:
PIMInternalException - If an internal error occurs.

addAllRequisites

void addAllRequisites()
Adds all the objects on which the objects in this list are dependent on, to the list. For example, when a Catalog is added to a newly created export list object and addAllRequisites() is invoked, the Spec, Hierarchy and other objects which the Catalog requires for successful creation in a fresh company, shall be added to the export list. This method takes care of the addition of only first level requisite objects.

For example, when the user wants to export Catalog content, which is already added to an export list, invoking this method, will only add the Catalog object to this export list which is the first level of dependency for catalog content export. Hierarchy and Spec which are the requisite objects for Catalog will not be added to the export list. User has to invoke this method again to resolve the next level of dependencies.

Please invoke EnvironmentExporter.export(ExportList exportList, String documentPath, boolean checkForRequisites) to make sure that the Export List contains all the requisite objects.

Throws:
PIMInternalException - If an internal error occurs.

areAllRequisitesMet

boolean areAllRequisitesMet()
Determines whether any object dependency is present for this export list. Before calling getRequisites() method,user can call this method to identify whether any dependency is present with the addition of objects.

Returns:
Return true if there is no object dependency found else false.
Throws:
PIMInternalException - If an internal error occurs.