Interface DocumentService
- All Superinterfaces:
com.appiancorp.services.ContextSensitiveService
,Service
Documents can have symbolic links, ie there can be a link to a document in a different location than where the document itself resides. A link provides direct access to the document and it is removed if the real document is removed.
Documents can be versioned using the createVersion()
or
createVersions()
methods which add new versions to an existing
document.
A document can also be locked, which prevents anyone from making changes to it (however, it is still accessible for viewing).
NOTE: This service does not actually write any documents to disk - it only provides functionality for storing and handling document metadata, so documents must still be manually written to disk. The path on disk to which a document should be written is obtained from doc.getInternalFilename() method. Note that this field is only populated when creating a new document object, creating a new version or retrieving the Documents with DocumentService.downloadDocument().
Methods of service classes can all throw the unchecked exception
ServiceException
if any
system-level error (for example, server failure) occurs, and will in general
throw a checked exception (InvalidXXXException
) when an entity
to be retrieved is inaccessible, instead of returning null
.
Exceptions to this paradigm (including the use of ResultList
as
described below) are noted. All checked exceptions extend
AppianException
.
It may be necessary to retrieve a subset of results as opposed to an entire
collection, and also to sort the subset by some property of the returned
object. "Paging" methods which return a
ResultPage
are provided in certain
instances for this purpose. The ResultPage
will contain the
sorted subset of results
(via Result.getResults()
), and the
total number of items in the available result set
(via ResultPage.getAvailableItems()
).
It may also be necessary to retrieve some results, even if all results
cannot be retrieved (for instance, some of the entities corresponding
to a list of entity IDs may no longer exist). Methods which return a
ResultList
are provided for this
purpose. The Result.getResults()
method in this case will return all results which can be retrieved. In
addition, there will be a list of result codes
(ResultList.getResultCodes()
) that
represent the successful retrieval of an entity, or, if the entity could
not be retrieved, the reason for the failure. See the CODE_XXX
constants in ResultList
for details.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.static final boolean
Deprecated.Fields inherited from interface com.appiancorp.services.ContextSensitiveService
SET_SERVICE_CONTEXT_METHOD_NAME
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDocumentsToFavorites
(Long[] doids_) Deprecated.Adds multiple documents to the current user's list of favourites.void
addDocumentToFavorites
(Long doid_) Deprecated.Adds a document to the current user's list of favorites.void
approveChangesForDocument
(Long doid_) Deprecated.Approves the changes for a document; to approve creation of a document, pass the id of the document, to approve deletion of a document, pass (-1 * (document id)).void
approveChangesForDocuments
(Long[] doids_) Deprecated.Approves changes for multiple documents; to approve creation of a document, pass the id of the document, to approve deletion of a document, pass (-1 * (document id)).void
approveChangesForVersion
(Long doid_, Integer vid_) Deprecated.Approves changes made for a specific version of a document; to approve creation of a version, pass the id of the document directly, to approve deletion of a version, pass (-1 * (document id)).void
approveChangesForVersions
(Long[] doids_, Integer[] vids_) Deprecated.Approves changes made for specific versions of multiple documents; approves the passed version of the corresponding document (ie each index indoids_
maps to an index invids_
).createDocument
(Document doc_) Deprecated.Create a document.Document[]
createDocuments
(Document[] docs_) Deprecated.Create multiple documents.void
createLink
(Long docId_, Long foid_) Deprecated.Creates a symbolic link to a document.void
createLinks
(Long[] docIds_, Long foid_) Deprecated.Creates a list of symbolic links to documents.void
createLinks
(Long[] docIds_, Long[] foids_) Deprecated.Creates multiple symbolic links to documents in a list of folders; a single link is created in each of the folders (ie each index indocIds_
maps to an index infoids_
).createVersion
(Document document_) Deprecated.Creates a new version of a document.Document[]
createVersions
(Document[] documents_) Deprecated.Creates new versions of multiple documents.void
deleteDocument
(Long doid_) Deprecated.Use the method#deactivate(Long, Boolean)
instead.void
deleteDocuments
(Long[] doids_) Deprecated.Use the method#deactivate(Long[], Boolean)
instead.void
deleteLink
(Long docId_, Long foId_) Deprecated.Deletes a symbolic link to a document from a folder.void
deleteLinks
(Long[] docIds_, Long foId_) Deprecated.Deletes multiple symbolic links from a folder.void
deleteVersion
(Long doid_, Integer versionId_) Deprecated.Use the method#deactivateVersion(Long, Integer, Boolean)
instead.void
deleteVersions
(Long doid_, Integer[] versionIds_) Deprecated.Use the method#deactivateVersions(Long, Integer[], Boolean)
instead.downloadDocument
(Long doid_, Integer vid_, int adminOverride_) Deprecated.Download a document.Document[]
downloadDocuments
(Long[] doids_, Integer vid_, int adminOverride_) Deprecated.Download multiple documents.Document[]
getAllVersionsForDocument
(Long doid_) getAllVersionsForDocumentPaging
(Long doid_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Deprecated.Gets all versions of a document, paging.Deprecated.Returns the Content Id given a Document Id.Long[]
getContentIdsForDocumentIds
(Long[] id_) Deprecated.Returns the Content Id given a Document Id.getDocument
(Long doid_) Deprecated.Retrieves a document (without the internalFilename property populated).Deprecated.Returns the document Id given a content Id.Long[]
getDocumentIdsForContentIds
(Long[] id_) Deprecated.Returns the document Id given a content Id.Document[]
getDocuments
(Long[] doids_) getDocumentsList
(Long[] docIds_) Deprecated.Gets the specified documents, returning the valid results even if all the results cannot be retrieved (for instance, if some of the documents corresponding to the ids no longer exist).getDocumentsPaging
(Long[] doids_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Deprecated.Retrieves several documents (without the internalFilename property populated).Document[]
getFavoriteDocuments
(Integer sortOrder_, String sortColumn_) getFavoriteDocumentsPaging
(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Deprecated.Retrieves the list of the current user's favorite documents, paging.getSystemDocumentId
(String name_) Deprecated.getVersion
(Long doid_, Integer versionId_) Deprecated.Gets a specific version of a document.Document[]
getVersions
(Long doid_, Integer[] versionIds_) getVersionsPaging
(Long doid_, Integer[] versionIds_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Deprecated.Gets specific versions of a document, paging.getViewableDocumentsPaging
(Long[] documentIds_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Deprecated.Gets the documents that the current user is allowed to access from a list of documents.void
lockDocument
(Long doid_) Deprecated.Locks a document.void
moveDocument
(Long docid_, Long newFolderId_) Deprecated.Moves a document to another folder.void
moveDocuments
(Long[] docids_, Long newFolderId_) Deprecated.Moves multiple documents to another folder.void
rejectChangesForDocument
(Long doid_) Deprecated.Rejects changes made to a document; to reject creation of a document, pass the id of the document, to reject deletion of a document, pass (-1 * (document id)).void
rejectChangesForDocuments
(Long[] doids_) Deprecated.Rejects changes made to multiple documents; to reject creation of a document, pass the id of the document, to reject deletion of a document, pass (-1 * (document id)).void
rejectChangesForVersion
(Long doid_, Integer vid_) Deprecated.Rejects the changes made for a specific version of a document; to reject creation of a version, pass the id of the document directly, to reject deletion of a version, pass (-1 * (document id)).void
rejectChangesForVersions
(Long[] doids_, Integer[] vids_) Deprecated.Rejects changes made for specific versions of multiple documents; to reject creation of a version, pass the id of the document directly, to reject deletion of a version, pass (-1 * (document id)).void
removeDocumentFromFavorites
(Long doid_) Deprecated.Removes a document from the current user's list of favorites.void
removeDocumentsFromFavorites
(Long[] doids_) Deprecated.Removes multiple documents from the current user's list of favorites.Document[]
searchDocuments
(String searchTerm_, int startIndex_, int scrollLength_) searchDocumentsPaging
(String searchTerm_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) Deprecated.Search for documents by name.void
setSystemDocumentId
(String name_, Long id_) Deprecated.usecreateDocument(Document)
with a pre-populated UUIDsuggest
(String query_, int maxItems_, SuggestParam[] params_, Boolean groupResults_) Deprecated.suggest
(String query_, int maxItems_, SuggestParam[] params_, Boolean groupResults_, Long[] allowList) Deprecated.void
undeleteDocument
(Long doid_) Deprecated.Reactivates (undeletes) a document (NOTE: This method does not currently check whether the user has permission to reactivate the document).void
unexpireDocuments
(Long kcid_, Long[] doids_) Deprecated.Unexpires multiple documents.void
unlockDocument
(Long doid_) Deprecated.Unlocks a document.void
updateDocument
(Document doc_) Deprecated.Updates a document.void
updateDocuments
(Document[] docs_) Deprecated.Updates multiple documents.void
Deprecated.Updates the discussion forum associated with a document.void
updateForumForDocuments
(Document[] docs_) Deprecated.Updates the discussion forums associated with multiple documents.validateDocumentId
(Long id_) Deprecated.Validates a document ID.Integer[]
validateDocumentIds
(Long[] ids_) Deprecated.Validates document ids.Methods inherited from interface com.appiancorp.services.ContextSensitiveService
setServiceContext
-
Field Details
-
createDocument$UPDATES
static final boolean createDocument$UPDATESDeprecated.- See Also:
-
createDocuments$UPDATES
static final boolean createDocuments$UPDATESDeprecated.- See Also:
-
updateDocument$UPDATES
static final boolean updateDocument$UPDATESDeprecated.- See Also:
-
updateDocuments$UPDATES
static final boolean updateDocuments$UPDATESDeprecated.- See Also:
-
updateForumForDocument$UPDATES
static final boolean updateForumForDocument$UPDATESDeprecated.- See Also:
-
updateForumForDocuments$UPDATES
static final boolean updateForumForDocuments$UPDATESDeprecated.- See Also:
-
deleteDocument$UPDATES
static final boolean deleteDocument$UPDATESDeprecated.- See Also:
-
deleteDocuments$UPDATES
static final boolean deleteDocuments$UPDATESDeprecated.- See Also:
-
getDocument$UPDATES
static final boolean getDocument$UPDATESDeprecated.- See Also:
-
getDocumentsPaging$UPDATES
static final boolean getDocumentsPaging$UPDATESDeprecated.- See Also:
-
getDocuments$UPDATES
static final boolean getDocuments$UPDATESDeprecated.- See Also:
-
moveDocument$UPDATES
static final boolean moveDocument$UPDATESDeprecated.- See Also:
-
moveDocuments$UPDATES
static final boolean moveDocuments$UPDATESDeprecated.- See Also:
-
unlockDocument$UPDATES
static final boolean unlockDocument$UPDATESDeprecated.- See Also:
-
lockDocument$UPDATES
static final boolean lockDocument$UPDATESDeprecated.- See Also:
-
createLink$UPDATES
static final boolean createLink$UPDATESDeprecated.- See Also:
-
createLinks$UPDATES
static final boolean createLinks$UPDATESDeprecated.- See Also:
-
deleteLink$UPDATES
static final boolean deleteLink$UPDATESDeprecated.- See Also:
-
deleteLinks$UPDATES
static final boolean deleteLinks$UPDATESDeprecated.- See Also:
-
createVersion$UPDATES
static final boolean createVersion$UPDATESDeprecated.- See Also:
-
createVersions$UPDATES
static final boolean createVersions$UPDATESDeprecated.- See Also:
-
deleteVersion$UPDATES
static final boolean deleteVersion$UPDATESDeprecated.- See Also:
-
deleteVersions$UPDATES
static final boolean deleteVersions$UPDATESDeprecated.- See Also:
-
getVersion$UPDATES
static final boolean getVersion$UPDATESDeprecated.- See Also:
-
getVersionsPaging$UPDATES
static final boolean getVersionsPaging$UPDATESDeprecated.- See Also:
-
getVersions$UPDATES
static final boolean getVersions$UPDATESDeprecated.- See Also:
-
getAllVersionsForDocument$UPDATES
static final boolean getAllVersionsForDocument$UPDATESDeprecated.- See Also:
-
getAllVersionsForDocumentPaging$UPDATES
static final boolean getAllVersionsForDocumentPaging$UPDATESDeprecated.- See Also:
-
approveChangesForDocument$UPDATES
static final boolean approveChangesForDocument$UPDATESDeprecated.- See Also:
-
approveChangesForDocuments$UPDATES
static final boolean approveChangesForDocuments$UPDATESDeprecated.- See Also:
-
rejectChangesForDocument$UPDATES
static final boolean rejectChangesForDocument$UPDATESDeprecated.- See Also:
-
rejectChangesForDocuments$UPDATES
static final boolean rejectChangesForDocuments$UPDATESDeprecated.- See Also:
-
approveChangesForVersion$UPDATES
static final boolean approveChangesForVersion$UPDATESDeprecated.- See Also:
-
approveChangesForVersions$UPDATES
static final boolean approveChangesForVersions$UPDATESDeprecated.- See Also:
-
rejectChangesForVersion$UPDATES
static final boolean rejectChangesForVersion$UPDATESDeprecated.- See Also:
-
rejectChangesForVersions$UPDATES
static final boolean rejectChangesForVersions$UPDATESDeprecated.- See Also:
-
getFavoriteDocuments$UPDATES
static final boolean getFavoriteDocuments$UPDATESDeprecated.- See Also:
-
getFavoriteDocumentsPaging$UPDATES
static final boolean getFavoriteDocumentsPaging$UPDATESDeprecated.- See Also:
-
addDocumentToFavorites$UPDATES
static final boolean addDocumentToFavorites$UPDATESDeprecated.- See Also:
-
addDocumentsToFavorites$UPDATES
static final boolean addDocumentsToFavorites$UPDATESDeprecated.- See Also:
-
removeDocumentFromFavorites$UPDATES
static final boolean removeDocumentFromFavorites$UPDATESDeprecated.- See Also:
-
removeDocumentsFromFavorites$UPDATES
static final boolean removeDocumentsFromFavorites$UPDATESDeprecated.- See Also:
-
downloadDocument$UPDATES
static final boolean downloadDocument$UPDATESDeprecated.- See Also:
-
downloadDocuments$UPDATES
static final boolean downloadDocuments$UPDATESDeprecated.- See Also:
-
undeleteDocument$UPDATES
static final boolean undeleteDocument$UPDATESDeprecated.- See Also:
-
unexpireDocuments$UPDATES
static final boolean unexpireDocuments$UPDATESDeprecated.- See Also:
-
validateDocumentIds$UPDATES
static final boolean validateDocumentIds$UPDATESDeprecated.- See Also:
-
validateDocumentId$UPDATES
static final boolean validateDocumentId$UPDATESDeprecated.- See Also:
-
searchDocuments$UPDATES
static final boolean searchDocuments$UPDATESDeprecated.- See Also:
-
searchDocumentsPaging$UPDATES
static final boolean searchDocumentsPaging$UPDATESDeprecated.- See Also:
-
getViewableDocumentsPaging$UPDATES
static final boolean getViewableDocumentsPaging$UPDATESDeprecated.- See Also:
-
getDocumentsList$UPDATES
static final boolean getDocumentsList$UPDATESDeprecated.- See Also:
-
getSystemDocumentId$UPDATES
static final boolean getSystemDocumentId$UPDATESDeprecated.- See Also:
-
setSystemDocumentId$UPDATES
static final boolean setSystemDocumentId$UPDATESDeprecated.- See Also:
-
suggest$UPDATES
static final boolean suggest$UPDATESDeprecated.- See Also:
-
getContentIdForDocumentId$UPDATES
static final boolean getContentIdForDocumentId$UPDATESDeprecated.- See Also:
-
getContentIdsForDocumentIds$UPDATES
static final boolean getContentIdsForDocumentIds$UPDATESDeprecated.- See Also:
-
getDocumentIdForContentId$UPDATES
static final boolean getDocumentIdForContentId$UPDATESDeprecated.- See Also:
-
getDocumentIdsForContentIds$UPDATES
static final boolean getDocumentIdsForContentIds$UPDATESDeprecated.- See Also:
-
-
Method Details
-
createDocument
Document createDocument(Document doc_) throws InvalidUserException, InvalidFolderException, InvalidDocumentException, PrivilegeException, StorageLimitException Deprecated.Create a document.- Parameters:
doc_
- aDocument
object which should contain all of the information required to create a valid document.
The minimum required fields are:name
,description
(can benull
or "", if not set),extension
,size
,folderId
, andstatus
.- Returns:
- the created document
- Throws:
InvalidUserException
- if the user calling this method is invalidInvalidFolderException
- if the folder ID specified by the document does not correspond to a valid folderInvalidDocumentException
- if the document does not contain all of the required informationPrivilegeException
- if the current user is neither an editor nor an administrator of the folderStorageLimitException
- if the current user is not an administrator and will exceed his/her quota on a community KC by creating this document in itServiceException
- if any system-level error occurs
-
createDocuments
Document[] createDocuments(Document[] docs_) throws InvalidUserException, InvalidFolderException, InvalidDocumentException, PrivilegeException, StorageLimitException Deprecated.Create multiple documents.- Parameters:
docs_
- an array ofDocument
objects which should contain all of the information required to create valid documents.
The minimum required fields are:name
,description
(can benull
or "", if not set),extension
,size
,folderId
, andstatus
.- Returns:
- the created documents
- Throws:
InvalidUserException
- if the user calling this method is invalidInvalidFolderException
- if the folder ID specified by any of the documents does not correspond to a valid folderInvalidDocumentException
- if any of the documents does not contain all of the required informationPrivilegeException
- if the current user is neither an editor nor an administrator of the folderStorageLimitException
- if the current user is not an administrator and will exceed his/her quota on a community KC by creating this document in itServiceException
- if any system-level error occurs
-
updateDocument
void updateDocument(Document doc_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException Deprecated.Updates a document.- Parameters:
doc_
- aDocument
object, which should contain all of the information required to update a document.
The minimum required fields are:name
,description
(can be an emptyString
),extension
,size
,folderId
,status
andid
.- Throws:
InvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is neither an editor nor an administrator of the folderInvalidDocumentException
- if the ID of the document does not correspond to a valid documentInvalidFolderException
- if the folder ID specified by the document does not correspond to a valid folderServiceException
- if any system-level error occurs
-
updateDocuments
void updateDocuments(Document[] docs_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException Deprecated.Updates multiple documents.- Parameters:
docs_
- an array ofDocument
objects, which should each contain all of the information required to update a document.
The minimum required fields are:name
,description
(can be an emptyString
),extension
,size
,folderId
,status
andid
.- Throws:
InvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is neither an editor nor an administrator of the folderInvalidDocumentException
- if the ID of any of the documents does not correspond to a valid documentInvalidFolderException
- if the folder ID specified by any of the documents does not correspond to a valid folderServiceException
- if any system-level error occurs
-
updateForumForDocument
Deprecated.Updates the discussion forum associated with a document.- Parameters:
doc_
- aDocument
object which should contain the updated discussion forum information. The fields that should be populated on the document are:id
andforum
. All other fields will be ignored. Ifforum
is set tonull
, any forum associations are removed.- Throws:
InvalidDocumentException
- if the ID of the document does not correspond to a valid documentPrivilegeException
- if 1) the current user does not have access to the folder containing the document or 2) the current user is not an editor of the folder containing the document, and a forum currently exists for the documentServiceException
- if any system-level error occurs
-
updateForumForDocuments
Deprecated.Updates the discussion forums associated with multiple documents.- Parameters:
docs_
- a list ofDocument
object which should contain the updated discussion forum information. The fields that should be populated on each document are:id
andforum
. All other fields will be ignored. Ifforum
is set tonull
, any forum associations are removed.- Throws:
InvalidDocumentException
- if the ID of any of the documents does not correspond to a valid documentPrivilegeException
- if 1) the current user does not have access to the folder containing one of the documents or 2) the current user is not an editor of the folder containing one of the documents, and a forum currently exists for the documentServiceException
- if any system-level error occurs
-
deleteDocument
@Deprecated void deleteDocument(Long doid_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Use the method#deactivate(Long, Boolean)
instead.Deactivates all versions of the specified document. Does not remove the file from disk and does not log in deletion.log. Can be reversed with#undelete(Long)
.- Parameters:
doid_
- the ID of the document to be deleted.- Throws:
InvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not an administrator of the folder or the owner of the documentInvalidDocumentException
- if the ID does not correspond to a valid documentServiceException
- if any system-level error occurs
-
deleteDocuments
@Deprecated void deleteDocuments(Long[] doids_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Use the method#deactivate(Long[], Boolean)
instead.Deactivates all versions of multiple documents. Does not remove the files from disk and does not log in deletion.log. Can be reversed with#undelete(Long)
.- Parameters:
doids_
- the IDs of the documents to be deleted.- Throws:
InvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not an administrator of the folder or the owner of the documentsInvalidDocumentException
- if any of the IDs does not correspond to a valid documentServiceException
- if any system-level error occurs
-
getDocument
Document getDocument(Long doid_) throws InvalidDocumentException, PrivilegeException, InvalidUserException Deprecated.Retrieves a document (without the internalFilename property populated). If you need the internalFilename property, use thedownloadDocument
method.- Parameters:
doid_
- the ID of the document.- Returns:
- the retrieved document
- Throws:
InvalidDocumentException
- if the ID does not correspond to a valid documentPrivilegeException
- if the current user does not have viewing privileges to the folderInvalidUserException
- if the user calling this method is invalidServiceException
- if any system-level error occurs
-
getDocumentsPaging
ResultPage getDocumentsPaging(Long[] doids_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidDocumentException, PrivilegeException, InvalidUserException Deprecated.Retrieves several documents (without the internalFilename property populated). If you need the internalFilename property, use thedownloadDocument
method.- Parameters:
doids_
- an array of unique document IDs.startIndex_
- the index into the collection of total results at which to start. Negative numbers are treated as zeros.batchSize_
- the number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.sortProperty_
- the property by which the results should be sorted. This should be one of theSORT_BY_XXX
constants inDocument
.sortOrder_
- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- a
ResultPage
containing a list ofDocument
objects, representing the documents with the given IDs (without the internalFilename property set). If you need the internalFilename property, use thedownloadDocument
method - Throws:
InvalidDocumentException
- if any of the IDs does not correspond to a valid documentPrivilegeException
- if the current user does not have viewing privileges to the folder(s)InvalidUserException
- if the user calling this method is invalidServiceException
- if any system-level error occurs
-
getDocuments
@Deprecated Document[] getDocuments(Long[] doids_) throws InvalidDocumentException, PrivilegeException, InvalidUserException Deprecated.Retrieves several documents (without the internalFilename set). If you need the internalFilename property, use thedownloadDocuments
method- Parameters:
doids_
- an array of unique document IDs.- Returns:
- the documents corresponding to the given IDs
- Throws:
InvalidDocumentException
- if any of the IDs does not correspond to a valid documentPrivilegeException
- if the current user context does not have the rights to perform this operationInvalidUserException
- if the user calling this method is invalidServiceException
- if any system-level error occurs
-
moveDocument
void moveDocument(Long docid_, Long newFolderId_) throws InvalidUserException, PrivilegeException, InvalidFolderException, InvalidDocumentException Deprecated.Moves a document to another folder.- Parameters:
docid_
- The id of the document to be moved.newFolderId_
- The id of the folder to move the document to.- Throws:
InvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not an administrator of both the old and new knowledge centersInvalidFolderException
- if the folder does not existServiceException
- if any system-level error occursInvalidDocumentException
-
moveDocuments
void moveDocuments(Long[] docids_, Long newFolderId_) throws InvalidUserException, PrivilegeException, InvalidFolderException, InvalidDocumentException Deprecated.Moves multiple documents to another folder.- Parameters:
docids_
- An array of ids of the documents to be moved.newFolderId_
- The id of the folder to move the documents to.- Throws:
InvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not an administrator of both the old and new knowledge centersInvalidFolderException
- if the folder does not existInvalidDocumentException
- if one or more of the documents does not exist, or has been deletedServiceException
- if any system-level error occurs
-
unlockDocument
void unlockDocument(Long doid_) throws InvalidUserException, InvalidDocumentException, PrivilegeException Deprecated.Unlocks a document.- Parameters:
doid_
- The id of the document to unlock.- Throws:
PrivilegeException
- if the current user is not an administrator of the folder nor the person who locked the documentInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not exist, or has been deletedServiceException
- if any system-level error occurs
-
lockDocument
void lockDocument(Long doid_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Locks a document.- Parameters:
doid_
- The id of the document to lock.- Throws:
PrivilegeException
- if the current user is neither an editor nor an administrator of the folderInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not exist, or has been deletedServiceException
- if any system-level error occurs
-
createLink
void createLink(Long docId_, Long foid_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException Deprecated.Creates a symbolic link to a document.- Parameters:
docId_
- The id of the document to create the link to.foid_
- The id of the folder where the link should be created.- Throws:
PrivilegeException
- if the current user is not an administrator of both the folder containing the document and the folder where the link is being createdInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not exist, or has been deletedInvalidFolderException
- if the folder does not existServiceException
- if any system-level error occurs
-
createLinks
void createLinks(Long[] docIds_, Long foid_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException Deprecated.Creates a list of symbolic links to documents.- Parameters:
docIds_
- The ids of the documents to create the links to.foid_
- The id of the folder where the links should be created.- Throws:
PrivilegeException
- if the current user is not an administrator of both the folder containing the document and the folder where the links are being createdInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if any document does not exist, or has been deletedInvalidFolderException
- if the folder does not existServiceException
- if any system-level error occurs
-
createLinks
void createLinks(Long[] docIds_, Long[] foids_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException Deprecated.Creates multiple symbolic links to documents in a list of folders; a single link is created in each of the folders (ie each index indocIds_
maps to an index infoids_
).- Parameters:
docIds_
- The ids of the documents to create the links to.foids_
- The ids of the folders where the links should be created. This array must be the same size as thedocIds
array.- Throws:
InvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not an administrator of both the folder containing the document and the folder where the links are being createdInvalidDocumentException
- if any of the documents does not exist, or has been deletedInvalidFolderException
- if any of the folders does not existServiceException
- if any system-level error occurs
-
deleteLink
void deleteLink(Long docId_, Long foId_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException Deprecated.Deletes a symbolic link to a document from a folder.- Parameters:
docId_
- The id of the document to which the link points.foId_
- The id of the folder which contains the link.- Throws:
PrivilegeException
- if the current user is not an administrator of the folder or the owner of the linkInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not exist, or has been deletedInvalidFolderException
- if the folder does not existServiceException
- if any system-level error occurs
-
deleteLinks
void deleteLinks(Long[] docIds_, Long foId_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException Deprecated.Deletes multiple symbolic links from a folder.- Parameters:
docIds_
- An array of ids of the documents to which the links point.foId_
- The id of the folder which contains the links.- Throws:
PrivilegeException
- f the current user is not an administrator of the folder or the owner of the linksInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if any of the documents does not exist, or has been deletedInvalidFolderException
- if the folder does not existServiceException
- if any system-level error occurs
-
createVersion
Document createVersion(Document document_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException, StorageLimitException, InvalidOperationException Deprecated.Creates a new version of a document.- Parameters:
document_
- ADocument
object which should contain all of the information required to create a valid document (seecreateDocument(com.appiancorp.suiteapi.collaboration.Document)
). Theid
field of the passed object should be the id of the document for which the new version is being created.- Returns:
- A
Document
object representing the new version of the document. - Throws:
InvalidUserException
- if the current user context is not foundInvalidFolderException
- if the folder specified by the document does not existInvalidDocumentException
- if the document ID does not correspond to a valid documentPrivilegeException
- if the current user is neither an editor nor an administrator of the folderInvalidOperationException
- if the document is pending approval, or has been checked outStorageLimitException
- if there is no space on the filesystem to store the document versionServiceException
- if any system-level error occurs
-
createVersions
Document[] createVersions(Document[] documents_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException, StorageLimitException, InvalidOperationException Deprecated.Creates new versions of multiple documents.- Parameters:
documents_
- An array ofDocument
objects which should contain all of the information required to create valid documents (seecreateDocument(com.appiancorp.suiteapi.collaboration.Document)
). Theid
field of each passed objects should be the id of the document for which a new version is being created.- Returns:
- An array of
Document
objects representing the new versions of the documents - Throws:
InvalidUserException
- if the current user context is not foundInvalidFolderException
- if the folder specified by any of the documents does not existInvalidDocumentException
- if any of the document IDs does not correspond to a valid documentPrivilegeException
- if the current user is neither an editor nor an administrator of the folderInvalidOperationException
- if any of the documents is pending approval, or has been checked outStorageLimitException
- if there is no space on the filesystem to store the document versionsServiceException
- if any system-level error occurs
-
deleteVersion
@Deprecated void deleteVersion(Long doid_, Integer versionId_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Use the method#deactivateVersion(Long, Integer, Boolean)
instead.Deactivates the specified version of a document. Does not remove the file from disk and does not log in deletion.log.- Parameters:
doid_
- The id of a document.versionId_
- The version number of the document version to be deleted.- Throws:
PrivilegeException
- if the current user is not the administrator of the fodler or the owner of the versionInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not exist, or has been deleted, or if the specified version does not existServiceException
- if any system-level error occurs
-
deleteVersions
@Deprecated void deleteVersions(Long doid_, Integer[] versionIds_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Use the method#deactivateVersions(Long, Integer[], Boolean)
instead.Deactivates multiple versions of a document. Does not remove the file from disk and does not log in deletion.log.- Parameters:
doid_
- The id of a document.versionIds_
- The version numbers of the document versions to be deleted.- Throws:
PrivilegeException
- if the current user is not the administrator of the fodler or the owner of the versionsInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not exist, or has been deleted, or if any of the specified versions does not existServiceException
- if any system-level error occurs
-
getVersion
Document getVersion(Long doid_, Integer versionId_) throws InvalidDocumentException, PrivilegeException, InvalidVersionException Deprecated.Gets a specific version of a document.- Parameters:
doid_
- The id of a document.versionId_
- The version number of the document version to retrieve.- Returns:
- A
Document
object representing the specified version of the document. - Throws:
InvalidDocumentException
- if the document does not exist, or has been deleted, or if the specified version does not existPrivilegeException
- if the current user does not have viewing privileges to the folderInvalidVersionException
- if the passed version id is invalidServiceException
- if any system-level error occurs
-
getVersionsPaging
ResultPage getVersionsPaging(Long doid_, Integer[] versionIds_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidDocumentException, PrivilegeException, InvalidVersionException Deprecated.Gets specific versions of a document, paging.- Parameters:
doid_
- The id of a document.versionIds_
- An array containing the version numbers of the document versions to retrieve.startIndex_
- The index into the collection of total results at which to start. Negative numbers are treated as zeros.batchSize_
- The number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.sortProperty_
- The property by which the results should be sorted. This should be one of theSORT_BY_XXX
constants defined inDocument
.sortOrder_
- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- A
ResultPage
containing a list ofDocument
objects, which hold information about the specified versions of the document with the passed id. - Throws:
InvalidDocumentException
- if the document does not exist, or has been deleted, or if any of the specified versions does not existPrivilegeException
- if the current user does not have viewing privileges to the folderInvalidVersionException
- if any one of the passed version ids is invalidServiceException
- if any system-level error occurs
-
getVersions
@Deprecated Document[] getVersions(Long doid_, Integer[] versionIds_) throws InvalidDocumentException, PrivilegeException, InvalidVersionException Deprecated.Gets specific versions of a document.- Parameters:
doid_
- The id of a document.versionIds_
- An array containing the version numbers of the document versions to retrieve.- Returns:
- A list of
Document
objects representing the specified versions of the document. - Throws:
InvalidDocumentException
- if the document does not exist, or has been deleted, or if any of the specified versions does not existPrivilegeException
- if the current user does not have viewing privileges to the folderInvalidVersionException
- if any one of the passed version ids is invalidServiceException
- if any system-level error occurs
-
getAllVersionsForDocument
@Deprecated Document[] getAllVersionsForDocument(Long doid_) throws InvalidDocumentException, PrivilegeException Deprecated.Gets all versions of a document.- Parameters:
doid_
- The id of a document.- Returns:
- A list of
Document
objects representing all the document's versions. - Throws:
InvalidDocumentException
- if the document does not exist or has been deletedPrivilegeException
- if the current user does not have viewing privileges to the folderServiceException
- if any system-level error occurs
-
getAllVersionsForDocumentPaging
ResultPage getAllVersionsForDocumentPaging(Long doid_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidDocumentException, PrivilegeException Deprecated.Gets all versions of a document, paging.- Parameters:
doid_
- The id of a document.startIndex_
- The index into the collection of total results at which to start. Negative numbers are treated as zeros.batchSize_
- The number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.sortProperty_
- The property by which the results should be sorted. This should be one of theSORT_BY_XXX
constants defined inDocument
.sortOrder_
- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- A
ResultPage
containing a list ofDocument
objects, which hold information about each of the versions of the document with the passed id. - Throws:
InvalidDocumentException
- if the document does not exist, or has been deletedPrivilegeException
- if the current user does not have viewing privileges to the folderServiceException
- if any system-level error occurs
-
approveChangesForDocument
void approveChangesForDocument(Long doid_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Approves the changes for a document; to approve creation of a document, pass the id of the document, to approve deletion of a document, pass (-1 * (document id)).- Parameters:
doid_
- The id of the document to approve creation or the negation of the document id to approve deletion.- Throws:
PrivilegeException
- if the current user is not an administrator of the KC containing the documentInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not exist, or has been deletedServiceException
- if any system-level error occurs
-
approveChangesForDocuments
void approveChangesForDocuments(Long[] doids_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Approves changes for multiple documents; to approve creation of a document, pass the id of the document, to approve deletion of a document, pass (-1 * (document id)).- Parameters:
doids_
- An array of ids of the documents to approve; to approve creation of a document, pass the id of the document, to approve deletion of a document, pass (-1 * (document id)).- Throws:
PrivilegeException
- if the current user is not an administrator of the KC containing the documentInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if any of the documents does not exist, or has been deletedServiceException
- if any system-level error occurs
-
rejectChangesForDocument
void rejectChangesForDocument(Long doid_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Rejects changes made to a document; to reject creation of a document, pass the id of the document, to reject deletion of a document, pass (-1 * (document id)).- Parameters:
doid_
- The id of a document; to reject creation of a document, pass the id of the document directly, to reject deletion of a document, pass (-1 * (document id)).- Throws:
PrivilegeException
- if the current user is not an administrator of the KC containing the documentInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not exist, or has been deletedServiceException
- if any system-level error occurs
-
rejectChangesForDocuments
void rejectChangesForDocuments(Long[] doids_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Rejects changes made to multiple documents; to reject creation of a document, pass the id of the document, to reject deletion of a document, pass (-1 * (document id)).- Parameters:
doids_
- An array of ids of documents; to reject creation of a document, pass the id of the document directly, to reject deletion of a document, pass (-1 * (document id)).- Throws:
PrivilegeException
- if the current user is not an administrator of the KC containing the documentInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if any of the documents does not exist, or has been deletedServiceException
- if any system-level error occurs
-
approveChangesForVersion
void approveChangesForVersion(Long doid_, Integer vid_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Approves changes made for a specific version of a document; to approve creation of a version, pass the id of the document directly, to approve deletion of a version, pass (-1 * (document id)).- Parameters:
doid_
- The id of a document; to approve creation of a version, pass the id of the document directly, to approve deletion of a version, pass (-1 * (document id)).vid_
- The version number of the document version to approve.- Throws:
PrivilegeException
- if the current user is not an administrator of the KC containing the documentInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not exist, or has been deleted, or if the specified version does not existServiceException
- if any system-level error occurs
-
approveChangesForVersions
void approveChangesForVersions(Long[] doids_, Integer[] vids_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Approves changes made for specific versions of multiple documents; approves the passed version of the corresponding document (ie each index indoids_
maps to an index invids_
). To approve creation of a version, pass the id of the document directly, to approve deletion of a version, pass (-1 * (document id)).- Parameters:
doids_
- An array of ids of documents; to approve creation of a version, pass the id of the document directly, to approve deletion of a version, pass (-1 * (document id)).vids_
- An array of the version numbers of the document versions to approve. This should be the same size as thedoids
array.- Throws:
PrivilegeException
- if the current user is not an administrator of the KC containing the documentInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if any of the documents does not exist, or has been deleted, or if the specified version does not existServiceException
- if any system-level error occurs
-
rejectChangesForVersion
void rejectChangesForVersion(Long doid_, Integer vid_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Rejects the changes made for a specific version of a document; to reject creation of a version, pass the id of the document directly, to reject deletion of a version, pass (-1 * (document id)).- Parameters:
doid_
- The id of a document; to reject creation of a version, pass the id of the document directly, to reject deletion of a version, pass (-1 * (document id)).vid_
- The version number of the document version.- Throws:
InvalidUserException
- if the user calling this method is invalidPrivilegeException
- if the current user is not an administrator of the KC containing the documentInvalidDocumentException
- if the document does not exist, or has been deleted, or if the specified version does not existServiceException
- if any system-level error occurs
-
rejectChangesForVersions
void rejectChangesForVersions(Long[] doids_, Integer[] vids_) throws InvalidUserException, PrivilegeException, InvalidDocumentException Deprecated.Rejects changes made for specific versions of multiple documents; to reject creation of a version, pass the id of the document directly, to reject deletion of a version, pass (-1 * (document id)).- Parameters:
doids_
- An array of ids of documents; to reject creation of a version, pass the id of the document directly, to reject deletion of a version, pass (-1 * (document id)).vids_
- An array of the version numbers of the document versions. This should be the same size as thedoids
array.- Throws:
PrivilegeException
- if the current user is not an administrator of the KC containing the documentInvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if any of the documents does not exist, or has been deleted, or if the specified version does not existServiceException
- if any system-level error occurs
-
getFavoriteDocuments
@Deprecated Document[] getFavoriteDocuments(Integer sortOrder_, String sortColumn_) throws InvalidUserException Retrieves the list of the current user's favorite documents.- Parameters:
sortOrder_
- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.sortColumn_
- The field of theDocument
object by which to sort the returned list of documents. This is one of theSORT_BY_XX
inDocument
- Returns:
- A list of the user's favorite documents.
- Throws:
InvalidUserException
- if the user calling this method is invalidServiceException
- if any system-level error occurs
-
getFavoriteDocumentsPaging
ResultPage getFavoriteDocumentsPaging(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidUserException Deprecated.Retrieves the list of the current user's favorite documents, paging.- Parameters:
startIndex_
- The index into the collection of total results at which to start. Negative numbers are treated as zeros.batchSize_
- The number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.sortProperty_
- The property by which the results should be sorted. This should be one of theSORT_BY_XXX
constants defined inDocument
.sortOrder_
- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- A
ResultPage
containing a list ofDocument
objects, representing those documents that are the current user's favorites. - Throws:
InvalidUserException
- if the user calling this method is invalidServiceException
- if any system-level error occurs
-
addDocumentToFavorites
Deprecated.Adds a document to the current user's list of favorites.- Parameters:
doid_
- The id of the document to add to favorites.- Throws:
InvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not exist, or has been deletedServiceException
- if any system-level error occurs
-
addDocumentsToFavorites
void addDocumentsToFavorites(Long[] doids_) throws InvalidUserException, InvalidDocumentException, InvalidDataFormatException Deprecated.Adds multiple documents to the current user's list of favourites.- Parameters:
doids_
- An array of ids of the documents to add to favorites.- Throws:
InvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if any of the documents does not exist, or has been deletedInvalidDataFormatException
- if doids_ is null.ServiceException
- if any system-level error occurs
-
removeDocumentFromFavorites
Deprecated.Removes a document from the current user's list of favorites.- Parameters:
doid_
- The id of the document to remove from favorites.- Throws:
InvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not exist, or has been deletedServiceException
- if any system-level error occurs
-
removeDocumentsFromFavorites
void removeDocumentsFromFavorites(Long[] doids_) throws InvalidUserException, InvalidDocumentException, InvalidDataFormatException Deprecated.Removes multiple documents from the current user's list of favorites.- Parameters:
doids_
- An array of ids of the documents to remove from favorites.- Throws:
InvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if any of the documents does not exist, or has been deletedInvalidDataFormatException
- if doids_ is null.ServiceException
- if any system-level error occurs
-
downloadDocument
Document downloadDocument(Long doid_, Integer vid_, int adminOverride_) throws InvalidDocumentException, PrivilegeException, InvalidOperationException Deprecated.Download a document. ThefileSystemId
of the returned document is:- -1, if the user cannot see the document
- -2, if the document is pending revision
- the actual file system id otherwise; irrespective of whether the document is expired or not
getDocument(java.lang.Long)
method should be used to return document metadata (not logged as a download and security is more strict), while this method will allow downloads from low security knowledge centers, and the download will be logged.- Parameters:
doid_
- The id of the document to be downloaded.vid_
- The version number of the document version to be downloaded (useDocument.CURRENT_VERSION
for the current version; otherwise version numbers start at 1).adminOverride_
- Should usually be set to 0. Set to 1 to allow any user to see a document to which he/she ordinarily does not have viewing rights.- Returns:
- A
Document
object representing the downloaded document. - Throws:
PrivilegeException
- if the current user does not have viewing privileges to the folderInvalidDocumentException
- if the document does not exist, or has expiredInvalidOperationException
- if the document is pending changes approvalServiceException
- if any system-level error occurs
-
downloadDocuments
Document[] downloadDocuments(Long[] doids_, Integer vid_, int adminOverride_) throws InvalidDocumentException, PrivilegeException Deprecated.Download multiple documents. ThefileSystemId
of the returned documents is:- -1, if the user cannot see the document
- -2, if the document is pending revision
- the actual file system id otherwise; irrespective of whether the document is expired or not
getDocumentsPaging(java.lang.Long[], int, int, java.lang.Integer, java.lang.Integer)
method should be used to return document metadatas (not logged as a download and security is more strict), while this method will allow downloads from low security knowledge centers, and the download will be logged.- Parameters:
doids_
- The ids of the documents to be downloaded.vid_
- The version number of the documents' version to be downloaded (useDocument.CURRENT_VERSION
for the current version; otherwise version numbers start at 1).adminOverride_
- Should usually be set to 0. Set to 1 to allow any user to see a document to which he/she ordinarily does not have viewing rights.- Returns:
- A list of
Document
objects representing the downloaded documents. - Throws:
PrivilegeException
- if the current user does not have viewing privileges to the folderInvalidDocumentException
- if any of the documents does not exist, or has expiredServiceException
- if any system-level error occurs
-
undeleteDocument
void undeleteDocument(Long doid_) throws InvalidUserException, InvalidDocumentException, PrivilegeException Deprecated.Reactivates (undeletes) a document (NOTE: This method does not currently check whether the user has permission to reactivate the document).- Parameters:
doid_
- The id of the document to reactivate.- Throws:
InvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if the document does not existPrivilegeException
- if the current user is not an administrator of the folder or the owner of the documentServiceException
- if any system-level error occurs
-
unexpireDocuments
void unexpireDocuments(Long kcid_, Long[] doids_) throws PrivilegeException, InvalidUserException, InvalidDocumentException, InvalidKnowledgeCenterException Deprecated.Unexpires multiple documents.- Parameters:
kcid_
- The id of the knowledge center containing the documents.doids_
- The ids of the documents to be unexpired.- Throws:
InvalidUserException
- if the user calling this method is invalidInvalidDocumentException
- if any of the documents does not exist, or has been deletedInvalidKnowledgeCenterException
- if the passed knowledge center or the knowledge center referenced by any of the documents is invalidPrivilegeException
- if the current user is not an administrator of the folder or the owner of the documentsServiceException
- if any system-level error occurs
-
validateDocumentIds
Deprecated.Validates document ids. This method takes an array of document ids and determines whether each document id in the array is valid. An array of '0's (NOT valid) and '1's (valid) will be returned. For example, given the array of document ids {100, 101, 102}, an output of {1, 0, 0} will be returned if document id '100' is valid (a document with that id exists), and document ids '101' and '102' are invalid (no documents with those ids exist).- Parameters:
ids_
- An array of document ids to be validated.- Returns:
- An
Integer[]
of '0's and '1's corresponding to the array of document ids that was passed as argument. '1' means 'valid', while '0' means Invalid. - Throws:
ServiceException
- if any system-level error occurs
-
validateDocumentId
Deprecated.Validates a document ID. If the id is valid (a document with the passed id exists), '1' is returned; otherwise returns '0'.- Parameters:
id_
- The document id to validate.- Returns:
- An
Integer
that is either '0' (if the passed id is invalid) or '1' (if the passed id is valid). - Throws:
ServiceException
- if any system-level error occurs
-
searchDocuments
@Deprecated Document[] searchDocuments(String searchTerm_, int startIndex_, int scrollLength_) throws InvalidUserException Deprecated.Search for documents by name.- Parameters:
searchTerm_
- The string representing the name of the document for which to search. A document will match if its name contains the value ofsearchTerm_
.startIndex_
- The starting index of the firstDocument
to return.scrollLength_
- The number of consecutiveDocument
objects to return after the first.- Returns:
- A list of
Document
objects whose names match the specified search term. - Throws:
InvalidUserException
- if the user calling this method is invalidServiceException
- if any system-level error occurs
-
searchDocumentsPaging
ResultPage searchDocumentsPaging(String searchTerm_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidUserException Deprecated.Search for documents by name.- Parameters:
searchTerm_
- The string representing the document name for which to search. A document will match if its name contains the value ofsearchTerm_
.startIndex_
- The index into the collection of total results at which to start. Negative numbers are treated as zeros.batchSize_
- The number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.sortProperty_
- The property by which the results should be sorted. This should be one of theSORT_BY_XXX
constants defined inDocument
.sortOrder_
- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- A
ResultPage
containing a list ofDocument
objects, representing those documents whose names match the specified search term. - Throws:
InvalidUserException
- if the user calling this method is invalidServiceException
- if any system-level error occurs
-
getViewableDocumentsPaging
ResultPage getViewableDocumentsPaging(Long[] documentIds_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws InvalidUserException, InvalidDocumentException Deprecated.Gets the documents that the current user is allowed to access from a list of documents.- Parameters:
documentIds_
- A list of ids of documents.startIndex_
- The index into the collection of total results at which to start. Negative numbers are treated as zeros.batchSize_
- The number of results to return. Negative numbers will result in the entire collection being returned, but this is STRONGLY discouraged.sortProperty_
- The property by which the results should be sorted. This should be one of theSORT_BY_XXX
constants defined inDocument
.sortOrder_
- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDING
orConstants.SORT_ORDER_DESCENDING
.- Returns:
- A
ResultPage
containing a list ofDocument
objects, representing those documents which the current user is allowed to access. - Throws:
InvalidUserException
- if the current user does not existInvalidDocumentException
- if any of the documents is invalidServiceException
- if any system-level error occurs
-
getDocumentsList
Deprecated.Gets the specified documents, returning the valid results even if all the results cannot be retrieved (for instance, if some of the documents corresponding to the ids no longer exist).- Parameters:
docIds_
- The ids of the documents to retrieve.- Returns:
- A
ResultList
containing documents and result codes. theResult.getResults()
method should be used to get all the documents that were successfully retrieved. In additionResultList.getResultCodes()
can be used to get the list of result codes corresponding to each of the specified document ids. Each code represents the successful retrieval of a document, or, if the document could not be retrieved, the reason for the failure. Each code will be one of theCODE_XXX
orCOLLAB_CODE_XXX
constants inResultList
- See Also:
-
getSystemDocumentId
Deprecated.This is a small wrapper on Content's getSystemId, but returns the content id as a document id.- Parameters:
name
- A case-insensitive system name.- Returns:
- the id of the document mapped to that name.
- Throws:
InvalidDocumentException
- if the string is not recognized
-
setSystemDocumentId
Deprecated.usecreateDocument(Document)
with a pre-populated UUIDStores and associates the specifiedid
value with the specifiedname
key.- Parameters:
name
- A case-insensitive system name.id
- The document id.- Throws:
InvalidDocumentException
- if the string is not recognized
-
suggest
Deprecated.- Parameters:
query
-maxItems
-params
- list of information on what is being suggested and what format the results should be in. valid types are document.groupResults
- if specifying more than one SuggestParam, would you like to group the results by type, or mixed together and sorted? Default is true. If grouped, order of types matches the order of the suggestParams passed in.- Returns:
- a JSON formatted string
-
suggest
String suggest(String query_, int maxItems_, SuggestParam[] params_, Boolean groupResults_, Long[] allowList) Deprecated.- Parameters:
query
-maxItems
-params
- list of information on what is being suggested and what format the results should be in. valid types are document.groupResults
- if specifying more than one SuggestParam, would you like to group the results by type, or mixed together and sorted? Default is true. If grouped, order of types matches the order of the suggestParams passed in.allowList
- list of IDs that will be automatically added to returned results, filtered by query. Ignored if null or empty.- Returns:
- a JSON formatted string
-
getContentIdForDocumentId
Deprecated.Returns the Content Id given a Document Id. Note that for documents, the document id and the content id will always be the same.- Parameters:
id_
- the document id.
-
getContentIdsForDocumentIds
Deprecated.Returns the Content Id given a Document Id. Note that for documents, the document id and the content id will always be the same.- Parameters:
id_
- the document id.
-
getDocumentIdForContentId
Deprecated.Returns the document Id given a content Id. Note that for documents, the document id and the content id will always be the same.- Parameters:
id_
- the document id.
-
getDocumentIdsForContentIds
Deprecated.Returns the document Id given a content Id. Note that for documents, the document id and the content id will always be the same.- Parameters:
id_
- the document id.
-
ContentService
instead.