DocumentListEntryService - 범위 지정, 전역
DocumentListEntryService API는 문서 목록에서 문서 템플릿을 유지 관리하기 위한 메서드를 제공합니다.
이 API에는 플러그인(com.snc.platform_document_management)이 문서 관리 필요하며 sn_doc_services 네임스페이스 내에서 제공됩니다. 자세한 내용은 문서 서비스를 참조하십시오.
이 API의 메서드를 사용하기 전에 해당 버전이 있는 문서 템플릿을 추가하고 문서 목록을 생성합니다.SystemDocumentListEntry API를 사용하여 문서 목록에서 문서를 추가하거나 제거합니다.
- SystemDocument – 문서 객체를 정의합니다.
- DocumentService – 문서를 추가, 업데이트 또는 삭제합니다.
- SystemDocumentVersion – 문서 버전을 정의합니다.
- DocumentVersionService – 문서 버전을 추가, 업데이트 또는 삭제합니다.
- SystemDocumentList – 문서 목록을 정의합니다.
- DocumentListService – 문서 목록을 추가, 업데이트 또는 삭제합니다.
- SystemDocument – template() 메서드를 true로 설정하는 문서 개체를 정의합니다. DocumentService API의 메서드를 사용하여 문서 기록을 만들거나 업데이트합니다.
- 문서 [ds_document] 테이블에 있는 문서의 템플릿 확인란을 선택합니다.
DocumentListEntryService - DocumentListEntryService()
DocumentListEntryService 개체를 인스턴스화합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 안 함 |
다음 예제에서는 DocumentListEntryService 개체를 인스턴스화하는 방법을 보여 줍니다.
var s = new sn_doc_services.DocumentListEntryService();
DocumentListEntryService - createDocumentListEntry(SystemDocumentListEntry 항목)
문서 목록에 문서 템플릿 항목을 추가합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| 항목 | SystemDocumentListEntry | 문서 목록 입력 개체의 필드를 나타내는 하나 이상의 속성입니다. |
| 유형 | 설명 |
|---|---|
| 객체 | 문서 목록 항목 [ds_document_list_entry] 테이블에 성공 메시지가 있는 새 기록 Sys_id. 그렇지 않으면 오류 메시지가 표시됩니다. |
| <Object>.메시지 | 성공 또는 오류를 확인하는 메시지입니다. 데이터 유형: 문자열 |
| <Object>.request_id | 문서 목록 항목 [ds_document_list_entry] 테이블의 기록 Sys_id. 데이터 유형: 문자열 |
| <Object>.상태 | 작업이 성공했는지 여부를 나타내는 상태입니다. 가능한 값:
데이터 유형: 문자열 |
다음 예제에서는 문서 항목을 정의하고 문서 목록에 추가하는 방법을 보여 줍니다. SystemDocumentListEntry 도 참조하십시오 .
var docListEntry = new sn_doc_services.SystemDocumentListEntry('21afddea2460fc10f877a6fed1c2b0dd');
docListEntry.document("9acd7fea24587410f877a6fed1c2b060");
docListEntry.description('birth certificate');
var dlEntrySvc = new sn_doc_services.DocumentListEntryService();
gs.info(JSON.stringify(dlEntrySvc.createDocumentListEntry(docListEntry), null, 2));
{
"message": "Create List Entry , List Entry sysId : d3f0b13624e8fc10f877a6fed1c2b0d9is successful.",
"request_id": "d3f0b13624e8fc10f877a6fed1c2b0d9",
"status": "success"
}DocumentListEntryService - deleteDocumentListEntry(문자열 listEntryId)
문서 목록 항목 [ds_document_list_entry] 테이블에서 문서 목록 항목을 제거합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| listEntryId | 문자열 | 문서 목록 항목 [ds_document_list_entry] 테이블에 있는 문서 목록 기록의 Sys_id. |
| 유형 | 설명 |
|---|---|
| 객체 | 성공 또는 오류 메시지입니다. |
| <Object>.메시지 | 성공 또는 오류를 확인하는 메시지입니다. 데이터 유형: 문자열 |
| <Object>.상태 | 작업이 성공했는지 여부를 나타내는 상태입니다. 가능한 값:
데이터 유형: 문자열 |
다음 예는 문서 목록 기록을 삭제하는 방법을 보여줍니다. SystemDocumentList도 참조하십시오.
var listEntryId = 'd3f0b13624e8fc10f877a6fed1c2b0d9';
var dlEntrySvc = new sn_doc_services.DocumentListEntryService();
gs.info(JSON.stringify(dlEntrySvc.deleteDocumentListEntry(listEntryId), null, 2));
{
"message": "Deleting an entry for the given documentListEntrySysId : d3f0b13624e8fc10f877a6fed1c2b0d9 is successful.",
"status": "success"
}DocumentListEntryService - updateDocumentListEntry(문자열 listEntryId, SystemDocumentListEntry 항목)
기존 문서 목록 항목의 필드 값을 업데이트합니다.
| 이름 | 유형 | 설명 |
|---|---|---|
| listEntryId | 문자열 | 문서 목록 항목 [ds_document_list_entry] 테이블에 있는 문서 목록 기록의 Sys_id. |
| 항목 | SystemDocumentListEntry | 문서 목록 입력 개체의 필드를 나타내는 하나 이상의 속성입니다. |
| 유형 | 설명 |
|---|---|
| 객체 | 성공 또는 오류 메시지입니다. |
| <Object>.메시지 | 성공 또는 오류를 확인하는 메시지입니다. 데이터 유형: 문자열 |
| <Object>.request_id | 문서 목록 항목 [ds_document_list_entry] 테이블의 기록 Sys_id. 데이터 유형: 문자열 |
| <Object>.상태 | 작업이 성공했는지 여부를 나타내는 상태입니다. 가능한 값:
데이터 유형: 문자열 |
다음 예제에서는 문서 목록 항목 설명을 업데이트하는 방법을 보여 줍니다. SystemDocumentListEntry 도 참조하십시오 .
var listEntryId = 'd3f0b13624e8fc10f877a6fed1c2b0d9';
var entry = new sn_doc_services.SystemDocumentListEntry();
entry.description('description update');
var dlEntrySvc = new sn_doc_services.DocumentListEntryService();
gs.info(JSON.stringify(dlEntrySvc.updateDocumentListEntry(listEntryId, entry), null, 2));
{
"message": "Updating an entry for the given documentListEntrySysId : d3f0b13624e8fc10f877a6fed1c2b0d9 is successful.",
"request_id": "d3f0b13624e8fc10f877a6fed1c2b0d9",
"status": "success"
}