Class Document
- All Implemented Interfaces:
LocalId
,Serializable
,Cloneable
- Direct Known Subclasses:
DocumentStatistics
This class represents a versioned document in the collaboration application.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Deprecated.Field signifying that a document has been approved (or does not require approval)static final Integer
Deprecated.Version field for the current version of a documentstatic final int
Deprecated.Field signifying that a document is pending approval for creationstatic final int
Deprecated.Field signifying that a document is pending approval for deletionstatic final boolean
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final Integer
Deprecated.static final String
Deprecated.Sort documents by their date of expirationstatic final String
Deprecated.Sort documents by their extensionstatic final String
Deprecated.Sort document by the user who last modified the documents.static final String
Deprecated.Sort documents by their last date of modification.static final String
Deprecated.Sort documents by namestatic final String
Deprecated.Sort documents by the number of versions that they havestatic final String
Deprecated.Sort documents by their parent knowledge center namestatic final String
Deprecated.Sort documents by their size in bytesstatic final int
Deprecated.Status field for a published documentstatic final int
Deprecated.Status field for an unpublished document (This is not currently used. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDeprecated.A function that returns aFile
object that represents the document.clone()
Deprecated.Deprecated.Gets the date and time that this document was created/first uploadedDeprecated.Gets the description (if any) of the documentDeprecated.Gets the date and time that this document will expireDeprecated.Retrieves the file extension (eg, exe, txt, doc) for this documentDeprecated.Retrieves the system ID that the collaboration application uses to identify the document physically on the driveDeprecated.Gets the unique ID of the folder which contains the documentDeprecated.Gets the name of the folder which contains the documentgetForum()
Deprecated.Retrieves the discussion forum associated with this documentgetId()
Deprecated.Gets the unique ID of the document.Deprecated.Opens a stream to a Document allowing for the caller to read its contents if the document was retrieved using theDocumentService.downloadDocument(Long, Integer, int)
method inDocumentService
.Deprecated.Gets the location of the file on disk if the document was retrieved using the downloadDocument() method inDocumentService
.Deprecated.Gets the unique ID of the knowledge center which contains the documentDeprecated.Gets the name of the knowledge center which contains the documentDeprecated.Retrieves the unique ID of the last user to modify the fileDeprecated.Gets the date and time that the document was locked, ornull
if the document is not locked.Deprecated.Deprecated.Gets the username of the user that has locked the content, orblank
if the content is not locked.getName()
Deprecated.Gets the name of the documentint
Deprecated.Gets the number of versions of this documentDeprecated.Opens a stream to a Document allowing for the caller to write its contents if the document was generated via theDocumentService.createDocument(Document)
method inDocumentService
.Deprecated.Retrieves the path where the collaboration application stores the physical document on the driveint
Deprecated.Gets the 'pending approval' status of the document.long
getSize()
Deprecated.Get the size of the documentdouble
Deprecated.Gets the number of KBytes in the file rounded to 2 decimals.int
Deprecated.Gets the status of the document (either STATUS_PUBLISHED or STATUS_UNPUBLISHED (latter not currently used))int
Deprecated.ReturnsgetNumberOfVersions()
+ 1.getUuid()
Deprecated.Deprecated.Gets the version number of the documentboolean
Deprecated.Checks whether the document (or its changes) have been approvedboolean
Deprecated.Checks whether changes to this document require approval before being available in the applicationvoid
setApproved
(boolean approved_) Deprecated.Sets whether the document (or its changes) have been approvedvoid
setChangesRequireApproval
(boolean b_) Deprecated.Sets whether changes to this document require approvalvoid
setDateCreated
(Timestamp dtcreated_) Deprecated.Sets the date and time at which the document was created.void
setDescription
(String desc_) Deprecated.Sets the document descriptionvoid
setExpirationDate
(Timestamp dtexpire_) Deprecated.Sets the expiration date of the documentvoid
setExtension
(String ext_) Deprecated.Sets the file extension of the documentvoid
setFileSystemId
(Long fsid_) Deprecated.Sets the system ID that the collaboration application uses to identify the document physically on the drivevoid
setFolderId
(Long fid_) Deprecated.Sets the parent folder of the document to be that of the folder with unique IDfid
void
setFolderName
(String fname_) Deprecated.Sets the parent folder of the document to be that of the folder with the namefname
void
Deprecated.Relates the discussion forum with unique IDdtid
with this documentvoid
Deprecated.Sets the unique ID of this documentvoid
setInternalFilename
(String internalFilename_) Deprecated.Sets file's physical location on diskvoid
setKnowledgeCenterId
(Long kcid_) Deprecated.Sets the parent knowledge center for this document to be the one where the unique ID iskcid
void
setKnowledgeCenterName
(String kcname_) Deprecated.Sets the parent knowledge center for this document to be the one where the name iskcname
void
setLastUserToModify
(String luid_) Deprecated.Sets the last user to modify the document to the user with the unique IDluid
void
setLockedAt
(Timestamp lockedAt_) Deprecated.This field cannot be updated in the database.void
setLockedBy
(String lockedBy_) Deprecated.void
setLockedByUsername
(String lockedByUsername) Deprecated.Sets the username of the user that has locked the content.void
Deprecated.Set the name of the documentvoid
setNumberOfVersions
(int numberOfVersions_) Deprecated.Updates the number of versions of this documentvoid
setPartition
(String part_) Deprecated.Sets the path where the collaboration application stores the physical document on the drivevoid
setPendingApproval
(int pendingApproval_) Deprecated.Sets the 'pending approval' status of the document.void
setSize
(long size_) Deprecated.Sets the size of the documentvoid
setStatus
(int status_) Deprecated.Sets the status of the document (either STATUS_PUBLISHED or STATUS_UNPUBLISHED (latter not currently used))void
Deprecated.void
setVersionId
(Long vid_) Deprecated.Sets the version number of the documentvoid
write
(InputStream inputStream) Deprecated.Write the contents of the inputStream to the Document if the document was generated via theDocumentService.createDocument(Document)
method inDocumentService
.
-
Field Details
-
SORT_COLUMN_NAME
Deprecated.Sort documents by name- See Also:
-
SORT_COLUMN_LAST_MODIFIED_DATE
Deprecated.Sort documents by their last date of modification. The last date of modification of aDocument
is its upload date or the date of its last version.- See Also:
-
SORT_COLUMN_SIZE
Deprecated.Sort documents by their size in bytes- See Also:
-
SORT_COLUMN_LAST_MODIFIED_BY
Deprecated.Sort document by the user who last modified the documents. The last date of modification of aDocument
is its upload date or the date of its last version.- See Also:
-
SORT_COLUMN_PARENT_KNOWLEDGE_CENTER_NAME
Deprecated.Sort documents by their parent knowledge center name- See Also:
-
SORT_COLUMN_EXTENSION
Deprecated.Sort documents by their extension- See Also:
-
SORT_COLUMN_EXPIRATION_DATE
Deprecated.Sort documents by their date of expiration- See Also:
-
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_PUBLISHEDDeprecated.Status field for a published document- See Also:
-
STATUS_UNPUBLISHED
public static final int STATUS_UNPUBLISHEDDeprecated.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
Deprecated.Version field for the current version of a document -
PENDING_APPROVAL_CREATION
public static final int PENDING_APPROVAL_CREATIONDeprecated.Field signifying that a document is pending approval for creation- See Also:
-
PENDING_APPROVAL_DELETION
public static final int PENDING_APPROVAL_DELETIONDeprecated.Field signifying that a document is pending approval for deletion- See Also:
-
APPROVED
public static final int APPROVEDDeprecated.Field signifying that a document has been approved (or does not require approval)- See Also:
-
SORT_BY_ID
Deprecated. -
SORT_BY_FILE_SYSTEM_ID
Deprecated. -
SORT_BY_PARTITION
Deprecated. -
SORT_BY_NAME
Deprecated. -
SORT_BY_EXTENSION
Deprecated. -
SORT_BY_DESCRIPTION
Deprecated. -
SORT_BY_EXPIRATION_DATE
Deprecated. -
SORT_BY_FOLDER_NAME
Deprecated. -
SORT_BY_FOLDER_ID
Deprecated. -
SORT_BY_KNOWLEDGE_CENTER_NAME
Deprecated. -
SORT_BY_KNOWLEDGE_CENTER_ID
Deprecated. -
SORT_BY_CHANGES_REQUIRE_APPROVAL
Deprecated. -
SORT_BY_DATE_CREATED
Deprecated. -
SORT_BY_STATUS
Deprecated. -
SORT_BY_APPROVED
Deprecated. -
SORT_BY_SIZE
Deprecated. -
SORT_BY_LAST_USER_TO_MODIFY
Deprecated. -
SORT_BY_NUMBER_OF_VERSIONS
Deprecated. -
SORT_BY_VERSION_ID
Deprecated. -
SORT_BY_LOCKED_BY
Deprecated. -
SORT_BY_DISCUSSION_THREAD
Deprecated. -
SORT_BY_PENDING_APPROVAL
Deprecated. -
sizeInKB$TRANSIENT
public static final boolean sizeInKB$TRANSIENTDeprecated.- 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
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
Deprecated.Gets the description (if any) of the document- Returns:
- the description of the document
-
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
Deprecated.Retrieves the file extension (eg, exe, txt, doc) for this document- Returns:
- the file extension of the document
-
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
Deprecated.Gets the unique ID of the folder which contains the document- Returns:
- the unique ID of the folder which contains the document
-
getFolderName
Deprecated.Gets the name of the folder which contains the document- Returns:
- the name of the folder which contains the document
-
getId
Deprecated.Gets the unique ID of the document. -
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
Deprecated.Gets the name of the knowledge center which contains the document- Returns:
- the name of the knowledge center which contains the document
-
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
Deprecated.Gets the name of the document- Returns:
- the name of the ducument
-
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
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
Deprecated.Sets the date and time at which the document was created.- Parameters:
dtcreated_
- the date and time (combined as aTimestamp
) at which the document was created
-
setDescription
Deprecated.Sets the document description- Parameters:
desc_
- the description of the document
-
setExpirationDate
Deprecated.Sets the expiration date of the document- Parameters:
dtexpire_
- the expiration date of the document
-
setExtension
Deprecated.Sets the file extension of the document- Parameters:
ext_
- the file extenstion of the document
-
setFileSystemId
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
Deprecated.Sets the parent folder of the document to be that of the folder with unique IDfid
- Parameters:
fid_
- the unique ID of the folder
-
setFolderName
Deprecated.Sets the parent folder of the document to be that of the folder with the namefname
- Parameters:
fname_
- the name of the folder
-
setId
Deprecated.Sets the unique ID of this document -
setKnowledgeCenterId
Deprecated.Sets the parent knowledge center for this document to be the one where the unique ID iskcid
- Parameters:
kcid_
- the unique ID of the knowledge center
-
setKnowledgeCenterName
Deprecated.Sets the parent knowledge center for this document to be the one where the name iskcname
- Parameters:
kcname_
- the name of the knowledge center
-
setLastUserToModify
Deprecated.Sets the last user to modify the document to the user with the unique IDluid
- Parameters:
luid_
- the unique ID of the user who last modified the document
-
setName
Deprecated.Set the name of the document- Parameters:
dname_
- the name of the document
-
setPartition
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
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
Deprecated.Retrieves the discussion forum associated with this document- Returns:
- the unique ID of the discussion forum associated with this document
-
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
Deprecated.Gets the date and time that the document was locked, ornull
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.ReturnsgetNumberOfVersions()
+ 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
Deprecated.Relates the discussion forum with unique IDdtid
with this document- Parameters:
forumId_
- the unique ID of the discussion forum associated with this document
-
setLockedBy
Deprecated.Tags the document as being locked by the user with the unique IDlockedBy
- Parameters:
lockedBy_
- the unique id of the user who locked the file
-
setLockedAt
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
Deprecated.- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
getInternalFilename
Deprecated.Gets the location of the file on disk if the document was retrieved using the downloadDocument() method inDocumentService
. 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
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
Deprecated. -
getLockedByUsername
Deprecated.Gets the username of the user that has locked the content, orblank
if the content is not locked.- Returns:
- the username
-
setLockedByUsername
Deprecated.Sets the username of the user that has locked the content.- Parameters:
lockedByUsername
- the username
-
getInputStream
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 inDocumentService
.- 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
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 inDocumentService
.- 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
Deprecated.Write the contents of the inputStream to the Document if the document was generated via the
DocumentService.createDocument(Document)
method inDocumentService
.- 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
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 theDocumentService.downloadDocument(Long, Integer, int)
method inDocumentService
.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 withgetOutputStream()
orwrite(java.io.InputStream)
.- Returns:
- File containing the contents of the Document
- Throws:
AppianStorageException
- if an error occurs while accessing the file- See Also:
-
Document
instead.