com.adobe.icc.services.api
Interface DataModuleService


public interface DataModuleService

Service interface for DataModule specific operations.


Method Summary
 DataModule activateDataModule(String dataModuleID, boolean updateDependencies)
          Activate the DataModule identified by the given dataModuleID.
 DataModule copyDataModule(String oldDMID, DataModule newDM)
          Create a copy of the DataModule identified by the oldDMID.
 DataModule createDataModule(DataModule dm)
          Create a new DataModule object.
 DataModule createTestDataModule(String dataModuleID)
          Deprecated.  
 boolean dataModuleExists(String dataModuleName)
          Check if a DataModule exists by the given name.
 void deleteDataModule(String dataModuleID)
          Delete the DataModule identified by the given dataModuleID.
 List getAllDataModules(Query query)
          List all DataModules filtered by the given Query.
 DataModule getDataModule(String dmID)
          Fetch the DataModule identified by the given dmID.
 List getDependentDataModules(String moduleID)
          Retrieve the list of other DataModules (directly) dependent on the DataModule identified by the given moduleID.
 List getDependentDataModules(String moduleID, boolean fetchIndirectReferences)
          Retrieve the list of other DataModules dependent on the DataModule identified by the given moduleID.
 List getDependentLetters(String moduleID)
          Retrieve the list of Letters (directly) dependent on the DataModule identified by the given moduleID.
 List getDependentLetters(String moduleID, boolean fetchIndirectReferences)
          Retrieve the list of Letters dependent on the DataModule identified by the given moduleID.
 List getUsedDataModules(String moduleID, boolean fetchIndirectReferences)
          Retrieve the list of other DataModules that is used by the DataModule identified by the given moduleID.
 boolean isReferenced(String moduleID)
          Check if this data module is being referenced by any other asset (Letter/DataModule).
 DataModule updateDataModule(DataModule dm)
          Update the given DataModule.
 boolean updateDependencies(DataModule oldModule, DataModule newModule)
          Update the references of the old data module oldModule, in any dependent assets, with the new data module newModule.
 

Method Detail

dataModuleExists

boolean dataModuleExists(String dataModuleName)
                         throws ICCException
Check if a DataModule exists by the given name.

Parameters:
dataModuleName - Name of the DataModule.
Returns:
true if exists, false otherwise.
Throws:
ICCException

createDataModule

DataModule createDataModule(DataModule dm)
                            throws ICCException
Create a new DataModule object.

Parameters:
dm - The DataModule to be created.
Returns:
created DataModule object
Throws:
ICCException

createTestDataModule

DataModule createTestDataModule(String dataModuleID)
                                throws ICCException
Deprecated. 

Create Test/Inactive version of DataModule object.

Parameters:
dataModuleID - ID of the DataModule whose Inactive version is to be created.
Returns:
created Test/Inactive version DataModule object.
Throws:
ICCException

activateDataModule

DataModule activateDataModule(String dataModuleID,
                              boolean updateDependencies)
                              throws ICCException
Activate the DataModule identified by the given dataModuleID.

Parameters:
dataModuleID - ID of the DataModule.
updateDependencies - Whether to set this new activated version in the dependencies.
Returns:
activated DataModule object
Throws:
ICCException

deleteDataModule

void deleteDataModule(String dataModuleID)
                      throws ICCException
Delete the DataModule identified by the given dataModuleID.

Parameters:
dataModuleID - ID of the DataModule.
Throws:
ICCException

getAllDataModules

List getAllDataModules(Query query)
                       throws ICCException
List all DataModules filtered by the given Query.

Parameters:
query - Query to select data modules (supports only first level attributes/properties of an object).
The "attributeName" used in the Statement object should be the name of the property in the object (DataModule object, in this case).
Returns:
List of DataModule objects.
Throws:
ICCException
See Also:
Statement} and {@link Query}.

updateDataModule

DataModule updateDataModule(DataModule dm)
                            throws ICCException
Update the given DataModule.

Parameters:
dm - DataModule object to be updated.
Returns:
updated DataModule object.
Throws:
ICCException

getDataModule

DataModule getDataModule(String dmID)
                         throws ICCException
Fetch the DataModule identified by the given dmID.

Parameters:
dmID - ID of the DataModule to be fetched.
Returns:
the DataModule identified by the given dmID.
Throws:
ICCException

