com.adobe.livecycle.connectorforibmcm.dsc.client
Class CRCServiceClient

java.lang.Object
  extended by com.adobe.livecycle.connectorforibmcm.dsc.client.CRCServiceClient
All Implemented Interfaces:
CRCIntf

public class CRCServiceClient
extends java.lang.Object
implements CRCIntf


Constructor Summary
CRCServiceClient(ServiceClientFactory serviceFactory)
          Create a CRCServiceClient using the given service factory
 
Method Summary
 DocInfo createFolder(LoginSettings loginSettings, java.lang.String parentFolderPid, java.lang.String itemType, java.util.Map attributeNameValuePair)
          Creates folders in an IBM Content Manager repository.
 DocInfo createItem(LoginSettings loginSettings, java.lang.String itemType, Document docContent, java.lang.String mimeType, java.util.Map attributeNameValuePair)
          Creates an item or folder in an IBM Content Manager repository.
 DocInfo createItem2(LoginSettings loginSettings, java.lang.String itemType, Document docContent, java.lang.String mimeType, DocumentPartType documentPartType, java.util.Map attributeNameValuePair)
          Creates an item or folder in an IBM Content Manager repository.
 RelationInfo createRelationShip(LoginSettings loginSettings, java.lang.String sourcePid, java.lang.String targetPid, java.lang.String relationType, java.lang.Boolean createRelationType)
          Creates a relationship between two items in an IBM Content Manager repository.
 void deleteItem(LoginSettings loginSettings, java.lang.String pid, java.lang.Boolean allVersions)
          Deletes an item or a folder from an IBM CM repository.
 GetLinkedLCAssetsLocationResult getLinkedLCAssetsLocation(LoginSettings loginSettings, java.lang.String formDataID, java.lang.String assetLinkObjectRelationship)
          Fetches the form template repository URL in the native repository for a given form data object in an IBM CM repository.
 java.util.List getRelatedItems(LoginSettings loginSettings, java.lang.String pid, java.lang.String relationType, java.lang.Boolean isSource)
          Gets a list of related items of given relationType, from an IBM Content Manager repository.
 DocInfo retrieveItem(LoginSettings loginSettings, java.lang.String pid, java.lang.String itemType, java.util.Map attributeNameValuePair)
          Retrieves an item from an IBM Content Manager repository.
 java.util.List searchItems(LoginSettings loginSettings, java.lang.String itemType, java.util.Map attributeNameValuePair)
          Used to search the items in an IBM Content Manager repository, based on item type and item attributes.
 void setLinkToLCAssets(LoginSettings loginSettings, java.lang.String ECMObjectID, java.lang.String formTemplatePath, java.lang.String itemType, java.lang.String relationshipName, java.util.Map attributeNameValuePair)
          Links objects, files, or data in IBM Content Manager to an asset lying in the native repository.
 DocInfo updateItem(LoginSettings loginSettings, java.lang.String itemType, java.lang.String pid, Document docContent, java.lang.String mimeType, java.util.Map attributeNameValuePair, java.lang.Boolean newVersion)
          Updates an item in an IBM Content Manager repository.
 DocInfo updateItem2(LoginSettings loginSettings, java.lang.String itemType, java.lang.String pid, Document docContent, java.lang.String mimeType, DocumentPartType documentPartType, java.util.Map attributeNameValuePair, java.lang.Boolean newVersion)
          Updates an item in an IBM Content Manager repository.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CRCServiceClient

public CRCServiceClient(ServiceClientFactory serviceFactory)
Create a CRCServiceClient using the given service factory

Parameters:
serviceFactory - A ServiceClientFactory that contains connection properties. For information about connection properties, see Invoking LiveCycle Services.
Method Detail

createItem

public DocInfo createItem(LoginSettings loginSettings,
                          java.lang.String itemType,
                          Document docContent,
                          java.lang.String mimeType,
                          java.util.Map attributeNameValuePair)
                   throws RepositoryException
Description copied from interface: CRCIntf
Creates an item or folder in an IBM Content Manager repository.

Specified by:
createItem in interface CRCIntf
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
See Also:
com.adobe.livecycle.connectorforibmcm.dsc.client.intfcs.CRCIntf#createItem(com.adobe.livecycle.connectorforibmcm.dsc.client.LoginSettings, java.lang.String, java.util.List, java.util.Map)

createItem2

public DocInfo createItem2(LoginSettings loginSettings,
                           java.lang.String itemType,
                           Document docContent,
                           java.lang.String mimeType,
                           DocumentPartType documentPartType,
                           java.util.Map attributeNameValuePair)
                    throws RepositoryException
Description copied from interface: CRCIntf
Creates an item or folder in an IBM Content Manager repository.

Specified by:
createItem2 in interface CRCIntf
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.
documentPartType - the document part type to be used to create the item
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
See Also:
com.adobe.livecycle.connectorforibmcm.dsc.client.intfcs.CRCIntf#createItem2(com.adobe.livecycle.connectorforibmcm.dsc.client.LoginSettings, java.lang.String, com.adobe.livecycle.connectorforibmcm.dsc.client.type.DocumentPartType, java.util.List, java.util.Map)

createFolder

public DocInfo createFolder(LoginSettings loginSettings,
                            java.lang.String parentFolderPid,
                            java.lang.String itemType,
                            java.util.Map attributeNameValuePair)
                     throws RepositoryException
Description copied from interface: CRCIntf
Creates folders in an IBM Content Manager repository.

