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
FieldsModifier and TypeFieldDescriptionstatic final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.static final booleanDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from interface com.appiancorp.services.ContextSensitiveService
SET_SERVICE_CONTEXT_METHOD_NAME -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDocumentsToFavorites(Long[] doids_) Deprecated.Adds multiple documents to the current user's list of favourites.voidaddDocumentToFavorites(Long doid_) Deprecated.Adds a document to the current user's list of favorites.voidapproveChangesForDocument(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)).voidapproveChangesForDocuments(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)).voidapproveChangesForVersion(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)).voidapproveChangesForVersions(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.voidcreateLink(Long docId_, Long foid_) Deprecated.Creates a symbolic link to a document.voidcreateLinks(Long[] docIds_, Long foid_) Deprecated.Creates a list of symbolic links to documents.voidcreateLinks(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.voiddeleteDocument(Long documentId) Deprecated.Use the method#deactivate(Long, Boolean)instead.voiddeleteDocuments(Long[] documentIds) Deprecated.Use the method#deactivate(Long[], Boolean)instead.voiddeleteLink(Long docId_, Long foId_) Deprecated.Deletes a symbolic link to a document from a folder.voiddeleteLinks(Long[] docIds_, Long foId_) Deprecated.Deletes multiple symbolic links from a folder.voiddeleteVersion(Long doid_, Integer versionId_) Deprecated.Use the method#deactivateVersion(Long, Integer, Boolean)instead.voiddeleteVersions(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.voidlockDocument(Long doid_) Deprecated.Locks a document.voidmoveDocument(Long docid_, Long newFolderId_) Deprecated.Moves a document to another folder.voidmoveDocuments(Long[] docids_, Long newFolderId_) Deprecated.Moves multiple documents to another folder.voidrejectChangesForDocument(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)).voidrejectChangesForDocuments(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)).voidrejectChangesForVersion(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)).voidrejectChangesForVersions(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)).voidremoveDocumentFromFavorites(Long doid_) Deprecated.Removes a document from the current user's list of favorites.voidremoveDocumentsFromFavorites(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.voidsetSystemDocumentId(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.voidundeleteDocument(Long doid_) Deprecated.Reactivates (undeletes) a document (NOTE: This method does not currently check whether the user has permission to reactivate the document).voidunexpireDocuments(Long kcid_, Long[] doids_) Deprecated.Unexpires multiple documents.voidunlockDocument(Long doid_) Deprecated.Unlocks a document.voidupdateDocument(Document doc_) Deprecated.Updates a document.voidupdateDocuments(Document[] docs_) Deprecated.Updates multiple documents.voidDeprecated.Updates the discussion forum associated with a document.voidupdateForumForDocuments(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
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
createDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
updateDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
updateDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
updateForumForDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
updateForumForDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
deleteDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
deleteDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getDocumentsPaging$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
moveDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
moveDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
unlockDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
lockDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
createLink$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
createLinks$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
deleteLink$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
deleteLinks$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
createVersion$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
createVersions$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
deleteVersion$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
deleteVersions$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getVersion$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getVersionsPaging$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getVersions$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getAllVersionsForDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getAllVersionsForDocumentPaging$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
approveChangesForDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
approveChangesForDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
rejectChangesForDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
rejectChangesForDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
approveChangesForVersion$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
approveChangesForVersions$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
rejectChangesForVersion$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
rejectChangesForVersions$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getFavoriteDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getFavoriteDocumentsPaging$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
addDocumentToFavorites$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
addDocumentsToFavorites$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
removeDocumentFromFavorites$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
removeDocumentsFromFavorites$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
downloadDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
downloadDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
undeleteDocument$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
unexpireDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
validateDocumentIds$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
validateDocumentId$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
searchDocuments$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
searchDocumentsPaging$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getViewableDocumentsPaging$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getDocumentsList$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getSystemDocumentId$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
setSystemDocumentId$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
suggest$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getContentIdForDocumentId$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getContentIdsForDocumentIds$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getDocumentIdForContentId$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getDocumentIdsForContentIds$UPDATES
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
-
Method Details
-
createDocument
@Write(K_COLLAB) Document createDocument(Document doc_) throws InvalidUserException, InvalidFolderException, InvalidDocumentException, PrivilegeException, StorageLimitException Deprecated.Create a document.- Parameters:
doc_- aDocumentobject which should contain all of the information required to create a valid document.
The minimum required fields are:name,description(can benullor "", 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
@Write(K_COLLAB) Document[] createDocuments(Document[] docs_) throws InvalidUserException, InvalidFolderException, InvalidDocumentException, PrivilegeException, StorageLimitException Deprecated.Create multiple documents.- Parameters:
docs_- an array ofDocumentobjects which should contain all of the information required to create valid documents.
The minimum required fields are:name,description(can benullor "", 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
@Write(K_COLLAB) void updateDocument(Document doc_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException Deprecated.Updates a document.- Parameters:
doc_- aDocumentobject, 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,statusandid.- 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
@Write(K_COLLAB) void updateDocuments(Document[] docs_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException Deprecated.Updates multiple documents.- Parameters:
docs_- an array ofDocumentobjects, 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,statusandid.- 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
@Write(K_COLLAB) void updateForumForDocument(Document doc_) throws InvalidDocumentException, PrivilegeException Deprecated.Updates the discussion forum associated with a document.- Parameters:
doc_- aDocumentobject which should contain the updated discussion forum information. The fields that should be populated on the document are:idandforum. All other fields will be ignored. Ifforumis 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
@Write(K_COLLAB) void updateForumForDocuments(Document[] docs_) throws InvalidDocumentException, PrivilegeException Deprecated.Updates the discussion forums associated with multiple documents.- Parameters:
docs_- a list ofDocumentobject which should contain the updated discussion forum information. The fields that should be populated on each document are:idandforum. All other fields will be ignored. Ifforumis 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 @Write(K_COLLAB) void deleteDocument(Long documentId) 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.- Parameters:
documentId- 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 @Write(K_COLLAB) void deleteDocuments(Long[] documentIds) 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.- Parameters:
documentIds- 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
@Read(K_COLLAB) Document getDocument(Long doid_) throws InvalidDocumentException, PrivilegeException, InvalidUserException Deprecated.Retrieves a document (without the internalFilename property populated). If you need the internalFilename property, use thedownloadDocumentmethod.- 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
@Read(K_COLLAB) 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 thedownloadDocumentmethod.- 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_XXXconstants inDocument.sortOrder_- the order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDINGorConstants.SORT_ORDER_DESCENDING.- Returns:
- a
ResultPagecontaining a list ofDocumentobjects, representing the documents with the given IDs (without the internalFilename property set). If you need the internalFilename property, use thedownloadDocumentmethod - 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 @Read(K_COLLAB) Document[] getDocuments(Long[] doids_) throws InvalidDocumentException, PrivilegeException, InvalidUserException Deprecated.Retrieves several documents (without the internalFilename set). If you need the internalFilename property, use thedownloadDocumentsmethod- 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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 thedocIdsarray.- 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) Document createVersion(Document document_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException, StorageLimitException, InvalidOperationException Deprecated.Creates a new version of a document.- Parameters:
document_- ADocumentobject which should contain all of the information required to create a valid document (seecreateDocument(com.appiancorp.suiteapi.collaboration.Document)). Theidfield of the passed object should be the id of the document for which the new version is being created.- Returns:
- A
Documentobject 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
@Write(K_COLLAB) Document[] createVersions(Document[] documents_) throws InvalidUserException, PrivilegeException, InvalidDocumentException, InvalidFolderException, StorageLimitException, InvalidOperationException Deprecated.Creates new versions of multiple documents.- Parameters:
documents_- An array ofDocumentobjects which should contain all of the information required to create valid documents (seecreateDocument(com.appiancorp.suiteapi.collaboration.Document)). Theidfield of each passed objects should be the id of the document for which a new version is being created.- Returns:
- An array of
Documentobjects 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 @Write(K_COLLAB) 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 @Write(K_COLLAB) 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
@Read(K_COLLAB) 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
Documentobject 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
@Read(K_COLLAB) 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_XXXconstants defined inDocument.sortOrder_- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDINGorConstants.SORT_ORDER_DESCENDING.- Returns:
- A
ResultPagecontaining a list ofDocumentobjects, 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 @Read(K_COLLAB) 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
Documentobjects 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 @Read(K_COLLAB) 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
Documentobjects 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
@Read(K_COLLAB) 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_XXXconstants defined inDocument.sortOrder_- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDINGorConstants.SORT_ORDER_DESCENDING.- Returns:
- A
ResultPagecontaining a list ofDocumentobjects, 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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 thedoidsarray.- 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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 thedoidsarray.- 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 @Read(K_COLLAB) 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_ASCENDINGorConstants.SORT_ORDER_DESCENDING.sortColumn_- The field of theDocumentobject by which to sort the returned list of documents. This is one of theSORT_BY_XXinDocument- 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
@Read(K_COLLAB) 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_XXXconstants defined inDocument.sortOrder_- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDINGorConstants.SORT_ORDER_DESCENDING.- Returns:
- A
ResultPagecontaining a list ofDocumentobjects, 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
@Write(K_COLLAB) void addDocumentToFavorites(Long doid_) throws InvalidUserException, InvalidDocumentException 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) void removeDocumentFromFavorites(Long doid_) throws InvalidUserException, InvalidDocumentException 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
@Write(K_COLLAB) 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
@Read(K_COLLAB) Document downloadDocument(Long doid_, Integer vid_, int adminOverride_) throws InvalidDocumentException, PrivilegeException, InvalidOperationException Deprecated.Download a document. ThefileSystemIdof 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_VERSIONfor 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
Documentobject 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
@Read(K_COLLAB) Document[] downloadDocuments(Long[] doids_, Integer vid_, int adminOverride_) throws InvalidDocumentException, PrivilegeException Deprecated.Download multiple documents. ThefileSystemIdof 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_VERSIONfor 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
Documentobjects 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
@Write(K_COLLAB) 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
@Write(K_COLLAB) 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
Integerthat 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 @Read(K_COLLAB) 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 firstDocumentto return.scrollLength_- The number of consecutiveDocumentobjects to return after the first.- Returns:
- A list of
Documentobjects whose names match the specified search term, the list can havenullvalues in it. Here,nullmeans that user does not have access to that document. - Throws:
InvalidUserException- if the user calling this method is invalidServiceException- if any system-level error occurs
-
searchDocumentsPaging
@Read(K_COLLAB) 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_XXXconstants defined inDocument.sortOrder_- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDINGorConstants.SORT_ORDER_DESCENDING.- Returns:
- A
ResultPagecontaining a list ofDocumentobjects, 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
@Read(K_COLLAB) 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_XXXconstants defined inDocument.sortOrder_- The order in which to sort the results. This should be eitherConstants.SORT_ORDER_ASCENDINGorConstants.SORT_ORDER_DESCENDING.- Returns:
- A
ResultPagecontaining a list ofDocumentobjects, 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
ResultListcontaining 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_XXXorCOLLAB_CODE_XXXconstants 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 @Write(K_COLLAB) void setSystemDocumentId(String name, Long id) throws InvalidDocumentException Deprecated.usecreateDocument(Document)with a pre-populated UUIDStores and associates the specifiedidvalue with the specifiednamekey.- Parameters:
name- A case-insensitive system name.id- The document id.- Throws:
InvalidDocumentException- if the string is not recognized
-
suggest
@Read(K_COLLAB) String suggest(String query, int maxItems, SuggestParam[] params, Boolean groupResults) 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
@Read(K_COLLAB) 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.
-
ContentServiceinstead.