copyDataModule

DataModule copyDataModule(String oldDMID,
                          DataModule newDM)
                          throws ICCException
Create a copy of the DataModule identified by the oldDMID.

If the incoming Data module newDM does not have content in it, the content of the original module is set in it.

Parameters:
oldDMID - ID of the original DataModule. Used to fetch the original content, if need be.
newDM - copy of the original Data Module (may have properties altered by the user)
Returns:
Created copy of the DataModule.
Throws:
ICCException

getDependentLetters

List getDependentLetters(String moduleID)
                         throws ICCException
Retrieve the list of Letters (directly) dependent on the DataModule identified by the given moduleID.
It is recommended to use the alternate API DataModuleService.getDependentLetters(String, boolean)

Parameters:
moduleID - ID of the DataModule whose dependencies are to be fetched.
Returns:
List of Letters which depend on the given DataModule.
Throws:
ICCException
See Also:
DataModuleService.getDependentLetters(String, boolean)

getDependentLetters

List getDependentLetters(String moduleID,
                         boolean fetchIndirectReferences)
                         throws ICCException
Retrieve the list of Letters dependent on the DataModule identified by the given moduleID.

Parameters:
moduleID - ID of the DataModule whose dependencies are to be fetched.
fetchIndirectReferences - True, if you wish to fetch the Letters that directly or indirectly use this module.
For example, if a Letter L1 uses a Text T1; and another Letter L2 uses List L1, which in turn uses Text T1, then the List returned would contain (L1 and L2), for the Text T1. If False, the List returned would contain only L1. (L1 and C1). If false, the List would contain only L1.
Returns:
List of Letters which depend on the given DataModule.
Throws:
ICCException

getDependentDataModules

List getDependentDataModules(String moduleID)
                             throws ICCException
Retrieve the list of other DataModules (directly) dependent on the DataModule identified by the given moduleID.
It is recommended to use the alternate API DataModuleService.getDependentDataModules(String, boolean)

Parameters:
moduleID - ID of the DataModule whose dependencies are to be fetched.
Returns:
List of other DataModules dependent on the DataModule.
Throws:
ICCException
See Also:
DataModuleService.getDependentDataModules(String, boolean)

getDependentDataModules

List getDependentDataModules(String moduleID,
                             boolean fetchIndirectReferences)
                             throws ICCException
Retrieve the list of other DataModules dependent on the DataModule identified by the given moduleID.

Parameters:
moduleID - ID of the DataModule whose dependencies are to be fetched.
fetchIndirectReferences - True, if you wish to fetch the modules that directly or indirectly use this module.
For example, if a Text T1 is used in a List L1, and List L1 is used in Condition C1, the List would contain (L1 and C1), for the Text T1. If false, the List would contain only L1.
Returns:
List of other DataModules dependent on the DataModule.
Throws:
ICCException

getUsedDataModules

List getUsedDataModules(String moduleID,
                        boolean fetchIndirectReferences)
                        throws ICCException
Retrieve the list of other DataModules that is used by the DataModule identified by the given moduleID.

Parameters:
moduleID - ID of the DataModule, for which the used modules are to be fetched.
fetchIndirectReferences - True, if you wish to fetch the modules that are directly or indirectly used by this module.
For example, if a Text T1 is used in a List L1, and List L1 is used in Condition C1, the List would contain (T1 and L1), for the Condition C1. If false, the List would contain only L1.
Returns:
List of other DataModules that is used by the DataModule. Empty list returned, if the module does not use any other module.
Throws:
ICCException

isReferenced

boolean isReferenced(String moduleID)
                     throws ICCException
Check if this data module is being referenced by any other asset (Letter/DataModule).

Parameters:
moduleID - ID of the DataModule whose dependencies are to be fetched.
Returns:
True, if the Data Module is being referenced, False otherwise.
Throws:
ICCException

updateDependencies

boolean updateDependencies(DataModule oldModule,
                           DataModule newModule)
                           throws ICCException
Update the references of the old data module oldModule, in any dependent assets, with the new data module newModule.

Parameters:
oldModule - The old data module object.
newModule - The new data module object, which should be set as the new reference.
Returns:
True if the operation succeeds, False otherwise.
Throws:
ICCException