public class BinderRequest extends VaultRequest
Covered in other classes for ease of use:
https://developer.veevavault.com/api/21.1/#binder-templates
Modifier and Type | Class and Description |
---|---|
static class |
BinderRequest.AttachmentType |
static class |
BinderRequest.AuditFormatType |
static class |
BinderRequest.DocumentVersionType |
HTTP_HEADER_AUTHORIZATION, HTTP_HEADER_VAULT_CLIENT_ID, vaultClient
Modifier and Type | Method and Description |
---|---|
BinderSectionResponse |
addDocumentToBinder(int binderId,
int docId,
String parentId)
Add Document to Binder
|
BinderSectionResponse |
addDocumentToBinder(int binderId,
int docId,
String parentId,
int majorVersion,
int minorVersion)
Add Document to Binder
|
BinderSectionResponse |
addDocumentToBinder(int binderId,
int docId,
String parentId,
String bindingRule)
Add Document to Binder
|
BinderResponse |
createBinder(Document doc)
Create Binder
|
BinderResponse |
createBinderFromTemplate(Document doc,
String templateName)
Create Binder from Template
|
DocumentRelationshipResponse |
createBinderRelationship(int binderId,
int majorVersion,
int minorVersion,
DocumentRelationship binderRelationship)
Create Binder Relationship
|
BinderSectionResponse |
createBinderSection(int binderId,
Binder.Node.BinderSection binderSection)
Create Binder Section
|
BinderResponse |
createBinderVersion(int binderId)
Create Binder Version
|
BinderResponse |
deleteBinder(int binderId)
Delete Binder
|
DocumentRelationshipResponse |
deleteBinderRelationship(int binderId,
int majorVersion,
int minorVersion,
int relationshipId)
Delete Binder Relationship
|
BinderSectionResponse |
deleteBinderSection(int binderId,
String sectionId)
Delete Binder Section
|
BinderResponse |
deleteBinderVersion(int binderId,
int majorVersion,
int minorVersion)
Delete Binder Version
|
JobCreateResponse |
exportBinder(int binderId)
Export Binder
|
JobCreateResponse |
exportBinder(int binderId,
int majorVersion,
int minorVersion)
Export Binder
|
JobCreateResponse |
exportBinderSections(int binderId,
int majorVersion,
int minorVersion,
Set<String> sectionIds)
Export Binder Sections
|
JobCreateResponse |
exportBinderSections(int binderId,
Set<String> sectionIds)
Export Binder Sections
|
BinderSectionResponse |
moveDocumentInBinder(int binderId,
String sectionId,
String parentId)
Move Document in Binder
|
BinderSectionResponse |
moveDocumentInBinder(int binderId,
String sectionId,
String parentId,
int order)
Move Document in Binder
|
BinderResponse |
reclassifyBinder(int binderId,
Document doc)
Reclassify Binder
|
BinderResponse |
refreshBinderAutoFiling(int binderId)
Refresh Binder Auto-Filing
|
BinderSectionResponse |
removeDocumentFromBinder(int binderId,
String sectionId)
Remove Document from Binder
|
BinderResponse |
retrieveAllBinderVersions(int binderId)
Retrieve All Binder Versions
|
BinderResponse |
retrieveBinder(int binderId)
Retrieve Binder
|
BinderExportResponse |
retrieveBinderExportResults(int jobId)
Retrieve Binder Export Results
|
DocumentRelationshipRetrieveResponse |
retrieveBinderRelationship(int binderId,
int majorVersion,
int minorVersion)
Retrieve Binder Relationship (All Binder Relationships)
|
DocumentRelationshipRetrieveResponse |
retrieveBinderRelationship(int binderId,
int majorVersion,
int minorVersion,
int relationshipId)
Retrieve Binder Relationship (Single Binder Relationship)
|
BinderResponse |
retrieveBinderSections(int binderId)
Retrieve Binder Sections (top-level root node)
|
BinderSectionResponse |
retrieveBinderSections(int binderId,
String sectionId)
Retrieve Binder Sections (sub-level node)
|
BinderResponse |
retrieveBinderVersion(int binderId,
int majorVersion,
int minorVersion)
Retrieve Binder Version
|
BinderSectionResponse |
retrieveBinderVersionSections(int binderId,
int majorVersion,
int minorVersion,
String sectionId)
Retrieve Binder Version Sections (sub-level node)
|
BinderRequest |
setAsync(Boolean async)
Binder creates - specify async.
|
BinderRequest |
setDepth(Boolean depth)
Binder retrieves - specify whether to retrieve all binder nodes
when getting a binder
|
BinderRequest |
setExportAttachmentType(BinderRequest.AttachmentType exportAttachmentType)
Export Binder with Attachments
Include latest or all attachments
|
BinderRequest |
setExportAudit(Boolean exportAudit)
Export Binder with Audit Trails
Include document audit trails
|
BinderRequest |
setExportAuditFormatType(BinderRequest.AuditFormatType exportAuditFormatType)
Export Binder with Audit Trail Format
Audit Trail format can be CSV, PDF, or TEXT
|
BinderRequest |
setExportDocumentMetadata(Boolean exportDocumentMetadata)
Export Binder with Document Metadata
Include document fields
|
BinderRequest |
setExportDocumentVersionType(BinderRequest.DocumentVersionType exportDocumentVersionType)
Export Binder Document Versions
Include major or major/minor versions
|
BinderRequest |
setExportSource(Boolean exportSource)
Export Binder with Document Source Content
Include document content
|
BinderRequest |
setExportSource(String exportRenditionType)
Export Binder with Rendition Types
Include a specific rendition type
|
BinderResponse |
updateBinder(int binderId,
Document doc)
Update Binder
|
BinderSectionResponse |
updateBinderDocumentBindingRule(int binderId,
String sectionId,
String bindingRule)
Update Binder Document Binding Rule
|
BinderSectionResponse |
updateBinderDocumentBindingRule(int binderId,
String sectionId,
String bindingRule,
int majorVersion,
int minorVersion)
Update Binder Document Binding Rule
|
BinderSectionResponse |
updateBinderSection(int binderId,
String sectionId,
Binder.Node.BinderSection binderSection)
Update Binder Section
|
BinderSectionResponse |
updateBinderSectionBindingRule(int binderId,
String sectionId,
String bindingRule,
Boolean bindingRuleOverride)
Update Binder Section Binding Rule
|
BinderResponse |
updateBinderVersion(int binderId,
int majorVersion,
int minorVersion,
Document doc)
Update Binder Version
|
BinderResponse |
updateBindingRule(int binderId,
String bindingRule,
Boolean bindingRuleOverride)
Update Binding Rule
|
getBaseObjectMapper, send, send, sendReturnBinary, sendReturnBinary, sendToFile, sendToFile, setVaultClient
public BinderResponse retrieveBinder(int binderId)
Retrieve the first level of the binder (depth = false) or additional levels of the binder (depth = true)
binderId
- The id of the binder (document)GET /api/{version}/objects/binders/{binder_id}
Example 1 - Setting Depth BinderResponse resp = vaultClient.newRequest(BinderRequest.class) .setDepth(depthAll) .retrieveBinder(binderId);
Binder binder = resp.getBinder(); for (Node node : binder.getNodes()) { for (BinderSection binderSection : node.getProperties()) { System.out.println("Id = " + binderSection.getId()); System.out.println("Document Id = " + binderSection.getDocumentId()); System.out.println("Name = " + binderSection.getName()); System.out.println("Order = " + binderSection.getOrder()); System.out.println("ParentId = " + binderSection.getParentId()); System.out.println("Section Number = " + binderSection.getSectionNumber()); System.out.println("Type = " + binderSection.getType()); System.out.println("Major Version = " + binderSection.getMajorVersionNumber()); System.out.println("Minor Version = " + binderSection.getMinorVersionNumber()); } if (node.hasChildren()) this(node.getNodes()); } Document doc = resp.getDocument(); System.out.println("Name = " + doc.getName()); System.out.println("Major Version = " + doc.getMajorVersionNumber()); System.out.println("Minor Version = " + doc.getMinorVersionNumber()); System.out.println("Status = " + doc.getStatus());
public BinderResponse retrieveAllBinderVersions(int binderId)
Retrieve all versions of a binder
binderId
- The id of the binder (document)GET /api/{version}/objects/binders/{binder_id}/versions
BinderResponse resp = vaultClient.newRequest(BinderRequest.class) .retrieveAllBinderVersions(binderId);
for (Version version : resp.getVersions()) { System.out.println("-----------------"); System.out.println(version.getNumber()); System.out.println(version.getValue()); }
public BinderResponse retrieveBinderVersion(int binderId, int majorVersion, int minorVersion)
Retrieve the fields and values configured on a specific version of a specific binder. Retrieve the first level of the binder (depth = false) or additional levels of the binder (depth = true)
binderId
- The id of the binder (document)majorVersion
- The major version of the binder (document)minorVersion
- The minor version of the binder (document)GET /api/{version}/objects/binders/{binder_id}/versions/(major_version}/{minor_version}
BinderResponse resp = vaultClient.newRequest(BinderRequest.class) .setDepth(depthAll) .retrieveBinderVersion(binderId, majorVersion, minorVersion);
System.out.println("Status = " + resp.getResponseStatus()); Binder binder = resp.getBinder();
public BinderResponse createBinder(Document doc)
All required binder (document) fields must be included in the request. When creating a binder, no file is included in the request.
doc
- Document fields for the binderPOST /api/{version}/objects/binders
Document doc = new Document(); doc.setName("VAPIL Binder"); doc.setLifecycle("General Lifecycle"); doc.setType("General"); doc.setTitle("Test Upload VAPIL Binder"); BinderResponse resp = vaultClient.newRequest(BinderRequest.class) .setAsync(true) .createBinder(doc);
System.out.println("Status = " + resp.getResponseStatus()); System.out.println("Status = " + resp.getResponseMessage()); System.out.println("Status = " + resp.getDocument().getId());
public BinderResponse createBinderFromTemplate(Document doc, String templateName)
Specify the API name of the template and document fields to create a binder from a template
doc
- Document fields for the bindertemplateName
- The API name of the binder templatePOST /api/{version}/objects/binders
resp = vaultClient.newRequest(BinderRequest.class) .createBinderFromTemplate(doc, "example_binder_template__c");
System.out.println("Status = " + resp.getResponseStatus()); System.out.println("Status = " + resp.getResponseMessage()); System.out.println("Status = " + resp.getDocument().getId());
public BinderResponse createBinderVersion(int binderId)
All required binder (document) fields must be included in the request. When creating a binder, no file is included in the request.
binderId
- The id of the binder (document)POST /api/{version}/objects/binders/{binder_id}
resp = vaultClient.newRequest(BinderRequest.class) .createBinderVersion(resp.getDocument().getId());
System.out.println("\n****** Create Binder Version******"); System.out.println("Status = " + resp.getResponseStatus()); System.out.println("Status = " + resp.getResponseMessage()); System.out.println("Status = " + resp.getDocument().getMajorVersionNumber()); System.out.println("Status = " + resp.getDocument().getMinorVersionNumber());
public BinderResponse updateBinder(int binderId, Document doc)
Update the binder (document) fields
binderId
- The id of the binder (document)doc
- Document fields for the binderPUT /api/{version}/objects/binders/{binder_id}
resp = vaultClient.newRequest(BinderRequest.class) .updateBinder(binderId, doc);
System.out.println("Status = " + resp.getResponseStatus());
public BinderResponse reclassifyBinder(int binderId, Document doc)
Reclassify allows you to change the document type of an existing binder. A document "type" is the combination of the type__v, subtype__v, and classification__v fields on a binder. When you reclassify, Vault may add or remove certain fields on the binder. You can only reclassify the latest version of a binder and only one binder at a time. The API does not currently support Bulk Reclassify. You can also add or remove values for any other editable field.
binderId
- The id of the binder (document)doc
- Document fields for the binder with needed doc type fields set
(type__v, subtype__v, classification__v, and lifecycle__v). Additional
doc fields can be specified.PUT /api/{version}/objects/binders/{binder_id}
doc.setType("Artwork"); doc.setLifecycle("Artwork LC"); doc.setName("Reclassified binder"); BinderResponse resp = vaultClient.newRequest(BinderRequest.class) .reclassifyBinder(binderId, doc);
System.out.println("Status = " + resp.getResponseStatus());
public BinderResponse refreshBinderAutoFiling(int binderId)
This is only available in eTMF vaults on binders configured with the TMF Reference Models.
binderId
- The id of the binder (document)POST /api/{version}/objects/binders/{binder_id}/actions
public BinderResponse updateBinderVersion(int binderId, int majorVersion, int minorVersion, Document doc)
Update the binder (document) fields on a specific version
binderId
- The id of the binder (document)majorVersion
- The major version of the binder (document)minorVersion
- The minor version of the binder (document)doc
- Document fields for the binderPUT /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}
BinderResponse resp = vaultClient.newRequest(BinderRequest.class) .updateBinderVersion(binderId, majorVersion, minorVersion, doc);
System.out.println("Status = " + resp.getResponseStatus());
public BinderResponse deleteBinder(int binderId)
binderId
- The id of the binder (document)DELETE /api/{version}/objects/binders/{binder_id}
BinderResponse resp = vaultClient.newRequest(BinderRequest.class) .deleteBinder(binderId);
System.out.println("\n****** Delete Binder ******\n"); System.out.println("Status = " + resp.getResponseStatus());
public BinderResponse deleteBinderVersion(int binderId, int majorVersion, int minorVersion)
binderId
- The id of the binder (document)majorVersion
- The major version of the binder (document)minorVersion
- The minor version of the binder (document)DELETE /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}
BinderResponse resp = vaultClient.newRequest(BinderRequest.class) .deleteBinderVersion(binderId, majorVersion, minorVersion);
System.out.println("\n****** Delete Binder Version ******\n"); System.out.println("Status = " + resp.getResponseStatus());
public BinderResponse retrieveBinderSections(int binderId)
Retrieve all sections (documents and subsections) in a binder's top-level root node
binderId
- The id of the binder (document)GET /api/{version}/objects/binders/{binder_id}/sections
BinderResponse resp = vaultClient.newRequest(BinderRequest.class) .retrieveBinderSections(binderId);
System.out.println("Status = " + resp.getResponseStatus()); printBinder(resp.getBinder().getNodes()); System.out.println("\n****** Retrieve Binder Section - Specific Node ******\n"); // Note the different response model to handle differences with specific node response format BinderSectionResponse resp2 = vaultClient.newRequest(BinderRequest.class) .retrieveBinderSections(binderId, sectionId); System.out.println("Status = " + resp2.getResponseStatus()); List<BinderSection> binderSections = resp2.getNode().getProperties(); for (BinderSection binderSection : binderSections) printBinderSection(binderSection); printBinder(resp2.getNode().getNodes());
public BinderSectionResponse retrieveBinderSections(int binderId, String sectionId)
Retrieve all sections (documents and subsections) in a binder's sub-level node.
binderId
- The id of the binder (document)sectionId
- The section id (also referred to as "node_id" in the API documentation)GET /api/{version}/objects/binders/{binder_id}/sections/{section_id}
public BinderSectionResponse retrieveBinderVersionSections(int binderId, int majorVersion, int minorVersion, String sectionId)
Retrieve all sections (documents and subsections) in a binder's sub-level node (for the specified binder version)
binderId
- The id of the binder (document)majorVersion
- The major version of the binder (document)minorVersion
- The minor version of the binder (document)sectionId
- The section id (also referred to as "node_id" in the API documentation)GET /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/sections/{section_id}
BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class) .retrieveBinderVersionSections(binderId, majorVersion, minorVersion, sectionId);
System.out.println("Status = " + resp.getResponseStatus()); List<BinderSection> binderSections = resp.getNode().getProperties(); for (BinderSection binderSection : binderSections) printBinderSection(binderSection); printBinder(resp.getNode().getNodes());
public BinderSectionResponse createBinderSection(int binderId, Binder.Node.BinderSection binderSection)
Create a binder section with the passed in section properties, including set values for name__v (required), section_number__v, parent_id__v, order__v
binderId
- The id of the binder (document)binderSection
- Properties of the BinderSection, with name__v as the only required fieldPOST /api/{version}/objects/binders/{binder_id}/sections
Example 1 BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class) .createBinderSection(binderId, binderSection);,
Example 2 - Sub Section * binderSection = new BinderSection(); binderSection.setName(name + " Child"); binderSection.setParentId(resp.getId()); BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class) .createBinderSection(binderId, binderSection);
Example 1 System.out.println("Status = " + resp.getResponseStatus()); System.out.println("Created Id = " + resp.getId());,
Example 2 - Sub Section System.out.println("Status = " + resp.getResponseStatus()); System.out.println("Created Id = " + resp.getId());
public BinderSectionResponse updateBinderSection(int binderId, String sectionId, Binder.Node.BinderSection binderSection)
Update a binder section with the passed in section properties, including set values for name__v, section_number__v, parent_id__v, order__v
binderId
- The id of the binder (document)sectionId
- The section id (also referred to as "node_id" in the API documentationbinderSection
- Properties of the BinderSection, with name__v as the only required fieldPUT /api/{version}/objects/binders/{binder_id}/sections/{node_id}
binderSection.setName("Changed Name"); BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class) .updateBinderSection(binderId, resp.getId(), binderSection);
System.out.println("Status = " + resp.getResponseStatus());
public BinderSectionResponse deleteBinderSection(int binderId, String sectionId)
binderId
- The id of the binder (document)sectionId
- The section id (also referred to as "node_id" in the API documentationDELETE /api/{version}/objects/binders/{binder_id}/sections/{section_id}
BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class) .deleteBinderSection(binderId, resp.getId());
temp
public BinderSectionResponse addDocumentToBinder(int binderId, int docId, String parentId)
binderId
- The id of the binder (document)docId
- The id of the document being added to the binderparentId
- The section id of the parent section, if the document will be in a section rather than top-level
Note: the section id is unique no matter where it is in the binder hierarchy. Blank means adding the document at the top-level binderPOST /api/{version}/objects/binders/{binder_id}/documents
BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class).addDocumentToBinder(binderId, docId, parentId);
System.out.println("Status = " + resp.getResponseStatus());
public BinderSectionResponse addDocumentToBinder(int binderId, int docId, String parentId, String bindingRule)
Specify binding rule of when adding document to the binder
binderId
- The id of the binder (document)docId
- The id of the document being added to the binderparentId
- The section id of the parent section, if the document will be in a section rather than top-levelbindingRule
- Indicates which binding rule to apply (which document versions to link to the section). Options are:
POST /api/{version}/objects/binders/{binder_id}/documents
BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class) .addDocumentToBinder(binderId, docId, parentId, bindingRule);
System.out.println("Status = " + resp.getResponseStatus());
public BinderSectionResponse addDocumentToBinder(int binderId, int docId, String parentId, int majorVersion, int minorVersion)
Set binding rule to specific when adding document to the binder, specifying the major/minor version
binderId
- The id of the binder (document)docId
- The id of the document being added to the binderparentId
- The section id of the parent section, if the document will be in a section rather than top-levelmajorVersion
- The major version of the binder (document)minorVersion
- The minor version of the binder (document)POST /api/{version}/objects/binders/{binder_id}/documents
BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class).addDocumentToBinder(binderId, docId, parentId, majorVersion, minorVersion);
System.out.println("Status = " + resp.getResponseStatus());
public BinderSectionResponse moveDocumentInBinder(int binderId, String sectionId, String parentId)
binderId
- The id of the binder (document)sectionId
- The section (node) id to be removedparentId
- Value of the new parent node to move the document to a different section or from a section to the binder's root nodePUT /api/{version}/objects/binders/{binder_id}/documents/{section_id}
BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class) .moveDocumentInBinder(binderId, sectionId, parentId);
System.out.println("Status = " + resp.getResponseStatus());
public BinderSectionResponse moveDocumentInBinder(int binderId, String sectionId, String parentId, int order)
Move document and also set a new order
binderId
- The id of the binder (document)sectionId
- The section (node) id to be removedparentId
- Value of the new parent node to move the document to a different section or from a section to the binder's root nodeorder
- Enter a number reflecting the new position of the document within the binder or sectionPUT /api/{version}/objects/binders/{binder_id}/documents/{section_id}
BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class) .moveDocumentInBinder(binderId, sectionId, parentId, order);
System.out.println("Status = " + resp.getResponseStatus());
public BinderSectionResponse removeDocumentFromBinder(int binderId, String sectionId)
binderId
- The id of the binder (document)sectionId
- The section (node) id to be removedDELETE /api/{version}/objects/binders/{binder_id}/documents/{section_id}
BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class) .removeDocumentFromBinder(binderId, sectionId);
System.out.println("Status = " + resp.getResponseStatus());
public DocumentRelationshipRetrieveResponse retrieveBinderRelationship(int binderId, int majorVersion, int minorVersion)
Retrieve all relationships for a binder
binderId
- The id of the binder (document)majorVersion
- The major version of the binder (document)minorVersion
- The minor version of the binder (document)GET /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/relationships
DocumentRelationshipRetrieveResponse resp = vaultClient.newRequest(BinderRequest.class) .retrieveBinderRelationship(binderId, majorVersion, minorVersion);
System.out.println("Status = " + resp.getResponseStatus()); for (Relationship respRel : resp.getRelationships()) { DocumentRelationship rel = respRel.getRelationship(); System.out.println(""); relationshipId = rel.getId(); System.out.println("Relationship Id = " + relationshipId); System.out.println("Type = " + rel.getRelationshipType()); System.out.println("Created By = " + rel.getCreatedBy()); System.out.println("Created Date = " + rel.getCreatedDate()); System.out.println("Source Doc Id = " + rel.getSourceDocId()); System.out.println("Target Doc Id = " + rel.getTargetDocId()); System.out.println("Major = " + rel.getTargetMajorVersion()); System.out.println("Minor = " + rel.getTargetMinorVersion()); }
public DocumentRelationshipRetrieveResponse retrieveBinderRelationship(int binderId, int majorVersion, int minorVersion, int relationshipId)
Retrieve a specific/single binder relationship, as specified by relationship id
binderId
- The id of the binder (document)majorVersion
- The major version of the binder (document)minorVersion
- The minor version of the binder (document)relationshipId
- The binder relationship id field value.GET /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/relationships/{relationship_id}
System.out.println("\n****** Retrieve Binder Relationships (Single) ******\n"); BinderResponse resp = vaultClient.newRequest(BinderRequest.class) .retrieveBinderRelationship(binderId, majorVersion, minorVersion, relationshipId);
System.out.println("Status = " + resp.getResponseStatus()); for (Relationship respRel : resp.getRelationships()) { DocumentRelationship rel = respRel.getRelationship(); System.out.println(""); relationshipId = rel.getId(); System.out.println("Relationship Id = " + relationshipId); System.out.println("Type = " + rel.getRelationshipType()); System.out.println("Created By = " + rel.getCreatedBy()); System.out.println("Created Date = " + rel.getCreatedDate()); System.out.println("Source Doc Id = " + rel.getSourceDocId()); System.out.println("Target Doc Id = " + rel.getTargetDocId()); System.out.println("Major = " + rel.getTargetMajorVersion()); System.out.println("Minor = " + rel.getTargetMinorVersion()); }
public DocumentRelationshipResponse createBinderRelationship(int binderId, int majorVersion, int minorVersion, DocumentRelationship binderRelationship)
binderId
- The id of the binder (document)majorVersion
- The major version of the binder (document)minorVersion
- The minor version of the binder (document)binderRelationship
- Object with properties for creating the relationship, including:
POST /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/relationships
System.out.println("\n****** Create Binder Relationships ******\n"); DocumentRelationship binderRelationship = new DocumentRelationship(); binderRelationship.setRelationshipType("supporting_documents__c"); binderRelationship.setTargetDocId(targetDocId); DocumentRelationshipResponse resp = vaultClient.newRequest(BinderRequest.class) .createBinderRelationship(binderId, majorVersion, minorVersion, binderRelationship);
System.out.println("Status = " + resp.getResponseStatus()); System.out.println("Message = " + resp.getResponseMessage()); System.out.println("Id " + resp.getId());
public DocumentRelationshipResponse deleteBinderRelationship(int binderId, int majorVersion, int minorVersion, int relationshipId)
binderId
- The id of the binder (document)majorVersion
- The major version of the binder (document)minorVersion
- The minor version of the binder (document)relationshipId
- The binder relationship id field value.DELETE /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/relationships/{relationship_id}
DocumentRelationshipResponse resp = vaultClient.newRequest(BinderRequest.class) .deleteBinderRelationship(binderId, majorVersion, minorVersion, relationshipId);
System.out.println("Status = " + resp.getResponseStatus()); System.out.println("Message = " + resp.getResponseMessage());
public JobCreateResponse exportBinder(int binderId)
Export the latest version of the complete binder, including all binder sections and documents. After initiating an export, you can retrieve its status, results, and download the exported binder.
binderId
- The id of the binder (document)POST /api/{version}/objects/binders/{binder_id}/actions/export
JobCreateResponse resp = vaultClient.newRequest(BinderRequest.class) .exportBinder(binderId);
System.out.println("Status = " + resp.getResponseStatus()); jobId = resp.getJobId(); System.out.println("Job Id = " + jobId);
public JobCreateResponse exportBinder(int binderId, int majorVersion, int minorVersion)
Export a specific version of the complete binder, including all binder sections and documents. After initiating an export, you can retrieve its status, results, and download the exported binder.
binderId
- The id of the binder (document)majorVersion
- The major version of the binder (document)minorVersion
- The minor version of the binder (document)POST /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/actions/export
JobCreateResponse resp = vaultClient.newRequest(BinderRequest.class) .exportBinder(binderId, majorVersion, minorVersion);
System.out.println("\n****** Export Binder (Version) ******\n"); System.out.println("Status = " + resp.getResponseStatus()); jobId = resp.getJobId(); System.out.println("Job Id = " + jobId);
public JobCreateResponse exportBinderSections(int binderId, Set<String> sectionIds)
Export specific binder sections for the latest version of the binder. Exporting a binder section node will automatically include all of its subsections and documents therein. Vault will ignore id values which are invalid, but will export all which are valid.
binderId
- The binder id to exportsectionIds
- Set of ids to export, either the section or document nodePOST /api/{version}/objects/binders/{binder_id}/actions/export
JobCreateResponse resp = vaultClient.newRequest(BinderRequest.class) .exportBinderSections(binderId, sectionIds);
System.out.println("\n****** Export Binder Section ******\n"); System.out.println("Status = " + resp.getResponseStatus()); jobId = resp.getJobId(); System.out.println("Job Id = " + jobId);
public JobCreateResponse exportBinderSections(int binderId, int majorVersion, int minorVersion, Set<String> sectionIds)
Export specific binder sections for a specific version of the binder.
Exporting a binder section node will automatically include all of its subsections and documents therein. Vault will ignore id values which are invalid, but will export all which are valid.
binderId
- The binder id to exportmajorVersion
- The major version of the binder (document)minorVersion
- The minor version of the binder (document)sectionIds
- Set of ids to export, either the section or document nodePOST /api/{version}/objects/binders/{binder_id}/versions/{major_version}/{minor_version}/actions/export
JobCreateResponse resp = vaultClient.newRequest(BinderRequest.class) .exportBinderSections(binderId, majorVersion, minorVersion, sectionIds);
System.out.println("\n****** Export Binder Section (Version) ******\n"); System.out.println("Status = " + resp.getResponseStatus()); jobId = resp.getJobId(); System.out.println("Job Id = " + jobId);
public BinderExportResponse retrieveBinderExportResults(int jobId)
After submitting a request to export a binder from your vault, you can query vault to determine the results of the request.
jobId
- The id value of the requested export jobGET /api/{version}/objects/binders/actions/export/{job_id}/results
BinderExportResponse resp = vaultClient.newRequest(BinderRequest.class) .retrieveBinderExportResults(jobId);
System.out.println("\n****** Retrieve Binder Export Results ******\n"); System.out.println("Status = " + resp.getResponseStatus()); System.out.println("Id = " + resp.getId()); System.out.println("File = " + resp.getFile()); System.out.println("Major Version = " + resp.getMajorVersionNumber()); System.out.println("Minor Version = " + resp.getMinorVersionNumber()); System.out.println("User Id = " + resp.getUserId());
public BinderResponse updateBindingRule(int binderId, String bindingRule, Boolean bindingRuleOverride)
binderId
- The binder idbindingRule
- Indicates which binding rule to apply (which document versions to link to the section). Options are:
bindingRuleOverride
- Set to true or false to indicate if the specified binding rule should override
documents or sections which already have binding rules set.
If set to true, the binding rule is applied to all documents and sections within the current section.
If false, the binding rule is applied only to documents and sections within the current section that
do not have a binding rule specifiedPUT /api/{version}/objects/binders/{binder_id}/binding_rule
BinderResponse resp = vaultClient.newRequest(BinderRequest.class) .updateBindingRule(binderId, bindingRule, bindingRuleOverride);
System.out.println("\n****** Update Binding Rule Results ******\n"); System.out.println("Status = " + resp.getResponseStatus());
public BinderSectionResponse updateBinderSectionBindingRule(int binderId, String sectionId, String bindingRule, Boolean bindingRuleOverride)
The resulting response contains status and the binder section id
binderId
- The binder idsectionId
- The section id (also referred to as "node_id" in the API documentation)bindingRule
- Indicates which binding rule to apply (which document versions to link to the section). Options are:
bindingRuleOverride
- Set to true or false to indicate if the specified binding rule should override
documents or sections which already have binding rules set.
If set to true, the binding rule is applied to all documents and sections within the current section.
If false, the binding rule is applied only to documents and sections within the current section that
do not have a binding rule specifiedPUT /api/{version}/objects/binders/{binder_id}/sections/{node_id}/binding_rule
BinderSectionResponse resp = vaultClient.newRequest(BinderRequest.class) .updateBinderSectionBindingRule(binderId, sectionId, bindingRule, bindingRuleOverride);
System.out.println("\n****** Update Binding Rule Results ******\n"); System.out.println("Status = " + resp.getResponseStatus());
public BinderSectionResponse updateBinderDocumentBindingRule(int binderId, String sectionId, String bindingRule)
binderId
- The binder idsectionId
- The section id (also referred to as "node_id" in the API documentation)bindingRule
- Indicates which binding rule to apply (which document versions to link to the section). Options are:
PUT /api/{version}/objects/binders/{binder_id}/documents/{node_id}/binding_rule
public BinderSectionResponse updateBinderDocumentBindingRule(int binderId, String sectionId, String bindingRule, int majorVersion, int minorVersion)
binderId
- The binder idsectionId
- The section id (also referred to as "node_id" in the API documentation)bindingRule
- Indicates which binding rule to apply (which document versions to link to the section). Options are:
majorVersion
- If the binding_rule is specific, then this is required and indicates the major version of the document to be linkedminorVersion
- If the binding_rule is specific, then this is required and indicates the minor version of the document to be linkedPUT /api/{version}/objects/binders/{binder_id}/documents/{node_id}/binding_rule
public BinderRequest setDepth(Boolean depth)
depth
- Set to true to retrieve all binder nodespublic BinderRequest setAsync(Boolean async)
async
- Set to true to process asyncpublic BinderRequest setExportAttachmentType(BinderRequest.AttachmentType exportAttachmentType)
exportAttachmentType
- all or latestpublic BinderRequest setExportAudit(Boolean exportAudit)
exportAudit
- true/falsepublic BinderRequest setExportAuditFormatType(BinderRequest.AuditFormatType exportAuditFormatType)
exportAuditFormatType
- csv, pdf or textpublic BinderRequest setExportDocumentMetadata(Boolean exportDocumentMetadata)
exportDocumentMetadata
- true/falsepublic BinderRequest setExportDocumentVersionType(BinderRequest.DocumentVersionType exportDocumentVersionType)
exportDocumentVersionType
- major or major_minorpublic BinderRequest setExportSource(String exportRenditionType)
exportRenditionType
- rendition api name (viewable_rendition__v_public BinderRequest setExportSource(Boolean exportSource)
exportSource
- true/falseCopyright © 2021. All rights reserved.