com.adobe.livecycle.connectorforibmcm.dsc.client.intfcs
Interface CRCIntf


public interface CRCIntf

IBM Content Manager Repository Connector service client interface: This interface contains all methods that can be invoked on the service using the service client


Method Summary
 DocInfo createFolder(LoginSettings loginSettings, String parentFolderPid, String itemType, Map attributeNameValuePair)
          Creates folders in an IBM Content Manager repository.
 DocInfo createItem(LoginSettings loginSettings, String itemType, Document docContent, String mimeType, Map attributeNameValuePair)
          Creates an item or folder in an IBM Content Manager repository.
 RelationInfo createRelationShip(LoginSettings loginSettings, String sourcePid, String targetPid, String relationType, Boolean createRelationType)
          Creates a relationship between two items in an IBM Content Manager repository.
 void deleteItem(LoginSettings loginSettings, String pid, Boolean allVersions)
          Deletes an item or a folder from an IBM CM repository.
 GetLinkedLCAssetsLocationResult getLinkedLCAssetsLocation(LoginSettings loginSettings, String formDataID, String assetLinkObjectRelationship)
          Fetches the form template repository URL in the native repository for a given form data object in an IBM CM repository.
 List getRelatedItems(LoginSettings loginSettings, String pid, String relationType, Boolean isSource)
          Gets a list of related items of given relationType, from an IBM Content Manager repository.
 DocInfo retrieveItem(LoginSettings loginSettings, String pid, String itemType, Map attributeNameValuePair)
          Retrieves an item from an IBM Content Manager repository.
 List searchItems(LoginSettings loginSettings, String itemType, Map attributeNameValuePair)
          Used to search the items in an IBM Content Manager repository, based on item type and item attributes.
 void setLinkToLCAssets(LoginSettings loginSettings, String ECMObjectID, String formTemplatePath, String itemType, String relationshipName, Map attributeNameValuePair)
          Links objects, files, or data in IBM Content Manager to an asset lying in the native repository.
 DocInfo updateItem(LoginSettings loginSettings, String itemType, String pid, Document docContent, String mimeType, Map attributeNameValuePair, Boolean newVersion)
          Updates an item in an IBM Content Manager repository.
 

Method Detail

createItem

DocInfo createItem(LoginSettings loginSettings,
                   String itemType,
                   Document docContent,
                   String mimeType,
                   Map attributeNameValuePair)
                   throws RepositoryException
Creates an item or folder in an IBM Content Manager repository.

Parameters:
loginSettings - Required. Configuration settings required to connect to IBM Content Manager (IBM CM). You can authenticate using:
  • Process Context (In this mode no other details are required from the user)
  • User Credentials (Datastore name, Username, Password, and Alias Connection String)
itemType - Required. Registered Item type in IBM CM.
docContent - Optional. com.adobe.idp.Document object containing data. Can be NULL, if no content is to be set.
mimeType - Required. MIME type of content. It should be pre-created in the IBM CM, otherwise the operation will throw exception. It is mandatory to pass the MIME type if docContent is not NULL. The field is ignored when a folder is created.
attributeNameValuePair - Optional. Attribute-value map of registered IBM CM item types. It is mandatory to pass required attributes.
Returns:
A DocInfo object of the created item.
Throws:
RepositoryException

createFolder

DocInfo createFolder(LoginSettings loginSettings,
                     String parentFolderPid,
                     String itemType,
                     Map attributeNameValuePair)
                     throws RepositoryException
Creates folders in an IBM Content Manager repository.

Parameters:
loginSettings - Required. Configuration settings required to connect to IBM Content Manager (IBM CM). You can authenticate using:
  • Process Context (In this mode no other details are required from the user)
  • User Credentials (Datastore name, Username, Password, and Alias Connection String)
parentFolderPid - Optional. PID of the parent folder. When specified, the newly created folder is linked to the parent folder by DKFolder link type.
itemType - Required. Registered Item type in IBM CM.
attributeNameValuePair - Optional. Attribute-value map of registered IBM CM item types. It is mandatory to provide required attributes.
Returns:
A DocInfo object of the created content.
Throws:
RepositoryException - If the value of parentFolderPid is invalid.
RepositoryException - When IBM CM throws an exception.

updateItem

DocInfo updateItem(LoginSettings loginSettings,
                   String itemType,
                   String pid,
                   Document docContent,
                   String mimeType,
                   Map attributeNameValuePair,
                   Boolean newVersion)
                   throws RepositoryException
Updates an item in an IBM Content Manager repository.

Parameters:
loginSettings - Required. Configuration settings required to connect to IBM Content Manager (IBM CM). You can authenticate using:
  • Process Context (In this mode no other details are required from the user)
  • User Credentials (Datastore name, Username, Password, and Alias Connection String)
