@Deprecated DocumentVersion newDocumentVersion(String documentVersionId)
newVersionWithId(String)
DocumentVersion
and sets the ID, major version, and minor version.
Use this method to create an instance of an existing version of a document for updating or deleting. While you
can delete any document version, you can only update the latest version of a document. If you want to update a
document, we recommend newDocumentWithId(String)
.
documentVersionId
- the document ID, major version, and minor version, in the format id_major_minor.
For example, 951_0_1.DocumentVersion newDocumentWithId(String docId)
DocumentVersion
with the given id
and sets the version to the latest version
of the document.
Use this method to create an instance of the latest version of an existing document. You can then update or delete this document version.
docId
- the document IDSaveDocumentVersionsResponse saveDocumentVersions(List<DocumentVersion> documentVersions)
DocumentVersion
s. After updating the latest version of a
document, use this method to save the document.
This saves the DocumentVersion
s regardless of the current user's access to that DocumentVersion
.
This is an all-or-nothing operation. If one or more documents fail to save, users see an error message and the operation is rolled back.
documentVersions
- List of DocumentVersion
s to saveSaveDocumentVersionsResponse
for more information.DeleteDocumentVersionsResponse deleteDocumentVersions(List<DocumentVersion> documentVersions)
DocumentVersion
s.
A delete can be either a single version delete or document delete. If an input DocumentVersion
has no major
version and no minor version, that's an indication this is a complete document delete. If the input
DocumentVersion
has a major and minor version, that's an indication this is a document version delete.
This is an all-or-nothing operation. If one or more documents fail to delete, users see an error message and the operation is rolled back.
documentVersions
- List of DocumentVersion
s to deleteDeleteDocumentVersionsResponse
for more information.DocumentVersion newVersionWithId(String documentVersionId)
DocumentVersion
and sets the ID, major version, and minor version.
Use this method to create an instance of an existing version of a document for updating or deleting.
While you can delete any document version, you can only update the latest version of a document.
To update a document, we recommend using newDocumentWithId(String)
.
documentVersionId
- the document ID, major version, and minor version, in the format id_major_minor
.
For example, 951_0_1
.DocumentVersion newDocument()
DocumentVersion
.
Use this method to create an instance of a new document and its first version.DocumentVersion newVersion(String docId)
DocumentVersion
and sets the document ID.
Use this method to create a new version for an existing document.
Existing documents can be identified by the docId
.docId
- the ID of the existing documentDocumentSourceFileReference newDocumentSourceFileReference(ConnectionContext connectionContext, String documentVersionId)
DocumentSourceFileReference
and sets the ID, major and minor version.connectionContext
- contains contextual connection informationdocumentVersionId
- the document ID, major version, and minor version, in the format id_major_minor
.
For example, 951_0_1
.DocumentSourceFileReference
DocumentRenditionFileReference newDocumentRenditionFileReference(ConnectionContext connectionContext, String documentVersionId, String renditionTypeName)
DocumentRenditionFileReference
and sets the rendition type, ID, major and minor version.connectionContext
- contains contextual connection informationdocumentVersionId
- the document ID, major version, and minor version, in the format id_major_minor
.
For example, 951_0_1
.renditionTypeName
- name of rendition typeDocumentRenditionFileReference
DocumentAttachmentFileReference newDocumentAttachmentFileReference(ConnectionContext connectionContext, String attachmentId)
DocumentAttachmentFileReference
and sets the ID.connectionContext
- contains contextual connection informationattachmentId
- the attachment ID. For example, 952
.DocumentAttachmentFileReference
DocumentAttachment newDocumentAttachment(FileReference fileReference, String docId)
fileReference
- file reference pointing to the original filedocId
- ID of the document which the attachment is associate withDocumentAttachment
DocumentRendition newDocumentRendition(FileReference fileReference, String docVersion, String renditionTypeName)
fileReference
- file reference pointing to the original filedocVersion
- version of the document which the rendition is associate with. For example, 1_0_1
.renditionTypeName
- rendition type name of the new renditionDocumentRendition
SaveDocumentVersionsResponse createDocuments(List<DocumentVersion> documentVersions)
documentVersions
- list of DocumentVersion
s to createSaveDocumentVersionsResponse
for more information.SaveDocumentVersionsResponse migrateDocumentVersions(List<DocumentVersion> documentVersions)
documentVersions
- list of DocumentVersion
s to createSaveDocumentVersionsResponse
for more information.SaveDocumentVersionsResponse createAttachments(List<DocumentAttachment> documentAttachments)
documentAttachments
- list of DocumentAttachment
to createSaveDocumentVersionsResponse
for more information.SaveDocumentVersionsResponse createRenditions(List<DocumentRendition> documentRenditions)
documentRenditions
- list of DocumentRendition
to createSaveDocumentVersionsResponse
for more information.Copyright © Veeva Systems 2017–2022. All rights reserved.