Skip Headers
Oracle® Fusion Middleware Services Reference for Oracle WebCenter Content
11g Release 1 (11.1.1)

Part Number E11011-05
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

12 Folios Services

This chapter describes the Oracle WebCenter Content services available when using and customizing the Folios component.

This chapter covers the following topics:

12.1 About Folios Services

Information about what is a WebCenter Content service and how services can be used is provided in Section 2, "Using Services." Information about basic services structure, attributes, actions, and a service example is provided in Section 3, "Customizing Services." You should be familiar with this information before customizing current services or creating new services

The locations for specific Folios services are listed within each individual service.

For more information about Folios, see Oracle Fusion Middleware Managing Oracle WebCenter Content.

Note:

The most commonly used services have more extensive descriptions.

12.2 Folio Services

The following services are described in this section:

12.2.1 LOAD_FOLIO_NODE

Service that displays the contents of a folio node by returning the nodes, slots and links that are the immediate children of the requested node. By default this service is not recursive; if called recursively, this service returns a complete folio.

Location: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm

Additional Required Service Parameters

  • dID: The content ID of the folio.

  • RevisionSelectionMethod: Tells the Content Server instance whether to use retrieved information based on the latest revision, which could be in an unreleased state, or the latest released version. The value can be: Specific, Latest (which could be unreleased), or Latest Released.

Optional Service Parameter

  • parentNodeId: Retrieves details, but not the properties, of the contents of the specified node within a folio. If this parameter is omitted, by default the service retrieves the root node and its properties.

Example 1

http://myserver/idc/idcplg?IdcService=LOAD_FOLIO_NODE&dID=68095
&RevisionSelectionMethod=Specific

Example 2

http://myserver/idc/idcplg?IdcService=LOAD_FOLIO_NODE&dID=68095
&RevisionSelectionMethod=Specific&parentNodeId=E176-3B00-1D2A-A592-E0CF

12.2.2 UPDATE_FOLIO

Service that adds one or more content items to a folio and modifies a folio. Multiple changes can be requested as part of a single service call.

Prerequisite: Before an item can be added to a folio, the item must be checked in to the Content Server instance using the standard CHECKIN_NEW or CHECKIN_UNIVERSAL services.

Location: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm

Additional Required Service Parameters

  • NumChanges: Specifies the number of changes or updates passed as part of the service call. For example, to pass two changes, NumChanges=2.

  • change(n-1): Specifies the actual change to be made to the folio. The default is one change, which is indicated by change() or change0. If there are multiple changes to the folio, as indicated by NumChanges, then a parameter must be passed for each change. For example, if NumChanges=3, then change(), change1, and change2.

    Note:

    For each change(n-1) parameter, you must use a change_data(n-1) parameter. For example, if you specify a change1 parameter you must also specify a change_data1 parameter.

    The value for the change(n-1) parameter must be in the following format: dID:Operation:TargetGUID:ParentGUID

    • dID: The dID of the folio to be updated.

    • Operation: One of the following choices:

      • removeNode: remove a node

      • addNode: add a node

      • addItem: add a slot

      • addContent: add an actual file

      • removeContent: remove a content item

      • modifyAttribute: modify a property

      • modifyTemplateAttribute: modify a template property

    • TargetGUID: The GUID of the node, slot, or content item in the folio to be modified.

    • ParentGUID: The parent GUID of the mode, slot, or content item to be modified. This is relevant for only some of the operations, such as addNode.

  • change_data(n-1): Specifies the values for the operation specified in the change(n-1) parameter. The format for this parameter is name:value pairs separated by commas. A carat (^) can be used as a separator if a colon (:) is required in any of the names or values (name:name^value).

    When adding content these properties must be specified:

    • dDocAuthor

    • dDocName

    • dDocName_encoded

    • dDocTitle

    • dDocType

    • dFormat

    • dID

    • docURL

    • docURL_encoded

    • dOriginalName

    • dRevLabel

    Property information can be retrieved using a DOC_INFO service call against the item you want to add to a folio. You must provide the information for the dDocName_encoded, docURL, and docURL_encoded properties. You can specify custom properties that you add to the folio definition as XCST or XCSD data.

Example 1

To add a new content item to an existing content folio, you must define two changes. The first change operation is to specify addItem, which will add a slot. The second change operation is to specify addContent, which will insert the document into the slot. For both changes, the change_data parameter must specify the content properties. The xcsd^name and xcst^name designation for the properties also must be specified.