itemType - Optional. Registered Item type in IBM CM. This is optional argument, used to retrieve the attributes of the item type in the property sheet. This value is ignored if it is different from the item which is going to be updated.
pid - Required. PID of item to be updated.
docContent - Optional. com.adobe.idp.Document object containing data. Can be NULL if no content is to be set.
mimeType - Required. MIME type of the content. It should be pre-created in the IBM CM, otherwise the operation will throw exception. It is mandatory to pass the mime type if docContent is not NULL.
attributeNameValuePair - Optional. Attribute-value map of registered IBM CM item types. It is mandatory to provide required attributes.
newVersion - Required. true if a new version is to be created.
Returns:
A docInfo object of the updated content.
Throws:
RepositoryException

retrieveItem

DocInfo retrieveItem(LoginSettings loginSettings,
                     String pid,
                     String itemType,
                     Map attributeNameValuePair)
                     throws RepositoryException
Retrieves an item from an IBM Content Manager repository.

Parameters:
loginSettings - Required. Configuration settings required to connect to IBM Content Manager (IBM CM). You can authenticate using:
  • Process Context (In this mode no other details are required from the user)
  • User Credentials (Datastore name, Username, Password, and Alias Connection String)
pid - Required. PID of the item to be retrieved.
itemType - Optional. Registered Item type in IBM CM. This parameter is used to retrieve the attributes of the item type in the property sheet.
attributeNameValuePair - Optional. Attribute-value map of registered IBM CM item type. This parameter is used to fetch a list of values of attributes.
Returns:
A docInfo object of the retrieved item.
Throws:
RepositoryException

searchItems

List searchItems(LoginSettings loginSettings,
                 String itemType,
                 Map attributeNameValuePair)
                 throws RepositoryException
Used to search the items in an IBM Content Manager repository, based on item type and item attributes. This operation only fetches the metadata, and not the content of the matched items. To fetch the content for a particular PID, use the retrieveItem operation.

Parameters:
loginSettings - Required. Configuration settings required to connect to IBM Content Manager (IBM CM). You can authenticate using:
  • Process Context (In this mode no other details are required from the user)
  • User Credentials (Datastore name, Username, Password, and Alias Connection String)
itemType - Required. Registered Item type in IBM CM. Provide the item type to be searched.
attributeNameValuePair - Optional. Attribute-value map of registered IBM CM item type. Search is performed with the attribtuteNameValuePair also.
Returns:
A list of DocInfo objects satisfying the search criteria. If no items match the search criteria, NULL is returned.
Throws:
RepositoryException

createRelationShip

RelationInfo createRelationShip(LoginSettings loginSettings,
                                String sourcePid,
                                String targetPid,
                                String relationType,
                                Boolean createRelationType)
                                throws RepositoryException
Creates a relationship between two items in an IBM Content Manager repository.

Parameters:
loginSettings - Required. Configuration settings required to connect to IBM Content Manager (IBM CM). You can authenticate using:
  • Process Context (In this mode no other details are required from the user)
  • User Credentials (Datastore name, Username, Password, and Alias Connection String)
sourcePid - Required. PID of the source item in the relationship.
targetPid - Required. PID of the target item of the relationship.
relationType - Required. Type of the relationship.
createRelationType - Required. Flag to indicate whether to implicitly create relationship if it does not exist in IBM CM. If the flag is set to false and relationType does not exist, an exception is thrown.
Returns:
A RelationInfo object containing the information about the newly-created relationship.
Throws:
RepositoryException

getRelatedItems

List getRelatedItems(LoginSettings loginSettings,
                     String pid,
                     String relationType,
                     Boolean isSource)
                     throws RepositoryException
Gets a list of related items of given relationType, from an IBM Content Manager repository.

Parameters:
loginSettings - Required. Configuration settings required to connect to IBM Content Manager (IBM CM). You can authenticate using:
  • Process Context (In this mode no other details are required from the user)
  • User Credentials (Datastore name, Username, Password, and Alias Connection String)
pid - Required. PID of the item which is either the source or target of the relationship.
relationType - Required. Name of the relation type.
isSource - Required. Flag that indicates whether the item is the source or target of the relationship. If true, the item is the source of the relationship. If false, the item is the target of relationship.
Returns:
A list of DocInfo objects related to an item.
Throws:
RepositoryException

setLinkToLCAssets

void setLinkToLCAssets(LoginSettings loginSettings,
                       String ECMObjectID,
                       String formTemplatePath,
                       String itemType,
                       String relationshipName,
                       Map attributeNameValuePair)
                       throws RepositoryException
