Tuesday, November 5, 2013

New and usefull services in WebcenterContent 11.1.1.8

In last version of WebcenterContent (UCM) I found two, new, very usefull services. The first of them is COPY_REVISION service.

The COPY_REVISION service copies one document revision, creating a new rev class from it. As says "Services Reference for Oracle WebCenter Content" most of the document metadata from the original revision will be carried over. The caller can also overwrite any metadata value by setting it in the request parameters.

You can use COPY_REVISION service as shown below:

// Databinder for Creating the clone request

DataBinder dataBinder = idcClient.createBinder();
dataBinder.putLocal("IdcService", "COPY_REVISION");

//Original Content dID and Content Id (dDocname)
dataBinder.putLocal("dID","1001");
dataBinder.putLocal("dDocName","001001");

//clone item Content ID - this is not mandatory - If set to Auto Content ID this need not be added 
//dataBinder.putLocal("newdDocName","Cloned_item");

//The user only needs READ permissions to the original document revision. 
//However, because the new revision inherits the metadata of the original, new security metadata values 
//must be set if the user does not have WRITE permissions to the original revision. By example you can modify group and ACL
dataBinder.putLocal("dSecurityGroup","New_better_group");
dataBinder.putLocal("xClbraUserList","your_user(RW)");

//If the original content is in a Contribution Folder (Folders_g) then below parameter is mandatory - Either blank Collection ID or set a new Folder ID
//In case of Framework Folder this parameter is not needed
dataBinder.putLocal("xCollectionID","1214234324324324");

//Clone Item's Content Title
dataBinder.putLocal("dDocTitle","Title-cloned");

//Any other new / custom metadata for Clone Item
dataBinder.putLocal("Custom","Clone Item Metadata");

Service returns two ResultSets:
  • NewDocInfo: Information about the newly created document.
  • OriginalDocInfo: Information about the original document that was copied.
Next interesting service is RESTORE_REVISION. The service restores the document revision corresponding to the supplied dID as a new (latest) revision.

To call this service you should supply only dID of source revision:


// Databinder for Creating the restore request

DataBinder dataBinder = idcClient.createBinder();
dataBinder.putLocal("IdcService", "RESTORE_REVISION");

//Original Content dID
dataBinder.putLocal("dID","1001");

As the results the service returns:
  • dID: The document ID of the new revision created.
  • dDocName: The document name of the new revision created.
  • dDocTitle: The document title of the new revision created.

1 comment:

  1. More information on COPY_REVISION can be found here: https://jonathanhult.com/blog/2013/04/clone-content-webcenter-content-11g/

    ReplyDelete