Document
instead.@Deprecated public class Document extends java.lang.Object implements LocalId, java.lang.Cloneable, java.io.Serializable
This class represents a versioned document in the collaboration application.
Modifier and Type | Field and Description |
---|---|
static int |
APPROVED
Deprecated.
Field signifying that a document has been approved (or does not require
approval)
|
static java.lang.Integer |
CURRENT_VERSION
Deprecated.
Version field for the current version of a document
|
static int |
PENDING_APPROVAL_CREATION
Deprecated.
Field signifying that a document is pending approval for creation
|
static int |
PENDING_APPROVAL_DELETION
Deprecated.
Field signifying that a document is pending approval for deletion
|
static boolean |
sizeInKB$TRANSIENT
Deprecated.
|
static java.lang.Integer |
SORT_BY_APPROVED
Deprecated.
|
static java.lang.Integer |
SORT_BY_CHANGES_REQUIRE_APPROVAL
Deprecated.
|
static java.lang.Integer |
SORT_BY_DATE_CREATED
Deprecated.
|
static java.lang.Integer |
SORT_BY_DESCRIPTION
Deprecated.
|
static java.lang.Integer |
SORT_BY_DISCUSSION_THREAD
Deprecated.
|
static java.lang.Integer |
SORT_BY_EXPIRATION_DATE
Deprecated.
|
static java.lang.Integer |
SORT_BY_EXTENSION
Deprecated.
|
static java.lang.Integer |
SORT_BY_FILE_SYSTEM_ID
Deprecated.
|
static java.lang.Integer |
SORT_BY_FOLDER_ID
Deprecated.
|
static java.lang.Integer |
SORT_BY_FOLDER_NAME
Deprecated.
|
static java.lang.Integer |
SORT_BY_ID
Deprecated.
|
static java.lang.Integer |
SORT_BY_KNOWLEDGE_CENTER_ID
Deprecated.
|
static java.lang.Integer |
SORT_BY_KNOWLEDGE_CENTER_NAME
Deprecated.
|
static java.lang.Integer |
SORT_BY_LAST_USER_TO_MODIFY
Deprecated.
|
static java.lang.Integer |
SORT_BY_LOCKED_BY
Deprecated.
|
static java.lang.Integer |
SORT_BY_NAME
Deprecated.
|
static java.lang.Integer |
SORT_BY_NUMBER_OF_VERSIONS
Deprecated.
|
static java.lang.Integer |
SORT_BY_PARTITION
Deprecated.
|
static java.lang.Integer |
SORT_BY_PENDING_APPROVAL
Deprecated.
|
static java.lang.Integer |
SORT_BY_SIZE
Deprecated.
|
static java.lang.Integer |
SORT_BY_STATUS
Deprecated.
|
static java.lang.Integer |
SORT_BY_VERSION_ID
Deprecated.
|
static java.lang.String |
SORT_COLUMN_EXPIRATION_DATE
Deprecated.
Sort documents by their date of expiration
|
static java.lang.String |
SORT_COLUMN_EXTENSION
Deprecated.
Sort documents by their extension
|
static java.lang.String |
SORT_COLUMN_LAST_MODIFIED_BY
Deprecated.
Sort document by the user who last modified the documents.
|
static java.lang.String |
SORT_COLUMN_LAST_MODIFIED_DATE
Deprecated.
Sort documents by their last date of modification.
|
static java.lang.String |
SORT_COLUMN_NAME
Deprecated.
Sort documents by name
|
static java.lang.String |
SORT_COLUMN_NUMBER_OF_VERSIONS
Deprecated.
Sort documents by the number of versions that they have
|
static java.lang.String |
SORT_COLUMN_PARENT_KNOWLEDGE_CENTER_NAME
Deprecated.
Sort documents by their parent knowledge center name
|
static java.lang.String |
SORT_COLUMN_SIZE
Deprecated.
Sort documents by their size in bytes
|
static int |
STATUS_PUBLISHED
Deprecated.
Status field for a published document
|
static int |
STATUS_UNPUBLISHED
Deprecated.
Status field for an unpublished document (This is not currently used.
|
Constructor and Description |
---|
Document()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.io.File |
accessAsReadOnlyFile()
Deprecated.
A function that returns a
File object that represents the document. |
java.lang.Object |
clone()
Deprecated.
|
java.sql.Timestamp |
getDateCreated()
Deprecated.
Gets the date and time that this document was created/first uploaded
|
java.lang.String |
getDescription()
Deprecated.
Gets the description (if any) of the document
|
java.sql.Timestamp |
getExpirationDate()
Deprecated.
Gets the date and time that this document will expire
|
java.lang.String |
getExtension()
Deprecated.
Retrieves the file extension (eg, exe, txt, doc) for this document
|
java.lang.Long |
getFileSystemId()
Deprecated.
Retrieves the system ID that the collaboration application uses to
identify the document physically on the drive
|
java.lang.Long |
getFolderId()
Deprecated.
Gets the unique ID of the folder which contains the document
|
java.lang.String |
getFolderName()
Deprecated.
Gets the name of the folder which contains the document
|
java.lang.Long |
getForum()
Deprecated.
Retrieves the discussion forum associated with this document
|
java.lang.Long |
getId()
Deprecated.
Gets the unique ID of the document.
|
DocumentInputStream |
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 in
DocumentService . |
java.lang.String |
getInternalFilename()
Deprecated.
Gets the location of the file on disk if the document
was retrieved using the downloadDocument() method in
DocumentService . |
java.lang.Long |
getKnowledgeCenterId()
Deprecated.
Gets the unique ID of the knowledge center which contains the document
|
java.lang.String |
getKnowledgeCenterName()
Deprecated.
Gets the name of the knowledge center which contains the document
|
java.lang.String |
getLastUserToModify()
Deprecated.
Retrieves the unique ID of the last user to modify the file
|
java.sql.Timestamp |
getLockedAt()
Deprecated.
Gets the date and time that the document was locked, or
null if the document is not locked. |
java.lang.String |
getLockedBy()
Deprecated.
|
java.lang.String |
getLockedByUsername()
Deprecated.
Gets the username of the user that has locked the content, or
blank if the content is not locked. |
java.lang.String |
getName()
Deprecated.
Gets the name of the document
|
int |
getNumberOfVersions()
Deprecated.
Gets the number of versions of this document
|
DocumentOutputStream |
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 in
DocumentService . |
java.lang.String |
getPartition()
Deprecated.
Retrieves the path where the collaboration application stores the physical
document on the drive
|
int |
getPendingApproval()
Deprecated.
Gets the 'pending approval' status of the document.
|
long |
getSize()
Deprecated.
Get the size of the document
|
double |
getSizeInKB()
Deprecated.
Gets the number of KBytes in the file rounded to 2 decimals.
|
int |
getStatus()
Deprecated.
Gets the status of the document (either STATUS_PUBLISHED or
STATUS_UNPUBLISHED (latter not currently used))
|
int |
getTotalNumberOfVersions()
Deprecated.
Returns
getNumberOfVersions() + 1. |
java.lang.String |
getUuid()
Deprecated.
|
java.lang.Long |
getVersionId()
Deprecated.
Gets the version number of the document
|
boolean |
isApproved()
Deprecated.
Checks whether the document (or its changes) have been approved
|
boolean |
isChangesRequireApproval()
Deprecated.
Checks whether changes to this document require approval before being
available in the application
|
void |
setApproved(boolean approved_)
Deprecated.
Sets whether the document (or its changes) have been approved
|
void |
setChangesRequireApproval(boolean b_)
Deprecated.
Sets whether changes to this document require approval
|
void |
setDateCreated(java.sql.Timestamp dtcreated_)
Deprecated.
Sets the date and time at which the document was created.
|
void |
setDescription(java.lang.String desc_)
Deprecated.
Sets the document description
|
void |
setExpirationDate(java.sql.Timestamp dtexpire_)
Deprecated.
Sets the expiration date of the document
|
void |
setExtension(java.lang.String ext_)
Deprecated.
Sets the file extension of the document
|
void |
setFileSystemId(java.lang.Long fsid_)
Deprecated.
Sets the system ID that the collaboration application uses to identify the
document physically on the drive
|
void |
setFolderId(java.lang.Long fid_)
Deprecated.
Sets the parent folder of the document to be that of the folder with
unique ID
fid |
void |
setFolderName(java.lang.String fname_)
Deprecated.
Sets the parent folder of the document to be that of the folder with the
name
fname |
void |
setForum(java.lang.Long forumId_)
Deprecated.
Relates the discussion forum with unique ID
dtid with this
document |
void |
setId(java.lang.Long id_)
Deprecated.
Sets the unique ID of this document
|
void |
setInternalFilename(java.lang.String internalFilename_)
Deprecated.
Sets file's physical location on disk
|
void |
setKnowledgeCenterId(java.lang.Long kcid_)
Deprecated.
Sets the parent knowledge center for this document to be the one where the
unique ID is
kcid |
void |
setKnowledgeCenterName(java.lang.String kcname_)
Deprecated.
Sets the parent knowledge center for this document to be the one where the
name is
kcname |
void |
setLastUserToModify(java.lang.String luid_)
Deprecated.
Sets the last user to modify the document to the user with the unique ID
luid |
void |
setLockedAt(java.sql.Timestamp lockedAt_)
Deprecated.
This field cannot be updated in the database.
|
void |
setLockedBy(java.lang.String lockedBy_)
Deprecated.
|
void |
setLockedByUsername(java.lang.String lockedByUsername)
Deprecated.
Sets the username of the user that has locked the content.
|
void |
setName(java.lang.String dname_)
Deprecated.
Set the name of the document
|
void |
setNumberOfVersions(int numberOfVersions_)
Deprecated.
Updates the number of versions of this document
|
void |
setPartition(java.lang.String part_)
Deprecated.
Sets the path where the collaboration application stores the physical
document on the drive
|
void |
setPendingApproval(int pendingApproval_)
Deprecated.
Sets the 'pending approval' status of the document.
|
void |
setSize(long size_)
Deprecated.
Sets the size of the document
|
void |
setStatus(int status_)
Deprecated.
Sets the status of the document (either STATUS_PUBLISHED or
STATUS_UNPUBLISHED (latter not currently used))
|
void |
setUuid(java.lang.String uuid)
Deprecated.
|
void |
setVersionId(java.lang.Long vid_)
Deprecated.
Sets the version number of the document
|
void |
write(java.io.InputStream inputStream)
Deprecated.
Write the contents of the inputStream to the Document if the document was generated via the
DocumentService.createDocument(Document) method in
DocumentService . |
public static final java.lang.String SORT_COLUMN_NAME
public static final java.lang.String SORT_COLUMN_LAST_MODIFIED_DATE
Document
is its upload date or the date
of its last version.public static final java.lang.String SORT_COLUMN_SIZE
public static final java.lang.String SORT_COLUMN_LAST_MODIFIED_BY
Document
is its upload date or the
date of its last version.public static final java.lang.String SORT_COLUMN_PARENT_KNOWLEDGE_CENTER_NAME
public static final java.lang.String SORT_COLUMN_EXTENSION
public static final java.lang.String SORT_COLUMN_EXPIRATION_DATE
public static final java.lang.String SORT_COLUMN_NUMBER_OF_VERSIONS
public static final int STATUS_PUBLISHED
public static final int STATUS_UNPUBLISHED
public static final java.lang.Integer CURRENT_VERSION
public static final int PENDING_APPROVAL_CREATION
public static final int PENDING_APPROVAL_DELETION
public static final int APPROVED
public static final java.lang.Integer SORT_BY_ID
public static final java.lang.Integer SORT_BY_FILE_SYSTEM_ID
public static final java.lang.Integer SORT_BY_PARTITION
public static final java.lang.Integer SORT_BY_NAME
public static final java.lang.Integer SORT_BY_EXTENSION
public static final java.lang.Integer SORT_BY_DESCRIPTION
public static final java.lang.Integer SORT_BY_EXPIRATION_DATE
public static final java.lang.Integer SORT_BY_FOLDER_NAME
public static final java.lang.Integer SORT_BY_FOLDER_ID
public static final java.lang.Integer SORT_BY_KNOWLEDGE_CENTER_NAME
public static final java.lang.Integer SORT_BY_KNOWLEDGE_CENTER_ID
public static final java.lang.Integer SORT_BY_CHANGES_REQUIRE_APPROVAL
public static final java.lang.Integer SORT_BY_DATE_CREATED
public static final java.lang.Integer SORT_BY_STATUS
public static final java.lang.Integer SORT_BY_APPROVED
public static final java.lang.Integer SORT_BY_SIZE
public static final java.lang.Integer SORT_BY_LAST_USER_TO_MODIFY
public static final java.lang.Integer SORT_BY_NUMBER_OF_VERSIONS
public static final java.lang.Integer SORT_BY_VERSION_ID
public static final java.lang.Integer SORT_BY_LOCKED_BY
public static final java.lang.Integer SORT_BY_DISCUSSION_THREAD
public static final java.lang.Integer SORT_BY_PENDING_APPROVAL
public static final boolean sizeInKB$TRANSIENT
public boolean isChangesRequireApproval()
true
if changes to this cocument require approval;
false
otherwisepublic java.sql.Timestamp getDateCreated()
Timestamp
) that
the document was createdpublic java.lang.String getDescription()
public java.sql.Timestamp getExpirationDate()
Timestamp
) that
the document will expirepublic java.lang.String getExtension()
public java.lang.Long getFileSystemId()
public java.lang.Long getFolderId()
public java.lang.String getFolderName()
public java.lang.Long getId()
getId
in interface LocalId
LocalId.setId(Long)
public java.lang.Long getKnowledgeCenterId()
public java.lang.String getKnowledgeCenterName()
public java.lang.String getLastUserToModify()
public java.lang.String getName()
public java.lang.String getPartition()
public long getSize()
public double getSizeInKB()
public java.lang.Long getVersionId()
public void setChangesRequireApproval(boolean b_)
b_
- a boolean that determines if changes to this document require
approvalpublic void setDateCreated(java.sql.Timestamp dtcreated_)
dtcreated_
- the date and time (combined as a Timestamp
) at
which the document was createdpublic void setDescription(java.lang.String desc_)
desc_
- the description of the documentpublic void setExpirationDate(java.sql.Timestamp dtexpire_)
dtexpire_
- the expiration date of the documentpublic void setExtension(java.lang.String ext_)
ext_
- the file extenstion of the documentpublic void setFileSystemId(java.lang.Long fsid_)
fsid_
- the file system ID of this documentpublic void setFolderId(java.lang.Long fid_)
fid
fid_
- the unique ID of the folderpublic void setFolderName(java.lang.String fname_)
fname
fname_
- the name of the folderpublic void setId(java.lang.Long id_)
setId
in interface LocalId
id_
- the unique ID of the documentLocalId.getId()
public void setKnowledgeCenterId(java.lang.Long kcid_)
kcid
kcid_
- the unique ID of the knowledge centerpublic void setKnowledgeCenterName(java.lang.String kcname_)
kcname
kcname_
- the name of the knowledge centerpublic void setLastUserToModify(java.lang.String luid_)
luid
luid_
- the unique ID of the user who last modified the documentpublic void setName(java.lang.String dname_)
dname_
- the name of the documentpublic void setPartition(java.lang.String part_)
part_
- the path of the physical document on the drivepublic void setSize(long size_)
size_
- the size (in bytes) of the documentpublic void setVersionId(java.lang.Long vid_)
vid_
- the version number of the documentpublic boolean isApproved()
public java.lang.Long getForum()
@Deprecated public java.lang.String getLockedBy()
getLockedByUsername()
public java.sql.Timestamp getLockedAt()
null
if the document is not locked.public int getNumberOfVersions()
public int getTotalNumberOfVersions()
getNumberOfVersions()
+ 1.public void setApproved(boolean approved_)
approved_
- true
if the changes to this document have been
approved, false
otherwisepublic void setForum(java.lang.Long forumId_)
dtid
with this
documentforumId_
- the unique ID of the discussion forum associated with this
document@Deprecated public void setLockedBy(java.lang.String lockedBy_)
getLockedByUsername()
lockedBy
lockedBy_
- the unique id of the user who locked the filepublic void setLockedAt(java.sql.Timestamp lockedAt_)
lockedAt_
- the date and time that the document was locked.setLockedBy(String)
public void setNumberOfVersions(int numberOfVersions_)
numberOfVersions_
- the new number of versions of this document that exist in the
applicationpublic int getStatus()
public void setStatus(int status_)
status_
- the status of the documentpublic int getPendingApproval()
public void setPendingApproval(int pendingApproval_)
pendingApproval_
- The 'pending approval' status to set. Can be one of:
PENDING_APPROVAL_CREATION, PENDING_APPROVAL_DELETION or
APPROVEDpublic java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.String getInternalFilename()
DocumentService
.
If the document was retrieved using getDocument(),
this property will be empty.
This should only be used for read only access.
public void setInternalFilename(java.lang.String internalFilename_)
internalFilename_
- physical location on disk@ConvertWith(value=com.appiancorp.kougar.mapper.parameters.UuidParameterConverter.class) public java.lang.String getUuid()
public void setUuid(java.lang.String uuid)
public java.lang.String getLockedByUsername()
blank
if the content is not locked.public void setLockedByUsername(java.lang.String lockedByUsername)
lockedByUsername
- the username@Transient public DocumentInputStream getInputStream() throws AppianStorageException
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
.
AppianStorageException
- if an error occurs while opening the input stream for the fileDocumentService.downloadDocument(java.lang.Long, java.lang.Integer, int)
@Transient public DocumentOutputStream getOutputStream() throws AppianStorageException
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
.
AppianStorageException
- if an error occurs while opening the output stream for the fileDocumentService.createDocument(com.appiancorp.suiteapi.collaboration.Document)
public void write(java.io.InputStream inputStream) throws AppianStorageException
Write the contents of the inputStream to the Document if the document was generated via the
DocumentService.createDocument(Document)
method in
DocumentService
.
inputStream
- the input stream to copy to the DocumentAppianStorageException
- if an error occurs while writing the input stream contents to the fileDocumentService.createDocument(com.appiancorp.suiteapi.collaboration.Document)
public java.io.File accessAsReadOnlyFile() throws AppianStorageException
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)
.
AppianStorageException
- if an error occurs while accessing the fileContentService.uploadDocument(com.appiancorp.suiteapi.knowledge.Document, java.lang.Integer)
,
DocumentService.downloadDocument(java.lang.Long, java.lang.Integer, int)
,
getOutputStream()
,
write(InputStream)
Copyright © 2003-2024 Appian Corporation. All Rights Reserved.