IdcService=UPDATE_FOLIO
NumChanges=2
dDocName=OCS_223948
RevisionSelectionMethod=Latest
change0=8611:addItem:4952-6EBE-1275-0A59-0D19:F5C4-A3D0-E671-D4CF-9C28
change_data0=xcsd^dFormat:application/vnd.ms-excel,id:4952-6EBE-1275-0A59-0D19,
xcsd^dID:18251,xcsd^dDocTitle:Next Year Goals,xcsd^dDocType:Document,xcsd^dRendition1:T,
xcsd^dRevLabel:3,xcsd^dOriginalName:Next Year Goals.xls,xcsd^dDocAuthor:weblogic,
xcsd^docURL:/cs/groups/Secure/documents/Document/OCS_158654.xls,xcsd^dDocName_encoded:OCS_158654,
xcsd^docURL_encoded:%2Fcs%2Fgroups%2FSecure%2Fdocuments%2FDocument%2FEOCS_158654.xls,
xcst^name:Next Year Goals,xcst^description:
change1=8611:addContent:4952-6EBE-1275-0A59-0D19
change_data1=xcsd^dFormat:application/vnd.ms-excel,id:4952-6EBE-1275-0A59-0D19,
xcsd^dDocName:OCS_158654,xcsd^dID:18251,xcsd^dDocTitle:Next Year Goals,xcsd^dDocType:Document,
xcsd^dRendition1:T,xcsd^dRevLabel:3,xcsd^dOriginalName:Next Year Goals.xls,
xcsd^dDocAuthor:weblogic,xcsd^docURL:/cs/groups/Secure/documents/Document/OCS_158654.xls,
xcsd^dDocName_encoded:OCS_158654,
xcsd^docURL_encoded:%2Fcs%2Fgroups%2FSecure%2Fdocuments%2FDocument%2FEOCS_158654.xls,
xcst^name:Next Year Goals,xcst^description:

Example 2

To add a new content item to an existing folio as part of RIDC code:

// Start a new client connection to UCM
IdcClientManager manager = new IdcClientManager();
// build a client that will communicate using the intradoc protocol
IdcClient idcClient = manager.createClient("idc://localhost:4444");

// create a trusted user connection to UCM
IdcContext userContext = new IdcContext("weblogic");

// create the binder for the set of GUIDs needed later on
DataBinder guidBinder = idcClient.createBinder();
// populate the binder with the parameters
guidBinder.putLocal("IdcService", "GENERATE_GUIDS");

// send the request and get the response back from local data and result set
ServiceResponse guidResponse = idcClient.sendRequest(userContext, guidBinder);
DataBinder folderData = guidResponse.getResponseAsBinder ();
DataResultSet guidResults = folderData.getResultSet ("GUID_SET");

// put the set of GUIDs in an array
String guids[] = new String[25];
int n = 0;
for (DataObject dataObject : guidResults.getRows ()) {
      guids[n] = dataObject.get("id");
}

// create the binder to get the content information of the document to add
DataBinder docInfoBinder = idcClient.createBinder();
// populate the binder with the parameters
docInfoBinder.putLocal("IdcService", "DOC_INFO_BY_NAME");
docInfoBinder.putLocal("dDocName", "OCS_158654");

// send the request and get the response back from local data and result set
ServiceResponse infoResponse = idcClient.sendRequest(userContext, docInfoBinder);
DataBinder infoData = infoResponse.getResponseAsBinder ();
DataResultSet docInfoResults = infoData.getResultSet ("DOC_INFO");

// create the binder to get the content information of the folio to update
DataBinder folioInfoBinder = idcClient.createBinder();
 // populate the binder with the parameters