Specified by:
createFolder in interface CRCIntf
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.
See Also:
CRCIntf.createFolder(com.adobe.livecycle.connectorforibmcm.dsc.client.LoginSettings, java.lang.String, java.lang.String, java.util.Map)

updateItem

public DocInfo updateItem(LoginSettings loginSettings,
                          java.lang.String itemType,
                          java.lang.String pid,
                          Document docContent,
                          java.lang.String mimeType,
                          java.util.Map attributeNameValuePair,
                          java.lang.Boolean newVersion)
                   throws RepositoryException
Description copied from interface: CRCIntf
Updates an item in an IBM Content Manager repository.

Specified by:
updateItem in interface CRCIntf
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
See Also:
com.adobe.livecycle.connectorforibmcm.dsc.client.intfcs.CRCIntf#updateItem(com.adobe.livecycle.connectorforibmcm.dsc.client.LoginSettings, java.lang.String, java.util.List, java.util.Map, java.lang.Boolean)

updateItem2

public DocInfo updateItem2(LoginSettings loginSettings,
                           java.lang.String itemType,
                           java.lang.String pid,
                           Document docContent,
                           java.lang.String mimeType,
                           DocumentPartType documentPartType,
                           java.util.Map attributeNameValuePair,
                           java.lang.Boolean newVersion)
                    throws RepositoryException
Description copied from interface: CRCIntf
Updates an item in an IBM Content Manager repository.

Specified by:
updateItem2 in interface CRCIntf
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.
documentPartType - the document part type to be used to update the item
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
See Also:
com.adobe.livecycle.connectorforibmcm.dsc.client.intfcs.CRCIntf#updateItem(com.adobe.livecycle.connectorforibmcm.dsc.client.LoginSettings, java.lang.String, com.adobe.livecycle.connectorforibmcm.dsc.client.type.DocumentPartType, java.util.List, java.util.Map, java.lang.Boolean)

retrieveItem

public DocInfo retrieveItem(LoginSettings loginSettings,
                            java.lang.String pid,
                            java.lang.String itemType,
                            java.util.Map attributeNameValuePair)
                     throws RepositoryException
Description copied from interface: CRCIntf
Retrieves an item from an IBM Content Manager repository.

Specified by:
retrieveItem in interface CRCIntf
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
See Also:
com.adobe.livecycle.connectorforibmcm.dsc.client.intfcs.CRCIntf#retrieveItem(com.adobe.livecycle.connectorforibmcm.dsc.client.LoginSettings, java.lang.String)

searchItems

public java.util.List searchItems(LoginSettings loginSettings,
                                  java.lang.String itemType,
                                  java.util.Map attributeNameValuePair)
                           throws RepositoryException
Description copied from interface: CRCIntf
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.

Specified by:
searchItems in interface CRCIntf
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
See Also:
com.adobe.livecycle.connectorforibmcm.dsc.client.intfcs.CRCIntf#searchItems(PATExecutionContext, LoginSettings, String, Map)

createRelationShip

public RelationInfo createRelationShip(LoginSettings loginSettings,
                                       java.lang.String sourcePid,
                                       java.lang.String targetPid,
                                       java.lang.String relationType,
                                       java.lang.Boolean createRelationType)
                                throws RepositoryException
Description copied from interface: CRCIntf
Creates a relationship between two items in an IBM Content Manager repository.

Specified by:
createRelationShip in interface CRCIntf
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
See Also:
CRCIntf.createRelationShip(LoginSettings, String, String, String, Boolean)

getRelatedItems

public java.util.List getRelatedItems(LoginSettings loginSettings,
                                      java.lang.String pid,
                                      java.lang.String relationType,
                                      java.lang.Boolean isSource)
                               throws RepositoryException
Description copied from interface: CRCIntf
Gets a list of related items of given relationType, from an IBM Content Manager repository.

Specified by:
getRelatedItems in interface CRCIntf
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
See Also:
CRCIntf.getRelatedItems(LoginSettings, String, String, Boolean)

setLinkToLCAssets

public void setLinkToLCAssets(LoginSettings loginSettings,
                              java.lang.String ECMObjectID,
                              java.lang.String formTemplatePath,
                              java.lang.String itemType,
                              java.lang.String relationshipName,
                              java.util.Map attributeNameValuePair)
                       throws RepositoryException
Description copied from interface: CRCIntf
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.

Specified by:
setLinkToLCAssets in interface CRCIntf
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.
See Also:
com.adobe.livecycle.connectorforibmcm.dsc.client.intfcs.CRCIntf#setLinkToLCAssets(LoginSettings, String, String, String, String, Map)

getLinkedLCAssetsLocation

public GetLinkedLCAssetsLocationResult getLinkedLCAssetsLocation(LoginSettings loginSettings,
                                                                 java.lang.String formDataID,
                                                                 java.lang.String assetLinkObjectRelationship)
                                                          throws RepositoryException
Description copied from interface: CRCIntf
Fetches the form template repository URL in the native repository for a given form data object in an IBM CM repository.

Specified by:
getLinkedLCAssetsLocation in interface CRCIntf
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.
See Also:
CRCIntf.getLinkedLCAssetsLocation(LoginSettings, String, String)

deleteItem

public void deleteItem(LoginSettings loginSettings,
                       java.lang.String pid,
                       java.lang.Boolean allVersions)
                throws RepositoryException
Description copied from interface: CRCIntf
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.

Specified by:
deleteItem in interface CRCIntf
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.
See Also:
CRCIntf.deleteItem(com.adobe.livecycle.connectorforibmcm.dsc.client.LoginSettings, java.lang.String, java.lang.Boolean)