Class Document

java.lang.Object
com.appiancorp.suiteapi.collaboration.Document
All Implemented Interfaces:
LocalId, Serializable, Cloneable
Direct Known Subclasses:
DocumentStatistics

@Deprecated public class Document extends Object implements LocalId, Cloneable, Serializable
Deprecated.
Use the class Document instead.

This class represents a versioned document in the collaboration application.

See Also:
  • Field Details

    • SORT_COLUMN_NAME

      public static final String SORT_COLUMN_NAME
      Deprecated.
      Sort documents by name
      See Also:
    • SORT_COLUMN_LAST_MODIFIED_DATE

      public static final String SORT_COLUMN_LAST_MODIFIED_DATE
      Deprecated.
      Sort documents by their last date of modification. The last date of modification of a Document is its upload date or the date of its last version.
      See Also:
    • SORT_COLUMN_SIZE

      public static final String SORT_COLUMN_SIZE
      Deprecated.
      Sort documents by their size in bytes
      See Also:
    • SORT_COLUMN_LAST_MODIFIED_BY

      public static final String SORT_COLUMN_LAST_MODIFIED_BY
      Deprecated.
      Sort document by the user who last modified the documents. The last date of modification of a Document is its upload date or the date of its last version.
      See Also:
    • SORT_COLUMN_PARENT_KNOWLEDGE_CENTER_NAME

      public static final String SORT_COLUMN_PARENT_KNOWLEDGE_CENTER_NAME
      Deprecated.
      Sort documents by their parent knowledge center name
      See Also:
    • SORT_COLUMN_EXTENSION

      public static final String SORT_COLUMN_EXTENSION
      Deprecated.
      Sort documents by their extension
      See Also:
    • SORT_COLUMN_EXPIRATION_DATE

      public static final String SORT_COLUMN_EXPIRATION_DATE
      Deprecated.
      Sort documents by their date of expiration
      See Also:
    • SORT_COLUMN_NUMBER_OF_VERSIONS

      public static final String SORT_COLUMN_NUMBER_OF_VERSIONS
      Deprecated.
      Sort documents by the number of versions that they have
      See Also:
    • STATUS_PUBLISHED

      public static final int STATUS_PUBLISHED
      Deprecated.
      Status field for a published document
      See Also:
    • STATUS_UNPUBLISHED

      public static final int STATUS_UNPUBLISHED
      Deprecated.
      Status field for an unpublished document (This is not currently used. All created documents will have a status of STATUS_PUBLISHED)
      See Also:
    • CURRENT_VERSION

      public static final Integer CURRENT_VERSION
      Deprecated.
      Version field for the current version of a document
    • PENDING_APPROVAL_CREATION

      public static final int PENDING_APPROVAL_CREATION
      Deprecated.
      Field signifying that a document is pending approval for creation
      See Also:
    • PENDING_APPROVAL_DELETION

      public static final int PENDING_APPROVAL_DELETION
      Deprecated.
      Field signifying that a document is pending approval for deletion
      See Also:
    • APPROVED

      public static final int APPROVED
      Deprecated.
      Field signifying that a document has been approved (or does not require approval)
      See Also:
    • SORT_BY_ID

      public static final Integer SORT_BY_ID
      Deprecated.
    • SORT_BY_FILE_SYSTEM_ID

      public static final Integer SORT_BY_FILE_SYSTEM_ID
      Deprecated.
    • SORT_BY_PARTITION

      public static final Integer SORT_BY_PARTITION
      Deprecated.
    • SORT_BY_NAME

      public static final Integer SORT_BY_NAME
      Deprecated.
    • SORT_BY_EXTENSION

      public static final Integer SORT_BY_EXTENSION
      Deprecated.
    • SORT_BY_DESCRIPTION

      public static final Integer SORT_BY_DESCRIPTION
      Deprecated.
    • SORT_BY_EXPIRATION_DATE

      public static final Integer SORT_BY_EXPIRATION_DATE
      Deprecated.
    • SORT_BY_FOLDER_NAME

      public static final Integer SORT_BY_FOLDER_NAME
      Deprecated.
    • SORT_BY_FOLDER_ID

      public static final Integer SORT_BY_FOLDER_ID
      Deprecated.
    • SORT_BY_KNOWLEDGE_CENTER_NAME

      public static final Integer SORT_BY_KNOWLEDGE_CENTER_NAME
      Deprecated.
    • SORT_BY_KNOWLEDGE_CENTER_ID

      public static final Integer SORT_BY_KNOWLEDGE_CENTER_ID
      Deprecated.
    • SORT_BY_CHANGES_REQUIRE_APPROVAL

      public static final Integer SORT_BY_CHANGES_REQUIRE_APPROVAL
      Deprecated.
    • SORT_BY_DATE_CREATED

      public static final Integer SORT_BY_DATE_CREATED
      Deprecated.
    • SORT_BY_STATUS

      public static final Integer SORT_BY_STATUS
      Deprecated.
    • SORT_BY_APPROVED

      public static final Integer SORT_BY_APPROVED
      Deprecated.
    • SORT_BY_SIZE

      public static final Integer SORT_BY_SIZE
      Deprecated.
    • SORT_BY_LAST_USER_TO_MODIFY

      public static final Integer SORT_BY_LAST_USER_TO_MODIFY
      Deprecated.
    • SORT_BY_NUMBER_OF_VERSIONS

      public static final Integer SORT_BY_NUMBER_OF_VERSIONS
      Deprecated.
    • SORT_BY_VERSION_ID

      public static final Integer SORT_BY_VERSION_ID
      Deprecated.
    • SORT_BY_LOCKED_BY

      public static final Integer SORT_BY_LOCKED_BY
      Deprecated.
    • SORT_BY_DISCUSSION_THREAD

      public static final Integer SORT_BY_DISCUSSION_THREAD
      Deprecated.
    • SORT_BY_PENDING_APPROVAL

      public static final Integer SORT_BY_PENDING_APPROVAL
      Deprecated.
    • sizeInKB$TRANSIENT

      public static final boolean sizeInKB$TRANSIENT
      Deprecated.
      See Also:
  • Constructor Details

    • Document

      public Document()
      Deprecated.
  • Method Details

    • isChangesRequireApproval

      public boolean isChangesRequireApproval()
      Deprecated.
      Checks whether changes to this document require approval before being available in the application
      Returns:
      true if changes to this cocument require approval; false otherwise
    • getDateCreated

      public Timestamp getDateCreated()
      Deprecated.
      Gets the date and time that this document was created/first uploaded
      Returns:
      the date and time (combined as a Timestamp) that the document was created
    • getDescription

      public String getDescription()
      Deprecated.
      Gets the description (if any) of the document
      Returns:
      the description of the document
    • getExpirationDate

      public Timestamp getExpirationDate()
      Deprecated.
      Gets the date and time that this document will expire
      Returns:
      the date and time (combined as a Timestamp) that the document will expire
    • getExtension

      public String getExtension()
      Deprecated.
      Retrieves the file extension (eg, exe, txt, doc) for this document
      Returns:
      the file extension of the document
    • getFileSystemId

      public Long getFileSystemId()
      Deprecated.
      Retrieves the system ID that the collaboration application uses to identify the document physically on the drive
      Returns:
      the file system ID of this document
    • getFolderId

      public Long getFolderId()
      Deprecated.
      Gets the unique ID of the folder which contains the document
      Returns:
      the unique ID of the folder which contains the document
    • getFolderName

      public String getFolderName()
      Deprecated.
      Gets the name of the folder which contains the document
      Returns:
      the name of the folder which contains the document
    • getId

      public Long getId()
      Deprecated.
      Gets the unique ID of the document.
      Specified by:
      getId in interface LocalId
      Returns:
      the unique ID of the document.
      See Also:
    • getKnowledgeCenterId

      public Long getKnowledgeCenterId()
      Deprecated.
      Gets the unique ID of the knowledge center which contains the document
      Returns:
      the unique ID of the knowledge center which contains the document
    • getKnowledgeCenterName

      public String getKnowledgeCenterName()
      Deprecated.
      Gets the name of the knowledge center which contains the document
      Returns:
      the name of the knowledge center which contains the document
    • getLastUserToModify

      public String getLastUserToModify()
      Deprecated.
      Retrieves the unique ID of the last user to modify the file
      Returns:
      the unique ID of the last user to modify the file
    • getName

      public String getName()
      Deprecated.
      Gets the name of the document
      Returns:
      the name of the ducument
    • getPartition

      public String getPartition()
      Deprecated.
      Retrieves the path where the collaboration application stores the physical document on the drive
      Returns:
      the physical path where the document is stored
    • getSize

      public long getSize()
      Deprecated.
      Get the size of the document
      Returns:
      the size (in bytes) of the document
    • getSizeInKB

      public double getSizeInKB()
      Deprecated.
      Gets the number of KBytes in the file rounded to 2 decimals.
      Returns:
      the size of the document in KBytes rounded to 2 decimals
    • getVersionId

      public Long getVersionId()
      Deprecated.
      Gets the version number of the document
      Returns:
      the version number of the document
    • setChangesRequireApproval

      public void setChangesRequireApproval(boolean b_)
      Deprecated.
      Sets whether changes to this document require approval
      Parameters:
      b_ - a boolean that determines if changes to this document require approval
    • setDateCreated

      public void setDateCreated(Timestamp dtcreated_)
      Deprecated.
      Sets the date and time at which the document was created.
      Parameters:
      dtcreated_ - the date and time (combined as a Timestamp) at which the document was created
    • setDescription

      public void setDescription(String desc_)
      Deprecated.
      Sets the document description
      Parameters:
      desc_ - the description of the document
    • setExpirationDate

      public void setExpirationDate(Timestamp dtexpire_)
      Deprecated.
      Sets the expiration date of the document
      Parameters:
      dtexpire_ - the expiration date of the document
    • setExtension

      public void setExtension(String ext_)
      Deprecated.
      Sets the file extension of the document
      Parameters:
      ext_ - the file extenstion of the document
    • setFileSystemId

      public void setFileSystemId(Long fsid_)
      Deprecated.
      Sets the system ID that the collaboration application uses to identify the document physically on the drive
      Parameters:
      fsid_ - the file system ID of this document
    • setFolderId

      public void setFolderId(Long fid_)
      Deprecated.
      Sets the parent folder of the document to be that of the folder with unique ID fid
      Parameters:
      fid_ - the unique ID of the folder
    • setFolderName

      public void setFolderName(String fname_)
      Deprecated.
      Sets the parent folder of the document to be that of the folder with the name fname
      Parameters:
      fname_ - the name of the folder
    • setId

      public void setId(Long id_)
      Deprecated.
      Sets the unique ID of this document
      Specified by:
      setId in interface LocalId
      Parameters:
      id_ - the unique ID of the document
      See Also:
    • setKnowledgeCenterId

      public void setKnowledgeCenterId(Long kcid_)
      Deprecated.
      Sets the parent knowledge center for this document to be the one where the unique ID is kcid
      Parameters:
      kcid_ - the unique ID of the knowledge center
    • setKnowledgeCenterName

      public void setKnowledgeCenterName(String kcname_)
      Deprecated.
      Sets the parent knowledge center for this document to be the one where the name is kcname
      Parameters:
      kcname_ - the name of the knowledge center
    • setLastUserToModify

      public void setLastUserToModify(String luid_)
      Deprecated.
      Sets the last user to modify the document to the user with the unique ID luid
      Parameters:
      luid_ - the unique ID of the user who last modified the document
    • setName

      public void setName(String dname_)
      Deprecated.
      Set the name of the document
      Parameters:
      dname_ - the name of the document
    • setPartition

      public void setPartition(String part_)
      Deprecated.
      Sets the path where the collaboration application stores the physical document on the drive
      Parameters:
      part_ - the path of the physical document on the drive
    • setSize

      public void setSize(long size_)
      Deprecated.
      Sets the size of the document
      Parameters:
      size_ - the size (in bytes) of the document
    • setVersionId

      public void setVersionId(Long vid_)
      Deprecated.
      Sets the version number of the document
      Parameters:
      vid_ - the version number of the document
    • isApproved

      public boolean isApproved()
      Deprecated.
      Checks whether the document (or its changes) have been approved
      Returns:
      true if the document (or its changes) have been approved; false otherwise
    • getForum

      public Long getForum()
      Deprecated.
      Retrieves the discussion forum associated with this document
      Returns:
      the unique ID of the discussion forum associated with this document
    • getLockedBy

      @Deprecated public String getLockedBy()
      Deprecated.
      Gets the unique ID of the user who locked the document
      Returns:
      the unique ID of the user who locked the document
    • getLockedAt

      public Timestamp getLockedAt()
      Deprecated.
      Gets the date and time that the document was locked, or null if the document is not locked.
      Returns:
      the date and time that the document was locked
    • getNumberOfVersions

      public int getNumberOfVersions()
      Deprecated.
      Gets the number of versions of this document
      Returns:
      the number of versions of this document that exist on the application
    • getTotalNumberOfVersions

      public int getTotalNumberOfVersions()
      Deprecated.
      Returns getNumberOfVersions() + 1.
    • setApproved

      public void setApproved(boolean approved_)
      Deprecated.
      Sets whether the document (or its changes) have been approved
      Parameters:
      approved_ - true if the changes to this document have been approved, false otherwise
    • setForum

      public void setForum(Long forumId_)
      Deprecated.
      Relates the discussion forum with unique ID dtid with this document
      Parameters:
      forumId_ - the unique ID of the discussion forum associated with this document
    • setLockedBy

      @Deprecated public void setLockedBy(String lockedBy_)
      Deprecated.
      Tags the document as being locked by the user with the unique ID lockedBy
      Parameters:
      lockedBy_ - the unique id of the user who locked the file
    • setLockedAt

      public void setLockedAt(Timestamp lockedAt_)
      Deprecated.
      This field cannot be updated in the database.
      Parameters:
      lockedAt_ - the date and time that the document was locked.
      See Also:
    • setNumberOfVersions

      public void setNumberOfVersions(int numberOfVersions_)
      Deprecated.
      Updates the number of versions of this document
      Parameters:
      numberOfVersions_ - the new number of versions of this document that exist in the application
    • getStatus

      public int getStatus()
      Deprecated.
      Gets the status of the document (either STATUS_PUBLISHED or STATUS_UNPUBLISHED (latter not currently used))
      Returns:
      the status of the document
    • setStatus

      public void setStatus(int status_)
      Deprecated.
      Sets the status of the document (either STATUS_PUBLISHED or STATUS_UNPUBLISHED (latter not currently used))
      Parameters:
      status_ - the status of the document
    • getPendingApproval

      public int getPendingApproval()
      Deprecated.
      Gets the 'pending approval' status of the document.
      Returns:
      Returns the 'pending approval': PENDING_APPROVAL_CREATION, PENDING_APPROVAL_DELETION or APPROVED
    • setPendingApproval

      public void setPendingApproval(int pendingApproval_)
      Deprecated.
      Sets the 'pending approval' status of the document.
      Parameters:
      pendingApproval_ - The 'pending approval' status to set. Can be one of: PENDING_APPROVAL_CREATION, PENDING_APPROVAL_DELETION or APPROVED
    • clone

      public Object clone() throws CloneNotSupportedException
      Deprecated.
      Overrides:
      clone in class Object
      Throws:
      CloneNotSupportedException
    • getInternalFilename

      public String getInternalFilename()
      Deprecated.
      Gets the location of the file on disk if the document was retrieved using the downloadDocument() method in DocumentService. If the document was retrieved using getDocument(), this property will be empty.

      This should only be used for read only access.

      Returns:
      physical location on disk
    • setInternalFilename

      public void setInternalFilename(String internalFilename_)
      Deprecated.
      Sets file's physical location on disk
      Parameters:
      internalFilename_ - physical location on disk
    • getUuid

      @ConvertWith(com.appiancorp.kougar.mapper.parameters.UuidParameterConverter.class) public String getUuid()
      Deprecated.
    • setUuid

      public void setUuid(String uuid)
      Deprecated.
    • getLockedByUsername

      public String getLockedByUsername()
      Deprecated.
      Gets the username of the user that has locked the content, or blank if the content is not locked.
      Returns:
      the username
    • setLockedByUsername

      public void setLockedByUsername(String lockedByUsername)
      Deprecated.
      Sets the username of the user that has locked the content.
      Parameters:
      lockedByUsername - the username
    • getInputStream

      @Transient public DocumentInputStream getInputStream() throws AppianStorageException
      Deprecated.

      Opens a stream to a Document allowing for the caller to read its contents if the document was retrieved using the DocumentService.downloadDocument(Long, Integer, int) method in DocumentService.

      Returns:
      DocumentInputStream containing the contents of the Document
      Throws:
      AppianStorageException - if an error occurs while opening the input stream for the file
      See Also:
    • getOutputStream

      @Transient public DocumentOutputStream getOutputStream() throws AppianStorageException
      Deprecated.

      Opens a stream to a Document allowing for the caller to write its contents if the document was generated via the DocumentService.createDocument(Document) method in DocumentService.

      Returns:
      DocumentOutputStream containing the contents of the Document
      Throws:
      AppianStorageException - if an error occurs while opening the output stream for the file
      See Also:
    • write

      public void write(InputStream inputStream) throws AppianStorageException
      Deprecated.

      Write the contents of the inputStream to the Document if the document was generated via the DocumentService.createDocument(Document) method in DocumentService.

      Parameters:
      inputStream - the input stream to copy to the Document
      Throws:
      AppianStorageException - if an error occurs while writing the input stream contents to the file
      See Also:
    • accessAsReadOnlyFile

      public File accessAsReadOnlyFile() throws AppianStorageException
      Deprecated.

      A function that returns a File object that represents the document. Use ONLY if you need to access the file using a file on disk and if the document was retrieved using the DocumentService.downloadDocument(Long, Integer, int) method in DocumentService.

      Ensures the file is available on disk for the given application server. Updates to file are not supported; please create a new version/Document using ContentService.uploadDocument(com.appiancorp.suiteapi.knowledge.Document, java.lang.Integer), or override existing contents with getOutputStream() or write(java.io.InputStream).

      Returns:
      File containing the contents of the Document
      Throws:
      AppianStorageException - if an error occurs while accessing the file
      See Also: