Package com.veeva.vault.sdk.api.document
Interface DocumentVersion
public interface DocumentVersion
Represents a document version. Allows retrieving and setting field values on a document version.
DocumentVersion
s retrieved from DocumentActionContext
contain all document fields.
Otherwise, DocumentVersion
s only contain ID, major version, and minor version.
-
Method Summary
Modifier and TypeMethodDescriptionfromTemplate
(String templateName) Creates a document from the given template.<T> T
Retrieves the value of the specified document field.setSourceFile
(FileReference fileReference) Sets the source file for the new document version when creating a new document or a new version of an existing document.void
Sets the value for the specified document field.Disables generation of a viewable rendition from the source file for the new document or document version.
-
Method Details
-
getValue
Retrieves the value of the specified document field.- Type Parameters:
T
- type of data requested- Parameters:
fieldName
- name of the field to get value fromreturnType
- type of data requested- Returns:
- current value of the specified field
-
setValue
Sets the value for the specified document field.- Parameters:
fieldName
- name of the field to set the value ofvalue
- new value to set for the field. To remove an existing value, set to null.
-
setSourceFile
Sets the source file for the new document version when creating a new document or a new version of an existing document. A source file cannot be set for an existing document version.- Parameters:
fileReference
- location of the source file to use- Returns:
DocumentVersion
-
suppressRendition
DocumentVersion suppressRendition()Disables generation of a viewable rendition from the source file for the new document or document version.- Returns:
- suppressed generation
DocumentVersion
-
fromTemplate
Creates a document from the given template. When used with a controlled document template, the new document has a Based On relationship to the template. Learn more about managing document templates in Vault Help.- Parameters:
templateName
- public Name of the template used to create a document- Returns:
DocumentVersion
from template
-