folioInfoBinder.putLocal("IdcService", "DOC_INFO_BY_NAME");
folioInfoBinder.putLocal("dDocName", "OCS_223948);

// send the request and get the response back from local data and result set
ServiceResponse folioInfoResponse = idcClient.sendRequest(userContext, folioInfoBinder);
DataBinder folioInfoData = folioInfoResponse.getResponseAsBinder ();
ataResultSet folioInfoResults = folioInfoData.getResultSet ("DOC_INFO");
String foliodID = folioInfoData.getLocal("dID");

// build the change data string for the content
String newItemStr = "";
for (DataObject dataObject : docInfoResults.getRows ()) {
// build the path to the document
String urlStr = "/cs/groups/" + dataObject.get ("dSecurityGroup") + "/documents/" + dataObject.get ("dDocType") + "/" + dataObject.get ("dDocName") + "." + dataObject.get ("dWebExtension");
// assemble the string with the parameters needed for the content folio service change string
newItemStr = "xcsd^dFormat:" + dataObject.get ("dFormat") + ",";
newItemStr += "id:" + guids[0] + ",";
newItemStr += "xcsd^dDocName:" + dataObject.get ("dDocName") + ",";
newItemStr += "xcsd^dID:" + dataObject.get ("dID") + ",";
newItemStr += "xcsd^dDocTitle:" + dataObject.get ("dDocTitle") + ",";
newItemStr += "xcsd^dDocType:" + dataObject.get ("dDocType") + ",";
newItemStr += "xcsd^dRendition1:" + dataObject.get ("dRendition1") + ",";
newItemStr += "xcsd^dRevLabel:" + dataObject.get ("dRevLabel") + ",";
newItemStr += "xcsd^dOriginalName:" + dataObject.get ("dOriginalName") + ",";
newItemStr += "xcsd^dDocAuthor:" + dataObject.get ("dDocAuthor") + ",";
newItemStr += "xcsd^docURL:" + urlStr + ",";
newItemStr += "xcsd^dDocName_encoded:" + java.net.URLEncoder.encode(dataObject.get ("dDocName"), "UTF-8") + ",";
newItemStr += "xcsd^docURL_encoded:" + java.net.URLEncoder.encode(urlStr, "UTF-8") + ",";
newItemStr += "xcst^name:" + dataObject.get ("dDocTitle") + ",";
newItemStr += "xcst^description:";
}

// create the binder to get the folio root GUID
DataBinder rootBinder = idcClient.createBinder();
// populate the binder with the parameters
rootBinder.putLocal("IdcService", "LOAD_FOLIO_NODE");
rootBinder.putLocal("dDocName", folioName);
rootBinder.putLocal("RevisionSelectionMethod", "Latest");

// send the request and get the response back from local data
ServiceResponse rootGUIDResponse = idcClient.sendRequest(userContext, rootBinder);
DataBinder rootGUIDData = rootGUIDResponse.getResponseAsBinder ();
String rootGUID = rootGUIDData.getLocal("RootNode");

// assemble the first change parameter for the service.  This will tell the content folio service 
// to add a slot
String change0 = foliodID + ":addItem:" + guids[0] + ":" + rootGUID;

// assemble the second change parameter for the service.  This will tell the content folio service 
// to add a content item to the new slot
String change1 = foliodID + ":addContent:" + guids[0];

// create the binder to run the UPDATE_FOLIO service
DataBinder folioBinder = idcClient.createBinder();
// populate the binder with the parameters
folioBinder.putLocal("IdcService", "UPDATE_FOLIO");
folioBinder.putLocal("dDocName", folioName)
folioBinder.putLocal("RevisionSelectionMethod", "Latest");
folioBinder.putLocal("NumChanges", "2");
folioBinder.putLocal("change0", change0);
folioBinder.putLocal("change_data0", newItemStr);
folioBinder.putLocal("change1", change1);
folioBinder.putLocal("change_data1", newItemStr);

// send the request and get the response back from local data
ServiceResponse folioResponse = idcClient.sendRequest(userContext, folioBinder);
DataBinder folioData = folioResponse.getResponseAsBinder ();

12.2.3 CHECKIN_NEW_FOLIO

Service that creates and checks in a new folio with a root node.

Location: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm

Optional Service Parameters

  • This service can use standard metadata parameters, such as dDocName, dDocTitle, and so forth. Any other metadata required by parameters used in this service must also be specified.

  • If auto-generation of content ID is set on the server and you do not specify the dDocName parameter, then a new content ID is automatically generated.

  • The dID of the new folio is listed in the LocalData section of the service response.

Example

http://myserver/xpedio/icdplg?IdcServer=CHECKIN_NEW_FOLIO
&dDocName=myFolioTest&dDocTitle=MyFolioAPITest2&dDocType=TestData
&dDocAuthor=authorname&dSecurityGropu=Public&IsJava=1

12.2.4 CREATE_FOLIO_SNAPSHOT

Service that takes a version of a folio and creates a locked version and a new version.

Location: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm

Additional Required Service Parameters

  • dID: The content ID of the folio.

  • RevisionSelectionMethod: Tells the Content Server instance whether to use retrieved information based on the latest revision, which could be in an unreleased state, or the latest released version. The value can be: Specific, Latest (which could be unreleased), or Latest Released.

Example

http://myserver/idc/idcplg?IdcService=CREATE_FOLIO_SNAPSHOT&dID=68095
&RevisionSelectionMethod=Specific

12.2.5 LOCK_FOLIO

Service that locks a folio so that it can not be edited, only viewed. No further modifications are allowed on this content item.

Location: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm

Additional Required Service Parameters

  • dID: The content ID of the folio.

  • RevisionSelectionMethod: Tells the Content Server instance whether to use retrieve information based on the latest revision, which could be in an unreleased state, or the latest released version. The value can be: Specific, Latest (which could be unreleased), or Latest Released.

Example

http://myserver/idc/idcplg?IdcService=LOCK_FOLIO&dID=68095&RevisionSelectionMethod=Specific

12.2.6 UNLOCK_FOLIO

Service that creates a new version of a locked folio, where the new version of the folio can be edited.

Location: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm

Additional Required Service Parameters

  • dID: The content ID of the folio.

  • RevisionSelectionMethod: Tells the Content Server instance whether to use retrieve information based on the latest revision, which could be in an unreleased state, or the latest released version. The value can be: Specific, Latest (which could be unreleased), or Latest Released.

Example

http://myserver/idc/idcplg?IdcService=UNLOCK_FOLIO&dID=68095&RevisionSelectionMethod=Specific

12.2.7 CREATE_FOLIO_RENDITION

Service that returns a specific rendition of a folio revision to a browser. A copy of the folio is retrieved without performing a checkout.

Location: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm

Additional Required Service Parameters

  • dID: The content ID of the folio.

  • RenderID: The type of rendition: PDF, ZIP, XML. A custom rendition can be used.

Example

http://myserver/idc/idcplg?IdcService=CREATE_FOLIO_RENDITION&dID=68095&RenditionID=PDF

12.2.8 GENERATE_GUIDS

Service that generates and returns 25 group user IDs for use.

Location: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm

Example

http://myserver/expedio/idcplg?IdcService=GENERATE_GUIDS&IsJava=1