SystemDocumentVersion:スコープ対象、グローバル
SystemDocumentVersion API は、バージョン [ds_document_version] テーブルでドキュメントのソースバージョンの値を設定するためのメソッドを提供します。
この API は ドキュメント管理 プラグイン (com.snc.platform_document_management) を必要とし、 sn_doc_services 名前空間内で提供されます。詳細については、「 ドキュメント サービス」を参照してください。
ドキュメントバージョンを作成するには、 DocumentVersionService API を使用します。
SystemDocumentVersion:SystemDocumentVersion(文字列 docSysId)
SystemDocumentVersion オブジェクトをインスタンス化します。
| 名前 | タイプ | 説明 |
|---|---|---|
| docSysID | 文字列 | ドキュメント [ds_document] テーブル内のドキュメントレコードのSys_id。 |
| タイプ | 説明 |
|---|---|
| なし |
次の例は、 SystemDocumentVersion オブジェクトをインスタンス化し、ドキュメントバージョンを作成する方法を示しています。「 DocumentVersionService」も参照してください。
var versionDefinition = new sn_doc_services.SystemDocumentVersion('491efbee24187410f877a6fed1c2b0a9');
versionDefinition.type('url');
versionDefinition.url('http://one/1.0');
var versionSvc = new sn_doc_services.DocumentVersionService();
gs.info(JSON.stringify(versionSvc.createDocumentVersion(versionDefinition), null, 2));
出力:
{
"message": "Adding an entry to DocumentVersion for the given docId : 491efbee24187410f877a6fed1c2b0a9, sysId : d5a340d9242cf810f877a6fed1c2b069 is successful.",
"request_id": "d5a340d9242cf810f877a6fed1c2b069",
"status": "success"
}
SystemDocumentVersion:document(文字列 docSysId)
このバージョンのドキュメントレコードを指定します。
| 名前 | タイプ | 説明 |
|---|---|---|
| docSysID | 文字列 | ドキュメント [ds_document] テーブル内のドキュメントレコードのSys_id。 |
| タイプ | 説明 |
|---|---|
| なし |
次の例は、ドキュメントバージョンの名前フィールドを設定する方法を示しています。DocumentVersionService – createDocumentVersion() も参照してください。
var versionDefinition = new sn_doc_services.SystemDocumentVersion();
versionDefinition.document('491efbee24187410f877a6fed1c2b0a9');
var versionSvc = new sn_doc_services.DocumentVersionService();
gs.info(JSON.stringify(versionSvc.createDocumentVersion(versionDefinition), null, 2));
{
"message": "Adding an entry to DocumentVersion for the given docId : 491efbee24187410f877a6fed1c2b0a9, sysId : 1c504c91242cf810f877a6fed1c2b08b is successful.",
"request_id": "1c504c91242cf810f877a6fed1c2b08b",
"status": "success"
}SystemDocumentVersion:type(文字列 docType)
ドキュメントバージョンの [タイプ] フィールドを設定します。
| 名前 | タイプ | 説明 |
|---|---|---|
| docType | 文字列 | ドキュメントソースタイプ。 有効な値:
注: 添付ファイルは現在、ドキュメントバージョン [ds_document_version] テーブルの UI でのみ追加でき、API では追加できません。 |
| タイプ | 説明 |
|---|---|
| なし |
次の例は、タイプフィールドを設定し、ドキュメントバージョンを作成する方法を示しています。「 DocumentVersionService」も参照してください。
var versionDefinition = new sn_doc_services.SystemDocumentVersion('491efbee24187410f877a6fed1c2b0a9');
versionDefinition.type('url');
versionDefinition.url('http://one/1.0');
var versionSvc = new sn_doc_services.DocumentVersionService();
gs.info(JSON.stringify(versionSvc.createDocumentVersion(versionDefinition), null, 2));
{
"message": "Adding an entry to DocumentVersion for the given docId : 491efbee24187410f877a6fed1c2b0a9, sysId : d5a340d9242cf810f877a6fed1c2b069 is successful.",
"request_id": "d5a340d9242cf810f877a6fed1c2b069",
"status": "success"
}
SystemDocumentVersion:url(文字列 url)
ドキュメントバージョンの URL を設定します。
| 名前 | タイプ | 説明 |
|---|---|---|
| URL | 文字列 | このバージョンのソースドキュメントの URL。 |
| タイプ | 説明 |
|---|---|
| なし |
次の例は、[URL] フィールドをドキュメントバージョンのソースとして設定する方法を示しています。「 DocumentVersionService」も参照してください。
var versionDefinition = new sn_doc_services.SystemDocumentVersion('491efbee24187410f877a6fed1c2b0a9');
versionDefinition.type('url');
versionDefinition.url('http://one/1.0');
var versionSvc = new sn_doc_services.DocumentVersionService();
gs.info(JSON.stringify(versionSvc.createDocumentVersion(versionDefinition), null, 2));
{
"message": "Adding an entry to DocumentVersion for the given docId : 491efbee24187410f877a6fed1c2b0a9, sysId : d5a340d9242cf810f877a6fed1c2b069 is successful.",
"request_id": "d5a340d9242cf810f877a6fed1c2b069",
"status": "success"
}
SystemDocumentVersion:versionNumber(数値 versionNumber)
ドキュメントバージョンの番号を設定します。
| 名前 | タイプ | 説明 |
|---|---|---|
| バージョン番号 | 番号 | このドキュメントのバージョン番号。 |
| タイプ | 説明 |
|---|---|
| なし |
次の例は、バージョン番号を設定してドキュメントバージョンを作成する方法を示しています。「 DocumentVersionService」も参照してください。
var versionDefinition = new sn_doc_services.SystemDocumentVersion('491efbee24187410f877a6fed1c2b0a9');
versionDefinition.type('url');
versionDefinition.url('http://one/1.0');
versionDefinition.versionNumber(5);
var versionSvc = new sn_doc_services.DocumentVersionService();
gs.info(JSON.stringify(versionSvc.createDocumentVersion(versionDefinition), null, 2));
{
"message": "Adding an entry to DocumentVersion for the given docId : 491efbee24187410f877a6fed1c2b0a9, sysId : ff47449d242cf810f877a6fed1c2b06c is successful.",
"request_id": "ff47449d242cf810f877a6fed1c2b06c",
"status": "success"
}