Interface DocumentVersion


public interface DocumentVersion
Represents a document version. Allows retrieving and setting field values on a document version.

DocumentVersions retrieved from DocumentActionContext contain all document fields. Otherwise, DocumentVersions only contain ID, major version, and minor version.

  • Method Details

    • getValue

      <T> T getValue(String fieldName, ValueType<T> returnType)
      Retrieves the value of the specified document field.
      Type Parameters:
      T - type of data requested
      Parameters:
      fieldName - name of the field to get value from
      returnType - type of data requested
      Returns:
      current value of the specified field
    • setValue

      void setValue(String fieldName, Object value)
      Sets the value for the specified document field.
      Parameters:
      fieldName - name of the field to set the value of
      value - new value to set for the field. To remove an existing value, set to null.
    • setSourceFile

      DocumentVersion 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. 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

      DocumentVersion fromTemplate(String templateName)
      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