| Oracle® Fusion Middleware Oracle WebCenter Contentサービス・リファレンス 11gリリース1 (11.1.1) B72418-01 |
|
![]() 前 |
![]() 次 |
この章では、フォリオ・コンポーネントの使用時およびカスタマイズ時に利用可能なOracle WebCenter Contentサービスについて説明します。
この章の内容は、次のとおりです。
WebCenter Contentサービスの内容およびサービスの使用方法に関する情報は、第2章「サービスの使用」で説明されています。基本的なサービスの構造、属性、アクションおよびサービスの例に関する情報は、第3章「サービスのカスタマイズ」で説明されています。現在のサービスをカスタマイズするか、新しいサービスを作成する前に、この情報に精通しておく必要があります
個々のフォリオ・サービスの場所は、それぞれのサービスの説明の中で示します。
フォリオの詳細は、『Oracle Fusion Middleware Oracle WebCenter Contentのマネージング』を参照してください。
|
注意: 最も一般的に使用されるサービスには、より広範囲な説明があります。 |
この項では、次のサービスについて説明します。
リクエストされたノードの直下の子であるノード、スロットおよびリンクを返すことによて、フォリオ・ノードのコンテンツを表示するサービス。デフォルトでは、このサービスは再帰的ではありません。再帰的にコールされた場合、このサービスは完全なフォリオを返します。
場所: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm
追加の必須サービス・パラメータ
dID: フォリオのコンテンツID。
RevisionSelectionMethod: 取得した情報を最新のリビジョンに基づいて使用するか、最新リリースのバージョンに基づいて使用するかをContent Serverインスタンスに指示します。最新のリビジョンの場合、未リリースの状態であることがあります。値は、Specific、Latest (未リリースの場合があります)またはLatest Releasedです。
オプションのサービス・パラメータ
parentNodeId: フォリオ内の指定したノードのコンテンツの詳細を取得します。プロパティは取得されません。このパラメータを省略すると、デフォルトで、ルート・ノードとそのプロパティが取得されます。
例1
http://myserver/idc/idcplg?IdcService=LOAD_FOLIO_NODE&dID=68095 &RevisionSelectionMethod=Specific
例2
http://myserver/idc/idcplg?IdcService=LOAD_FOLIO_NODE&dID=68095 &RevisionSelectionMethod=Specific&parentNodeId=E176-3B00-1D2A-A592-E0CF
フォリオに1つ以上のコンテンツを追加し、フォリオを変更するサービス。複数の変更を1回のサービス・コールの一部としてリクエストできます。
前提条件: フォリオにアイテムを追加するためには、事前に標準のCHECKIN_NEWまたはCHECKIN_UNIVERSALサービスを使用してそのアイテムをContent Serverインスタンスにチェックインする必要があります。
場所: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm
追加の必須サービス・パラメータ
NumChanges: サービス・コールの一部として渡す変更または更新の数を指定します。たとえば、2つの変更を渡す場合は、NumChanges=2とします。
change(n-1): フォリオに適用する実際の変更を指定します。デフォルトでは、変更は1つです。これは、change()またはchange0によって示されます。フォリオに対する変更数(NumChangesで指定)が複数の場合は、個々の変更ごとにパラメータを渡す必要があります。たとえば、NumChanges=3の場合は、change()、change1およびchange2となります。
|
注意: 個々のchange(n-1)パラメータごとに、change_data(n-1)パラメータを使用する必要があります。たとえば、 |
change(n-1)パラメータの値は、dID:Operation:TargetGUID:ParentGUIDの形式にする必要があります。
dID: 更新するフォリオのdID。
Operation: 次の選択肢のいずれか。
removeNode: ノードの削除
addNode: ノードの追加
addItem: スロットの追加
addContent: 実際のファイルの追加
removeContent: コンテンツ・アイテムの削除
modifyAttribute: プロパティの変更
modifyTemplateAttribute: テンプレート・プロパティの変更
TargetGUID: 変更するフォリオ内のノード、スロットまたはコンテンツ・アイテムのGUID。
ParentGUID: 変更するモード、スロットまたはコンテンツ・アイテムの親GUID。これは、addNodeなどの一部の操作にのみ関連します。
change_data(n-1): change(n-1)パラメータで指定した操作の値を指定します。このパラメータの形式は、カンマで区切ったname:valueペアです。いずれかの名前または値でコロン(:)が必要な場合は、カレット(^)をセパレータとして使用できます(name:name^value)。
コンテンツを追加するときには、次のプロパティを指定する必要があります。
dDocAuthor
dDocName
dDocName_encoded
dDocTitle
dDocType
dFormat
dID
docURL
docURL_encoded
dOriginalName
dRevLabel
プロパティ情報は、フォリオに追加するアイテムに対してDOC_INFOサービス・コールを使用することによって取得できます。dDocName_encoded、docURLおよびdocURL_encodedプロパティに関する情報を提供する必要があります。フォリオ定義に追加するカスタム・プロパティは、XCSTまたはXCSDデータとして指定できます。
例1
既存のコンテンツ・フォリオに新規コンテンツ・アイテムを追加するには、2つの変更を定義する必要があります。最初の変更操作ではaddItemを指定します。これによって、スロットが追加されます。2番目の変更操作ではaddContentを指定します。これによって、ドキュメントがスロットに挿入されます。両方の変更について、change_dataパラメータでコンテンツのプロパティを指定する必要があります。プロパティのxcsd^nameおよびxcst^nameの指定も行う必要があります。
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:
例2
RIDCコードの一部として既存のフォリオに新規コンテンツ・アイテムを追加する手順は次のとおりです。
// 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 ();
ルート・ノードとともに新規フォリオを作成し、チェックインするサービス。
場所: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm
オプションのサービス・パラメータ
このサービスでは、dDocName、dDocTitleなどの標準のメタデータ・パラメータを使用できます。このサービスで使用するパラメータで必要な他のメタデータも指定する必要があります。
サーバーでコンテンツIDの自動生成が設定されている場合、dDocNameパラメータを指定しないと、新しいコンテンツIDが自動的に生成されます。
サービス・レスポンスのLocalDataセクションに、新規フォリオのdIDが示されます。
例
http://myserver/xpedio/icdplg?IdcServer=CHECKIN_NEW_FOLIO &dDocName=myFolioTest&dDocTitle=MyFolioAPITest2&dDocType=TestData &dDocAuthor=authorname&dSecurityGropu=Public&IsJava=1
フォリオのバージョンを取得し、ロック済バージョンと新規バージョンを作成するサービス。
場所: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm
追加の必須サービス・パラメータ
dID: フォリオのコンテンツID。
RevisionSelectionMethod: 取得した情報を最新のリビジョンに基づいて使用するか、最新リリースのバージョンに基づいて使用するかをContent Serverインスタンスに指示します。最新のリビジョンの場合、未リリースの状態であることがあります。値は、Specific、Latest (未リリースの場合があります)またはLatest Releasedのいずれかです。
例
http://myserver/idc/idcplg?IdcService=CREATE_FOLIO_SNAPSHOT&dID=68095 &RevisionSelectionMethod=Specific
編集不可で表示のみ可能なように、フォリオをロックするサービス。このコンテンツ・アイテムに対する追加の変更は許可されません。
場所: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm
追加の必須サービス・パラメータ
dID: フォリオのコンテンツID。
RevisionSelectionMethod: 取得した情報を最新のリビジョンに基づいて使用するか、最新リリースのバージョンに基づいて使用するかをContent Serverインスタンスに指示します。最新のリビジョンの場合、未リリースの状態であることがあります。値は、Specific、Latest (未リリースの場合があります)またはLatest Releasedです。
例
http://myserver/idc/idcplg?IdcService=LOCK_FOLIO&dID=68095&RevisionSelectionMethod=Specific
ロック済フォリオの新規バージョンを作成するサービス。この新規バージョンのフォリオは編集可能です。
場所: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm
追加の必須サービス・パラメータ
dID: フォリオのコンテンツID。
RevisionSelectionMethod: 取得した情報を最新のリビジョンに基づいて使用するか、最新リリースのバージョンに基づいて使用するかをContent Serverインスタンスに指示します。最新のリビジョンの場合、未リリースの状態であることがあります。値は、Specific、Latest (未リリースの場合があります)またはLatest Releasedです。
例
http://myserver/idc/idcplg?IdcService=UNLOCK_FOLIO&dID=68095&RevisionSelectionMethod=Specific
フォリオのリビジョンの特定のレンディションをブラウザに返すサービス。チェックアウトを実行することなく、フォリオのコピーが取得されます。
場所: IdcHomeDir/components/ContentContentFolios/resources/cpd_service.htm
追加の必須サービス・パラメータ
dID: フォリオのコンテンツID。
RenderID: レンディションのタイプ(PDF、ZIP、XML)。カスタムのレンディションを使用できます。
例
http://myserver/idc/idcplg?IdcService=CREATE_FOLIO_RENDITION&dID=68095&RenditionID=PDF