Links objects, files, or data in IBM Content Manager to an asset lying in the native repository. It will create a new object "Asset Link Object" (ALO), if it does not exist (in IBM Content Manager repository) corresponding to the form template URL information (present in the native repository). However, the form template URL path is not cross checked for existence at the time of ALO creation. An ALO does not necessarily represent a form template in the native repository. It means that an ALO object can also be created for any resource lying in native repository. The "webapps-x-adobe-assetlink" MIME-type should pre-exist in IBM Content Server to ensure that ALO creation is successful. Once created, an ALO cannot be modified, and the properties of an ALO object cannot be altered. In this operation, if itemType is left blank, ensure an item type 'AssetObjectType' already exists in the IBM Content Manager server. For details see the itemType field description.

Parameters:
loginSettings - Required. Configuration settings required to connect to IBM Content Manager (IBM CM). You can authenticate using:
  • Process Context (In this mode no other details are required from the user)
  • User Credentials (Datastore name, Username, Password, and Alias Connection String)
ECMObjectID - Optional. The ID of the object in ECM repository. Note: If specified, the object ID should represent an existing object. If not specified, the operation creates an ALO object corresponding to form template path.
formTemplatePath - Required. Form Template URL. (Preferably, path of an XDP in the native repository). This path is not cross-checked for its existence when an ALO is created.
itemType - Required. Item Type of an ALO. An item type used here should have a non-nullable or required string property name 'AssetObjectName'. When no value is specified a default item-Type 'AssetObjectType' is used for ALO creation. In such a scenario, ensure that this default item type exists in the IBM Content Manager server. Similar to a custom item type, 'AssetObjectType' should also have a non-nullable or required string property named 'AssetObjectName' with its 'Maximum Character length' being equal to 1000. For more details on how to create an item type refer to the IBM Content Manager documentation. In case of default item type being used, 'AssetObjectName', by default, is set to the value of the form template path.
relationshipName - Required. Relationship between an ECM object and an ALO. If nothing is specified, assetObjectRelationship is used as the default relationship type.
attributeNameValuePair - Optional. Attribute-value map of registered IBM CM item types. It is mandatory to pass required attributes.
Throws:
RepositoryException - If any of the required parameters are NULL.
RepositoryException - If user credentials cannot be authenticated.
RepositoryException - If the user does not have write permissions to write a new Asset Link Object.
RepositoryException - If an I/O exception occurs during the operation.
RepositoryException - In all other cases when IBM CM throws a run-time error.

getLinkedLCAssetsLocation

GetLinkedLCAssetsLocationResult getLinkedLCAssetsLocation(LoginSettings loginSettings,
                                                          String formDataID,
                                                          String assetLinkObjectRelationship)
                                                          throws RepositoryException
Fetches the form template repository URL in the native repository for a given form data object in an IBM CM repository.

Parameters:
loginSettings - Required. Configuration settings required to connect to IBM Content Manager (IBM CM). You can authenticate using:
  • Process Context (In this mode no other details are required from the user)
  • User Credentials (Datastore name, Username, Password, and Alias Connection String)
formDataID - Required. The ID of the object in an IBM CM repository.
assetLinkObjectRelationship - Optional. Relationship between form data and an ALO. If nothing is specified, assetObjectRelationship is used as the default relationship type.
Returns:
GetLinkedLCAssetsLocationResult object
Throws:
RepositoryException - If any of the required parameters are NULL.
RepositoryException - If user credentials cannot be authenticated.
RepositoryException - If formDataID does not exist.
RepositoryException - If an I/O exception occurs during the operation.
RepositoryException - In all other cases where IBM CM produces a run-time error.

deleteItem

void deleteItem(LoginSettings loginSettings,
                String pid,
                Boolean allVersions)
                throws RepositoryException
Deletes an item or a folder from an IBM CM repository. If a folder is being deleted, this operation does not delete linked sub-folders and documents.

Parameters:
loginSettings - Required. Configuration settings required to connect to IBM Content Manager (IBM CM). You can authenticate using:
  • Process Context (In this mode no other details are required from the user)
  • User Credentials (Datastore name, Username, Password, and Alias Connection String)
pid - Required. PID of the folder or document to be deleted.
allVersions - Required. Flag that specifies what is deleted. If set to true, all versions of the document are deleted. If set to false, only the latest version is deleted. The default value is true.
Throws:
RepositoryException - If any of the required parameters are NULL.
RepositoryException - If user credentials cannot be authenticated.
RepositoryException - If the pid does not exist.
RepositoryException - If an I/O exception occurs during the operation.
RepositoryException - In all other cases where IBM CM produces a run-time error.