Interface ContentService

All Superinterfaces:
com.appiancorp.services.ContextSensitiveService, Service

public interface ContentService extends com.appiancorp.services.ContextSensitiveService

This interface provides access to the Content service (formerly the Collaboration service). Whereas previously there were separate services to deal with different types of content (e.g., FolderService), all content can now be manipulated through this interface. The content service comes with an entirely new API and bean hierarchy, which cannot be used with the old Collaboration services. Inversely, the old beans cannot be used with the new Content service.

The methods in this service that check whether a user can act on a content item, such as canUserView(java.lang.Long, java.lang.String), only permit checking whether the user whose context was used to obtain the service can act on that item. To check whether another user has a certain role for the item, use getRoleMap(java.lang.Long, java.lang.Boolean) and check whether the user is listed for the desired role or is a member of a group in the desired role.

There is also an associated service, the ContentStatisticsService, which can be used to get various statistics on content (such as the number of content items fitting specific criteria).

Type Masks:
Types in Content are all powers of 2. This means that you can specify a filter of multiple types by using the bitwise or operator |. For instance, if you want to both documents and folders, you can set your typemask filter to:
ContentConstants.TYPE_FOLDER | ContentConstants.TYPE_DOCUMENT
Some of these combination filters are already defined as additional type constants at ContentConstants.TYPE_XXX

To obtain the root IDs for Rules and Document Management hierarchies:

  • Rules - Use getIdByUuid(String) and pass com.appiancorp.suiteapi.content.ContentConstants.UUID_RULES_ROOT_FOLDER
  • Document Management - Use getIdByUuid(String) and pass com.appiancorp.suiteapi.content.ContentConstants.UUID_COMMUNITY_ROOT
Code example (using ServiceLocator and ServiceContext):
ServiceContext sc = ServiceLocator.getAdministratorServiceContext();
ContentService cs = ServiceLocator.getContentService(sc);
Long rulesRootId = cs.getIdByUuid(ContentConstants.UUID_RULES_ROOT_FOLDER);

  • Field Details

  • Method Details

    • getApplicationName

      String getApplicationName()
      Get the application name (in this case, "Appian Collaboration").
      Returns:
      the name of the application
    • generateSearchIndex

      String generateSearchIndex(Timestamp timestamp_)
      Generates search index text file bodies for: "content". Fields in generated file:
      • id
      • n - name
      • d - description
      • t - type
      • st - state
      • sec - security
      • vis - visibility
      • crt - creator
      • tsc - timestamp created
      • tsm - timestamp modified
      • ed - expiration days
      • edt - expiration date timestamp
      • b - bytes
      • p - parent
      Parameters:
      timestamp_ - only include content modified since timestamp (may be null for all)
      Returns:
      a string representation of the URI of the search index output
    • setAdministratorGroup

      void setAdministratorGroup(Long groupId_)
      Set the group that will be considered administrators for all content (appadmins).
      Parameters:
      groupId_ - the ID of the group to set as administrators
      See Also:
    • getAdministratorGroup

      Long getAdministratorGroup()
      Members of this group will be considered administrators for all content (appadmins).
      Returns:
      the ID of the group set as administrators
      See Also:
    • activateUserSession

      @Deprecated void activateUserSession(Long[] memberOfGroups_, Long[] adminOfGroups_, Integer userTypeSysAdmin_)
      Deprecated.
      Notify the Content server of group membership and application privileges.
      Parameters:
      memberOfGroups_ - ID(s) of groups for which the current user is a member
      adminOfGroups_ - ID(s) of groups for which the current user is an admin
      userTypeSysAdmin_ - user type (0 basic; 1 sysadmin)
    • validateGroupMembership

      @Deprecated Boolean validateGroupMembership(Long[] memberOfGroups_, Long[] adminOfGroups_) throws InvalidUserException
      Deprecated.
      No longer necessary with credential system
      Validate that the group membership passed is incorrect or incomplete (whether activateUserSession needs to be called).
      Parameters:
      memberOfGroups_ - ID(s) of groups for which the current user is a member
      adminOfGroups_ - ID(s) of groups for which the current user is an admin
      Returns:
      whether activateUserSession needs to be called
      Throws:
      InvalidUserException - if an invalid user is referenced
    • resetGroupMembership

      @Deprecated void resetGroupMembership(Timestamp timestamp_)
      Deprecated.
      No longer necessary with credential system
      Clear group membership for users who have not logged in since the given timestamp.
      Parameters:
      timestamp_ - group membership will be cleared for users who have not logged in since this timestamp
    • notifyUserCreation

      @Deprecated void notifyUserCreation(String userName_)
      Deprecated.
      done automatically by UserService.createUser
      Notify the server that the user was created.
      Parameters:
      userName_ - username of the user that was created
    • notifyUsersCreation

      @Deprecated void notifyUsersCreation(String[] userNames_)
      Deprecated.
      done automatically by UserService.createUser
      Notify the server that the users were created.
      Parameters:
      userNames_ - usernames of the users that were created
    • notifyGroupDeletion

      void notifyGroupDeletion(Long groupId_)
      Notify the server that a group was deleted so any new group with the same id will not assume the same permissions.
      Parameters:
      groupId_ - the ID of the group that was deleted
    • notifyGroupsDeletion

      void notifyGroupsDeletion(Long[] groupIds_)
      Notify the server that groups were deleted so any new group with the same id will not assume the same permissions.
      Parameters:
      groupIds_ - the IDs of the groups that were deleted
    • setUserSpaceUsage

      @Deprecated void setUserSpaceUsage(String username_, Long bytesUsed_) throws InvalidUserException, StorageLimitException
      Deprecated.
      User quotas have been removed. Calls to this method will be ignored.
      Set the amount of space (in bytes) currently used by the specified user. This will override the automatically tracked value, and automatic tracking will continue from this value. Application administrator (sysadmin) privileges are required for the user calling this method.
      Parameters:
      username_ - the username of the user for which to set the space usage
      bytesUsed_ - the number of bytes that user has used. Passing a negative value will throw an IllegalArgumentException.
      Throws:
      InvalidUserException - if an invalid user is referenced
      StorageLimitException - if there is no more available space
      See Also:
    • getUserSpaceUsage

      @Deprecated Long getUserSpaceUsage()
      Deprecated.
      User quotas have been removed. This method will always return 0
      Get the amount of space (in bytes) currently used by the specified user.
      Returns:
      the number of bytes currently used
      See Also:
    • setUserSpaceAvailable

      @Deprecated void setUserSpaceAvailable(String username_, Long bytes_) throws InvalidUserException
      Deprecated.
      User quotas have been removed. Calls to this method will be ignored.
      Set the remaining disk space (in bytes) available to the specified user. Application administrator (sysadmin) privileges are required for the user calling this method.
      Parameters:
      username_ - the username of the user for which to set the quota
      bytes_ - the number of bytes to set the quota to. Passing 0 will cause it to use the value set for server.conf.collaboration.DEFAULTSPACE in custom.properties. Passing a negative value will throw an IllegalArgumentException.
      Throws:
      InvalidUserException - if an invalid user is referenced
      See Also:
    • getUserSpaceAvailable

      @Deprecated Long getUserSpaceAvailable()
      Deprecated.
      User quotas have been removed. This method will always return - 1
      Get the total available space (quota) in bytes for the user. In order to get the remaining available space, please subtract the available space to the remaining space: Example: Long availableSpace = contentService.getUserSpaceAvailable() - contentService.getUserSpaceUsage();
      Returns:
      the current user's disk quota
      See Also:
    • getUserSpaceAvailableForUser

      @Deprecated Long getUserSpaceAvailableForUser(String username)
      Deprecated.
      User quotas have been removed. This method will always return - 1
      Get the total available space (quota, in bytes) available to the specified user.
      Parameters:
      username - the username of the user for which to get the quota
      Returns:
      the specified user's disk quota
      See Also:
    • getImageIdsForUsers

      Long[] getImageIdsForUsers(String[] usernames)
      Get the image document ids for the given users.
      Parameters:
      usernames - the usernames for which to query
      Returns:
      the id of the image document for each user, with nulls where an image was not found or the user is invalid
    • getThumbnailIdsForUsers

      Long[] getThumbnailIdsForUsers(String[] usernames, int size)
      Get the document ids of the thumbnail images of the given size for the given users.
      Parameters:
      usernames - the usernames for which to query
      size - the thumbnail size (width in pixels)
      Returns:
      the id of the thumbnail image document for each user, with nulls where an image of the given size was not found or the user is invalid
    • validate

      Integer validate(Long id_)
      Gets the type of the content specified.
      Parameters:
      id_ - the ID of the content
      Returns:
      the type of the content. Will return 0 if the content does not exist, and -1 if the content is type 0 (atypical)
    • validate

      Integer[] validate(Long[] ids_)
      Gets the types of the content specified.
      Parameters:
      ids_ - the IDs of the content
      Returns:
      the types of the content in the same order as the IDs passed in. Will return 0 if the content does not exist, and -1 if the content is type 0 (atypical)
    • createApproval

      com.appiancorp.suiteapi.content.Approval createApproval(Content content_, Integer unique_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, StorageLimitException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException, com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException
      Attempts to create content, and gets the approval status back in an Approval bean. See create(Content[], Integer).
      Parameters:
      content_ - the content to create
      unique_ - how unique the name must be (one of ContentConstants.UNIQUE_NONE, ContentConstants.UNIQUE_FOR_TYPE, ContentConstants.UNIQUE_FOR_PARENT, or ContentConstants.UNIQUE_FOR_ALL)
      Returns:
      the approval status in an Approval bean
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      StorageLimitException - if there is no more available space
      PrivilegeException - if the user does not have permission to take this action
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException - if the content name is not unique according to the unique_ parameter
      com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException - if a content item with the same uuid already exists
    • createApproval

      com.appiancorp.suiteapi.content.Approval createApproval(Content[] contents_, Integer unique_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, StorageLimitException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException, com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException
      Attempts to create content, and gets the approval statuses back in an Approval bean.
      Parameters:
      contents_ - the content to create
      unique_ - how unique the name must be (one of ContentConstants.UNIQUE_NONE, ContentConstants.UNIQUE_FOR_TYPE, ContentConstants.UNIQUE_FOR_PARENT, or ContentConstants.UNIQUE_FOR_ALL)
      Returns:
      the approval status in an Approval bean
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      StorageLimitException - if there is no more available space
      PrivilegeException - if the user does not have permission to take this action
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException - if the content name is not unique according to the unique_ parameter
      com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException - if a content item with the same uuid already exists
    • create

      Long create(Content content_, Integer unique_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, StorageLimitException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException, com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException
      Creates a content object. If the Content object is of type ContentConstants.TYPE_DOCUMENT, you must separately create the actual file on disk in the path specified by the internalFileName property of the object. This method does not create the file on disk.
      Parameters:
      content_ - the content to create
      unique_ - how unique the name must be (one of ContentConstants.UNIQUE_NONE, ContentConstants.UNIQUE_FOR_TYPE, ContentConstants.UNIQUE_FOR_PARENT, or ContentConstants.UNIQUE_FOR_ALL)
      Returns:
      the ID of the content
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      StorageLimitException - if there is no more available space
      PrivilegeException - if the user does not have permission to take this action
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException - if the content name is not unique according to the unique_ parameter
      com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException - if a content item with the same uuid already exists
    • create

      Long[] create(Content[] contents_, Integer unique_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, StorageLimitException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException, com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException
      Creates content. The following fields are required:
      • name
      • parent
      The following fields will be populated if they are provided:
      • attributes
      • description
      • expirationDays
      • expirationTimestamp
      • extension
      • fileSystemId
      • forum
      • metadataIds
      • name
      • parent
      • partition
      • security
      • size
      • subtype
      • type
      • uuid
      • visibility
      All other fields are ignored.
      Parameters:
      contents_ - an array of Content objects
      unique_ - how unique the name must be (one of ContentConstants.UNIQUE_NONE, ContentConstants.UNIQUE_FOR_TYPE, ContentConstants.UNIQUE_FOR_PARENT, or ContentConstants.UNIQUE_FOR_ALL)
      Returns:
      the IDs of the content
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      StorageLimitException - if there is no more available space
      PrivilegeException - if the user does not have permission to take this action
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException - if the content name is not unique according to the unique_ parameter
      com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException - if a content item with the same uuid already exists
    • createVersion

      com.appiancorp.suiteapi.content.Approval createVersion(Content content_, Integer unique_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException, com.appiancorp.suiteapi.content.exceptions.PendingApprovalException, com.appiancorp.suiteapi.content.exceptions.ContentExpiredException, StorageLimitException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException
      Creates a new version of content. This call does not update the parent of the content. If the new version has a new parent, make sure to call move(Long, Long). The new version will have the same security role map as its parent, even if the content is not otherwise set to inherit security. For content that should not inherit security from its parent, call setRoleMap(java.lang.Long, com.appiancorp.suiteapi.content.ContentRoleMap, java.lang.Boolean) after creating the new version. When creating a new version of a Document, set the file system id on the document to be auto-allocated before passing it to createVersion. The following code example demonstrates using this method:
       
       Document doc = contentService.getVersion(docId, ContentConstants.VERSION_CURRENT);
       // prepare the document, indicating the service to assign a new file path
       // to the new version of the document
       doc.setFileSystemId(ContentConstants.ALLOCATE_FSID);
      
       // create a new version
       Approval a = contentService.createVersion(doc, unique);
       // get the file path of the new version
       Long newVersionContentId = a.getId()[0];
       Document newDocumentVersion = cs.download(newVersionContentId, VERSION_CURRENT, false);
       try (OutputStream outStream = newDocumentVersion.getOutputStream()) {
         IOUtils.copy(inStream, outStream);
       }
      
       
       
      Parameters:
      content_ - a Content object
      unique_ - how unique the name must be (one of ContentConstants.UNIQUE_NONE, ContentConstants.UNIQUE_FOR_TYPE, ContentConstants.UNIQUE_FOR_PARENT, or ContentConstants.UNIQUE_FOR_ALL)
      Returns:
      the approval status in an Approval bean
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException - if the content is locked and the current user is not the owner
      com.appiancorp.suiteapi.content.exceptions.PendingApprovalException - if the content is pending approval
      com.appiancorp.suiteapi.content.exceptions.ContentExpiredException - if the content you reference is expired
      StorageLimitException - if there is no more available space
      PrivilegeException - if the user does not have permission to take this action
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException - if the content name is not unique according to the unique_ parameter
    • createVersion

      @Deprecated com.appiancorp.suiteapi.content.Approval createVersion(Content[] contents_, Integer unique_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException, com.appiancorp.suiteapi.content.exceptions.PendingApprovalException, com.appiancorp.suiteapi.content.exceptions.ContentExpiredException, StorageLimitException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException
      Creates new versions of content. This may be used to create another version of any piece of Content. Each new Content bean passed into this function must be just like the existing one, except where you want the modifications to be. This is really a create, except that the version chain is extended to include this new Content. The id field in Content is used to determine which piece of content to create a new version of; any id in the version chain will suffice. The fields updated are the same list as those for create. This call does not update the parent of the contents. If the new versions have new parents, make sure to call move(Long[], Long) for bulk move or move(Long, Long) individually if each has a different parent.
      Parameters:
      contents_ - the content to create as new versions
      unique_ - how unique the name must be (one of ContentConstants.UNIQUE_NONE, ContentConstants.UNIQUE_FOR_TYPE, ContentConstants.UNIQUE_FOR_PARENT, or ContentConstants.UNIQUE_FOR_ALL)
      Returns:
      the approval status in an Approval bean
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException - if the content is locked and the current user is not the owner
      com.appiancorp.suiteapi.content.exceptions.PendingApprovalException - if the content is pending approval
      com.appiancorp.suiteapi.content.exceptions.ContentExpiredException - if the content you reference is expired
      StorageLimitException - if there is no more available space
      PrivilegeException - if the user does not have permission to take this action
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException - if the content name is not unique according to the unique_ parameter
    • upload

      @Deprecated ContentOutputStream upload(Document doc, Integer unique) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, StorageLimitException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException, com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException
      Deprecated.
      since 23.2. Use uploadDocument(Document, Integer) instead
      Creates a document and provides an output stream to which the document's content should be written. The document is created using the createApproval(Content, Integer) API. The caller must write the document's data to the returned output stream and complete the upload by calling ContentOutputStream.close(). Invoking the stream's close method will calculate the size of the data written to the stream and save it as metadata for the document.
      Parameters:
      doc - The Document to create.
      unique - How unique the name must be.
      Returns:
      The output stream to which the document's data should be written.
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      StorageLimitException
      PrivilegeException
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException
      com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException
    • importContent

      @Deprecated Long[] importContent(Content[] contents_, Integer unique_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException, com.appiancorp.suiteapi.content.exceptions.PendingApprovalException, com.appiancorp.suiteapi.content.exceptions.ContentExpiredException, StorageLimitException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException, com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException
      Deprecated.
      This API is no longer supported and will be removed in the next release. Only objects that are exported using the Applications import/export will be importable in the next release.
      Imports content. For each content bean, if the UUID exists already in the same location, this function calls createVersion(Content[], Integer). Otherwise, it calls create(Content[], Integer) This does a create or createVersion, as necessary.
      Parameters:
      contents_ - an array of Content objects to import
      unique_ - how unique the name must be (one of ContentConstants.UNIQUE_NONE, ContentConstants.UNIQUE_FOR_TYPE, ContentConstants.UNIQUE_FOR_PARENT, or ContentConstants.UNIQUE_FOR_ALL)
      Returns:
      the IDs of the new content
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException - if the content is locked and the current user is not the owner
      com.appiancorp.suiteapi.content.exceptions.PendingApprovalException - if the content is pending approval
      com.appiancorp.suiteapi.content.exceptions.ContentExpiredException - if the content you reference is expired
      StorageLimitException - if there is no more available space
      PrivilegeException - if the user does not have permission to take this action
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException - if the content name is not unique according to the unique_ parameter
      com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException - if the UUID of any of the content items already exists or if the same UUID is passed in for several content items
    • importValidate

      Integer[] importValidate(Content[] contents_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException, com.appiancorp.suiteapi.content.exceptions.PendingApprovalException, com.appiancorp.suiteapi.content.exceptions.ContentExpiredException, StorageLimitException, PrivilegeException
      Checks the validity of the Content items for import, returning an import status for each.
      Parameters:
      contents_ - an array of Content objects to validate
      Returns:
      one of ContentConstants.IMPORT_VALID, ContentConstants.IMPORT_INVALID_PRIVILEGE, ContentConstants.IMPORT_UUID_EXISTS_ELSEWHERE, ContentConstants.IMPORT_INVALID_PRIVILEGE, ContentConstants.IMPORT_NAME_EXISTS_WITHIN_TYPE, or ContentConstants.IMPORT_NAME_EXISTS_WITHIN_PARENT
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException - if the content is locked and the current user is not the owner
      com.appiancorp.suiteapi.content.exceptions.PendingApprovalException - if the content is pending approval
      com.appiancorp.suiteapi.content.exceptions.ContentExpiredException - if the content you reference is expired
      StorageLimitException - if there is no more available space
      PrivilegeException - if the user does not have permission to take this action
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException - if the content name is not unique according to the unique_ parameter
    • getContent

      @Deprecated Content getContent(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
      Deprecated.
      .
      Parameters:
      id_ - the ID of the content
      Returns:
      the Content bean
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      PrivilegeException - if the user does not have permission to take this action
    • getContent

      @Deprecated Content[] getContent(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets Contents by id. This will get the exact Content items specified, including the specific version implied by the Content id. If you want to get only the latest item of Content, use getVersion(Long, Integer) with version number ContentConstants.VERSION_CURRENT instead. If retrieving a Document the internalFilename property won't be populated; use download(Long, Integer, Boolean) instead.
      Parameters:
      ids_ - the IDs of the content
      Returns:
      the Content beans
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      See Also:
    • getContentList

      ResultList getContentList(Long[] ids_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Does the same thing as getContent(Long[]), except it takes a type mask and returns error codes instead of throwing exceptions.
      Parameters:
      ids_ - the IDs of the content
      typemask_ - the types of content to return
      Returns:
      a ResultList of Content beans.
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • getContentPaging

      @Deprecated ResultPage getContentPaging(Long[] ids_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Does the same thing as getContent(Long[]), except it pages and returns error codes instead of throwing exceptions.
      Parameters:
      ids_ - the IDs of the content
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing the list of Content objects
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      See Also:
    • getContentTree

      @Deprecated Content[] getContentTree(Long rootContentId_, Integer maxDepth_, Integer typemask_, Integer accessLevel_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Get the content tree starting from the specified root. Returns the list of contents ordered by a depth first traversal. This populates the depth field in the Content beans.
      Parameters:
      rootContentId_ - (atomic efficient)
      maxDepth_ - the maximum depth to traverse the tree
      typemask_ - only return contents that match this typemask
      accessLevel_ - the minimum access level required (one of ContentConstants.AL_NONE, ContentConstants.AL_VIEWER, ContentConstants.AL_EDITOR, and ContentConstants.AL_ADMIN
      Returns:
      list of Content (Content but with additional depth field filled in)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
      See Also:
    • getContentTreePaging

      ResultPage getContentTreePaging(Long rootContentId_, Integer maxDepth_, Integer typemask_, Integer accessLevel_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Get the content tree, and page the results. Returns the list of contents ordered by a depth first traversal. This populates the depth field in the Content beans.
      Parameters:
      rootContentId_ - (atomic efficient)
      maxDepth_ - the maximum depth to traverse the tree
      typemask_ - only return contents that match this typemask
      accessLevel_ - (0 is view, 1 is edit, 2 is admin)
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      list of Content (Content but with additional depth field filled in)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
      See Also:
    • getContentWhereViewable

      @Deprecated Content[] getContentWhereViewable(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the specified content where viewable, rather than giving an error that the content is not viewable. Note: The length of the array of Content beans returned may not be the same length as the array of IDs passed in.
      Parameters:
      ids_ - the IDs of the content
      Returns:
      an array of the Content beans that are viewable
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      See Also:
    • getContentIdsWhereViewable

      Long[] getContentIdsWhereViewable(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the specified content IDs where viewable, rather than giving an error that the content is not viewable. Note: The length of the array of IDs returned may not be the same length as the array of IDs passed in.
      Parameters:
      ids_ - the IDs of the content
      Returns:
      an array of the IDs of the viewable content
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException
    • getContentWhereViewablePaging

      ResultPage getContentWhereViewablePaging(Long[] ids_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the specified content where viewable, rather than giving an error that the content is not viewable. Note: The number of results returned may not be the same length as the array of IDs passed in.
      Parameters:
      ids_ - the IDs of the content
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      an array of the Content beans that are viewable
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      See Also:
    • getContentUrl

      String getContentUrl(long contentId)
      Gets the URL for a given content.
      Parameters:
      contentId - the internal identifier of the content
      Returns:
      the complete Tempo URL for the content
    • getOpaqueContentUri

      String getOpaqueContentUri(long contentId)
      Gets the opaque id for a given content.
      Parameters:
      contentId - the internal identifier of the content
      Returns:
      the opaque uri for the content
    • getVersion

      Content getVersion(Long id_, Integer versionNumber_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, PrivilegeException
      Gets the specified version of the content. If retrieving a Document the internalFilename property won't be populated; use download(Long, Integer, Boolean) instead.
      Parameters:
      id_ - the content id (any id within a version chain will do)
      versionNumber_ - the version number of content to get (use ContentConstants.VERSION_ORIGINAL to get the first version of the content and ContentConstants.VERSION_CURRENT to get the current version of the content)
      Returns:
      the Content bean
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
    • getVersion

      Content getVersion(@ConvertWith(com.appiancorp.kougar.mapper.parameters.UuidParameterConverter.class) String uuid, Integer versionNumber) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, PrivilegeException
      Gets the specified version of the content. If retrieving a Document the internalFilename property won't be populated; use download(Long, Integer, Boolean) instead.
      Parameters:
      uuid - the content UUID (any UUID within a version chain will do), as if by getIdByUuid
      versionNumber - the version number of content to get (use ContentConstants.VERSION_ORIGINAL to get the first version of the content and ContentConstants.VERSION_CURRENT to get the current version of the content)
      Returns:
      the Content bean
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
    • getVersions

      @Deprecated Content[] getVersions(Long[] ids_, Integer versionNumber_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, PrivilegeException
      Gets the specified version of a bunch of pieces of content.
      Parameters:
      ids_ - the content ids (any id within a version chain will do)
      versionNumber_ - the version number of content to get (use ContentConstants.VERSION_ORIGINAL to get the first version of the content and ContentConstants.VERSION_CURRENT to get the current version of the content)
      Returns:
      the Content beans
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
      See Also:
    • getVersions

      Content[] getVersions(Long id_, Integer[] versionNumbers_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, PrivilegeException
      Gets the specified versions of a particular piece of content.
      Parameters:
      id_ - the content id (any id within a version chain will do)
      versionNumbers_ - the version numbers of content to get (use ContentConstants.VERSION_ORIGINAL to get the first version of the content and ContentConstants.VERSION_CURRENT to get the current version of the content)
      Returns:
      the Content beans
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
      See Also:
    • getVersionsPaging

      ResultPage getVersionsPaging(Long[] ids_, Integer versionNumber_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, PrivilegeException
      Gets the specified version of a bunch of pieces of content.
      Parameters:
      ids_ - the content ids (any id within a version chain will do)
      versionNumber_ - the version number of content to get (use ContentConstants.VERSION_ORIGINAL to get the first version of the content and ContentConstants.VERSION_CURRENT to get the current version of the content)
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing the list of Content objects
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
    • getVersionsPaging

      ResultPage getVersionsPaging(Long id_, Integer[] versionNumbers_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, PrivilegeException
      Gets the specified versions of a particular piece of content.
      Parameters:
      id_ - the content id (any id within a version chain will do)
      versionNumbers_ - the version numbers of content to get (use ContentConstants.VERSION_ORIGINAL to get the first version of the content and ContentConstants.VERSION_CURRENT to get the current version of the content)
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      A ResultList of Content objects. In the case where there is an exception (such as access restriction) the ResultList.getResultCodes() will have an entry for every id passed to it, but the Result.getResults() will only have an entry for every valid result returned. i.e. ResultList.getResultCodes().length does not always equal Result.getResults().length. They are equal only when *all* items in the ResultList array are >= ResultList.CODE_VALID.
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
    • getVersionsList

      ResultList getVersionsList(Long[] ids, Integer versionNumber, Integer typemask) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException, InvalidVersionException
      Retrieves the specified version of the content objects identified by the given ids and of the given type. Like all ResultList APIs, this method returns error codes instead of throwing exceptions. Note that the result array is not castable to something other than Content[]. The results should then be cast individually.
      Parameters:
      ids - The ids of the content objects to retrieve.
      versionNumber - The version of the content objects to retrieve.
      typemask - The type of content objects to retrieve.
      Returns:
      A ResultList of Content objects. In the case where there is an exception (such as access restriction) the ResultList.getResultCodes() will have an entry for every id passed to it, but the Result.getResults() will only have an entry for every valid result returned. i.e. ResultList.getResultCodes().length does not always equal Result.getResults().length. They are equal only when all items in the ResultList array are >= ResultList.CODE_VALID.
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid type is passed in
      InvalidVersionException - if an invalid version number is passed in
    • getVersionId

      Long getVersionId(Long id_, Integer versionNumber_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, PrivilegeException
      Gets the ID of the specified version of the content.
      Parameters:
      id_ - the content id (any id within a version chain will do)
      versionNumber_ - the version number of content to get (use ContentConstants.VERSION_ORIGINAL to get the first version of the content and ContentConstants.VERSION_CURRENT to get the current version of the content)
      Returns:
      the ID
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
    • getVersionId

      Long getVersionId(@ConvertWith(com.appiancorp.kougar.mapper.parameters.UuidParameterConverter.class) String uuid, Integer versionNumber) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, PrivilegeException
      Gets the ID of the specified version of the content.
      Parameters:
      uuid - the content UUID (any UUID within a version chain will do), as if by getIdByUuid
      versionNumber - the version number of content to get (use ContentConstants.VERSION_ORIGINAL to get the first version of the content and ContentConstants.VERSION_CURRENT to get the current version of the content)
      Returns:
      the ID
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
    • getVersionIds

      Long[] getVersionIds(Long[] ids_, Integer versionNumber_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, PrivilegeException
      Gets the specified version of a bunch of pieces of content.
      Parameters:
      ids_ - the content id (any id within a version chain will do)
      versionNumber_ - the version number of content to get (use ContentConstants.VERSION_ORIGINAL to get the first version of the content and ContentConstants.VERSION_CURRENT to get the current version of the content)
      Returns:
      the IDs
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
    • getVersionIds

      Long[] getVersionIds(Long id_, Integer[] versionNumbers_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, PrivilegeException
      Gets the specified versions of a particular piece of content.
      Parameters:
      id_ - the content id (any id within a version chain will do)
      versionNumbers_ - the version number of content to get (use ContentConstants.VERSION_ORIGINAL to get the first version of the content and ContentConstants.VERSION_CURRENT to get the current version of the content)
      Returns:
      the IDs
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
    • getAllVersions

      @Deprecated Content[] getAllVersions(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets all of the versions of a particular versioned content item. It will return empty for an unversioned content item.
      Parameters:
      id_ - the content id (any id within a version chain will do)
      Returns:
      all of the versions of the content specified, or an empty array if the content is unversioned
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      See Also:
    • getAllVersionsPaging

      ResultPage getAllVersionsPaging(Long id_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets all of the versions of a particular versioned content item. It will return empty for an unversioned content item.
      Parameters:
      id_ - the content id (any id within a version chain will do)
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      a ResultPage containing the list of Content objects
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      See Also:
    • getAllVersionIds

      Long[] getAllVersionIds(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the IDs of all of the versions of a particular versioned content item. It will return empty for an unversioned content item.
      Parameters:
      id_ - the content id (any id within a version chain will do)
      Returns:
      the Ids of the versions of the content
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • download

      Document[] download(Long id_, Integer versionNumber_, Boolean includeExpired_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, PrivilegeException
      Gets a piece of content and log the transaction if logging is enabled. If the content passed in is a document, this method functions similarly to getVersion(java.lang.Long, java.lang.Integer), but the download is logged if logging is enabled. If the content passed in is a container (e.g., a folder), all documents inside the container will be returned, and each document obtained is logged if logging is enabled. This function will only be used for Knowledge content.
      Parameters:
      id_ - the id of content to download
      versionNumber_ - the version number of content to download
      includeExpired_ - whether to include expired content
      Returns:
      the documents
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
    • getInternalFilename

      @Deprecated String getInternalFilename(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the internal filename (physical location on disk) for a document. To always get the internal filename for the most current version, call getVersionId(Long, Integer) with ContentConstants.VERSION_CURRENT to get the most current Id.
      Parameters:
      id_ - the content ID of the version of the document; use getVersionId(Long, Integer) to obtain the id of the version of the document
      Returns:
      a string representation of the internal filename
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getInternalFilenames

      @Deprecated String[] getInternalFilenames(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Deprecated.
      Gets the internal filenames (physical locations on disk) for a set of documents.
      Parameters:
      ids_ - the content IDs of the versions of the documents; use getVersionIds(Long, Integer[]) to obtain the ids of the versions of the document
      Returns:
      the string representations of the internal filenames
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getExternalFilename

      String getExternalFilename(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the external filename (the name that the file would be saved as by the client, or the name within a .zip file) of a document.
      Parameters:
      id_ - the content ID
      Returns:
      the string representation of the external filename
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getExternalFilenames

      String[] getExternalFilenames(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the external filenames (the name that the file would be saved as by the client, or the name within a .zip file) of a set of document.
      Parameters:
      ids_ - the content IDs
      Returns:
      the string representations of the external filenames
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getByPath

      Content getByPath(Long root_, String path_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the content at the specified path relative to the given root.
      Parameters:
      root_ - the id of the root Content item
      path_ - the path relative to the root. containers are separated by "/"
      Returns:
      the Content bean
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getIdByPath

      Long getIdByPath(Long root_, String path_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the ID of the content at the specified path relative to the given root.
      Parameters:
      root_ - the id of the root Content item
      path_ - the path relative to the root. containers are separated by "/"
      Returns:
      the ID
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getParent

      Content getParent(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the parent of the specified content.
      Parameters:
      id_ - the id of the Content item
      Returns:
      the Content bean
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getParents

      Content[] getParents(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the parents of the specified content items.
      Parameters:
      ids_ - the id of the Content items
      Returns:
      the Content beans
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getParentId

      Long getParentId(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the parents of the specified content items.
      Parameters:
      id_ - the id of the Content item
      Returns:
      the ID of the parent
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getParentIds

      Long[] getParentIds(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Gets the IDs of the parents of the specified content items.
      Parameters:
      ids_ - the ids of the Content items
      Returns:
      the IDs of the parents
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • hasNoChildren

      Boolean hasNoChildren(Long containerId_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Checks whether the specified container has no children. This is the inverse of hasChildren(Long).
      Parameters:
      containerId_ - the ID of the container
      Returns:
      true if the container has no children; false if the container has children
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • haveNoChildren

      Boolean[] haveNoChildren(Long[] containerIds_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Checks whether each of the specified containers has no children. This is the inverse of haveChildren(Long[]).
      Parameters:
      containerIds_ - the IDs of the containers
      Returns:
      true if the container has no children; false if the container has children
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • hasNoChildrenOfType

      Boolean hasNoChildrenOfType(Long containerId_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Checks whether the specified container has no children of the specified type(s).
      Parameters:
      containerId_ - the ID of the container
      typemask_ - specifies which content types to look for
      Returns:
      true if container has no children of given type(s), false if it does have children
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • haveNoChildrenOfType

      Boolean[] haveNoChildrenOfType(Long[] containerIds_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Checks whether each of the specified containers has no children of the specified type(s).
      Parameters:
      containerIds_ - the IDs of the containers
      typemask_ - specifies which content types to look for
      Returns:
      for each container, true if container has no children of given type(s), false if it does have children
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • hasChildren

      Boolean hasChildren(Long containerId_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Checks whether the specified container has children. This is the inverse of hasNoChildren(Long)
      Parameters:
      containerId_ - the ID of the container
      Returns:
      true if container has children, false if it does not
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • haveChildren

      Boolean[] haveChildren(Long[] containerIds_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Checks whether each of the specified containers has children. This is the inverse of haveNoChildren(Long[]).
      Parameters:
      containerIds_ - the IDs of the containers
      Returns:
      for each container, true if container has children, false if it does not
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • haveChildren

      Boolean[] haveChildren(Content[] containers_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Checks whether each of the specified containers has children. This method extracts the IDs from the Content beans passed in, and calls haveChildren(Long[]) with those IDs.
      Parameters:
      containers_ - the containers to check
      Returns:
      for each container, true if container has children, false if it does not
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • hasChildrenOfType

      Boolean hasChildrenOfType(Long containerId_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Checks whether the specified container has children of a the specified type(s).
      Parameters:
      containerId_ - the ID of the container
      typemask_ - children types to look for
      Returns:
      true if container has children of the specified type(s), false if it does not
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • haveChildrenOfType

      Boolean[] haveChildrenOfType(Long[] containerIds_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Checks whether the specified container has children of a the specified type(s).
      Parameters:
      containerIds_ - the IDs of the containers
      typemask_ - children types to look for
      Returns:
      for each container, true if container has children, false if it does not
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • getChildrenTypesOfType

      Integer getChildrenTypesOfType(Long containerId_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Returns a typemask of all children types found within a container.
      Parameters:
      containerId_ - container id
      typemask_ - children types to look for
      Returns:
      typemask of the children found
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • getChildrenTypesOfType

      Integer[] getChildrenTypesOfType(Long[] containerIds_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Returns typemasks of all children types found within each container.
      Parameters:
      containerIds_ - container ids
      typemask_ - children types to look for
      Returns:
      typemasks of the children found
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • getChildrenTypes

      Integer getChildrenTypes(Long containerId_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Returns a typemask of all children types found within a container.
      Parameters:
      containerId_ - container id
      Returns:
      typemask of the children found
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getChildrenTypes

      Integer[] getChildrenTypes(Long[] containerIds_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Returns typemasks of all children types found within each container.
      Parameters:
      containerIds_ - container ids
      Returns:
      typemasks of the children found
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getChildrenTypes

      Integer[] getChildrenTypes(Content[] containers_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Returns typemasks of all children types found within each container.
      Parameters:
      containers_ - containers
      Returns:
      typemasks of the children found
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • populateTypesOfChildren

      void populateTypesOfChildren(Content[] containers_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Populate the typesOfChildren field in the content beans you pass in.
      Parameters:
      containers_ - list of containers
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getChildren

      @Deprecated Content[] getChildren(Long containerId_, ContentFilter filter_, Integer modifiers_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Returns the children of a container.
      Parameters:
      containerId_ - root content id
      filter_ - applies to what children are returned
      modifiers_ - one of ContentConstants.GC_MOD_DRAFT, ContentConstants.GC_MOD_LINKS, ContentConstants.GC_MOD_NORMAL, or ContentConstants.GC_MOD_POPULATE_TYPES_OF_CHILDREN
      Returns:
      Content[]
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getChildrenIds

      Long[] getChildrenIds(Long containerId_, ContentFilter filter_, Integer modifiers_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Returns the ids of the children of a container.
      Parameters:
      containerId_ - root content id
      filter_ - applies to what children are returned
      modifiers_ - one of ContentConstants.GC_MOD_DRAFT, ContentConstants.GC_MOD_LINKS, ContentConstants.GC_MOD_NORMAL, or ContentConstants.GC_MOD_POPULATE_TYPES_OF_CHILDREN
      Returns:
      content ids[]
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
    • getChildrenPaging

      ResultPage getChildrenPaging(Long containerId_, ContentFilter filter_, Integer modifiers_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Returns the children of a container.
      Parameters:
      containerId_ - root content id
      filter_ - applies to what children are returned
      modifiers_ - one of ContentConstants.GC_MOD_DRAFT, ContentConstants.GC_MOD_LINKS, ContentConstants.GC_MOD_NORMAL, or ContentConstants.GC_MOD_POPULATE_TYPES_OF_CHILDREN
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      ResultPage of Content
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getAdvertisedChildren

      @Deprecated Content[] getAdvertisedChildren(Long containerId_, ContentFilter filter_, Integer modifiers_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Returns the advertised children of a container. This includes the content items normally visible as well as those with the visibility bit VIS_ADVERTISE set to true.
      Parameters:
      containerId_ - root content id
      filter_ - applies to what children are returned
      modifiers_ - one of ContentConstants.GC_MOD_DRAFT, ContentConstants.GC_MOD_LINKS, ContentConstants.GC_MOD_NORMAL, or ContentConstants.GC_MOD_POPULATE_TYPES_OF_CHILDREN
      Returns:
      Content[]
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getAdvertisedChildrenIds

      Long[] getAdvertisedChildrenIds(Long containerId_, ContentFilter filter_, Integer modifiers_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
    • getAdvertisedChildrenPaging

      ResultPage getAdvertisedChildrenPaging(Long containerId_, ContentFilter filter_, Integer modifiers_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
    • getEditablePaging

      ResultPage getEditablePaging(Long rootId_, ContentFilter filter_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Get Editable Content objects paging. Retrieves all editable objects from a give root, not just direct children.
      Parameters:
      rootId_ - root content id: atomic
      filter_ - applies to what children are returned
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      ResultPage of Content
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getAdministratablePaging

      ResultPage getAdministratablePaging(Long rootId_, ContentFilter filter_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Get Administratable Content objects paging. Retrieves all objects from a given root that the user has admin rights to, not just direct children.
      Parameters:
      rootId_ - root content id: atomic
      filter_ - applies to what children are returned
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      ResultPage of Content
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getViewablePaging

      ResultPage getViewablePaging(Long rootId_, ContentFilter filter_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Get Viewable Content objects paging. Retrieves all objects from a given root that the user has viewer rights to, not just direct children.
      Parameters:
      rootId_ - root content id: atomic
      filter_ - applies to what children are returned
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      ResultPage of Content
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getAllChildren

      @Deprecated Content[] getAllChildren(Long containerId_, ContentFilter filter_, Integer modifiers_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Returns all descendants in a recursive descent from root.
      Parameters:
      containerId_ - root content id
      filter_ - applies to what children are returned
      modifiers_ - one of ContentConstants.GC_MOD_DRAFT, ContentConstants.GC_MOD_LINKS, ContentConstants.GC_MOD_NORMAL, or ContentConstants.GC_MOD_POPULATE_TYPES_OF_CHILDREN
      Returns:
      Content[]
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getAllChildrenIds

      Long[] getAllChildrenIds(Long containerId_, ContentFilter filter_, Integer modifiers_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Returns all descendant ids in a recursive descent from root.
      Parameters:
      containerId_ - root content id
      filter_ - applies to what children are returned
      modifiers_ - ContentConstants.GC_MOD_DRAFT
      Returns:
      Content[]
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
    • getAllChildrenPaging

      ResultPage getAllChildrenPaging(Long containerId_, ContentFilter filter_, Integer modifiers_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Returns all descendants in a recursive descent from root.
      Parameters:
      containerId_ - root content id
      filter_ - applies to what children are returned
      modifiers_ - ContentConstants.GC_MOD_DRAFT
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      Content[]
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getAllChildrenAndVersions

      @Deprecated Content[] getAllChildrenAndVersions(Long containerId_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Get all versions of all children in a given container.
      Parameters:
      containerId_ - root content id
      filter_ - applies to what children are returned
      Returns:
      all versions of all children
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getAllChildrenAndVersionIds

      Long[] getAllChildrenAndVersionIds(Long containerId_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Get ids of all versions of all children in a given container.
      Parameters:
      containerId_ - root content id
      filter_ - applies to what children are returned
      Returns:
      all versions of all children
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
    • getAllChildrenAndVersionsPaging

      ResultPage getAllChildrenAndVersionsPaging(Long containerId_, ContentFilter filter_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Get all versions of all children in a given container.
      Parameters:
      containerId_ - root content id
      filter_ - applies to what children are returned
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      all versions of all children
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getNumberOfChildren

      Integer getNumberOfChildren(Long containerId_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      This returns the number of children matching the typemask.
      Parameters:
      containerId_ - root content id(s)
      typemask_ - specifies which content types to look for
      Returns:
      integer
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • getNumberOfChildren

      Integer[] getNumberOfChildren(Long[] containerIds_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      This returns the number of children matching the typemask for each root id specified.
      Parameters:
      containerIds_ - root content id(s)
      typemask_ - specifies which content types to look for
      Returns:
      integer
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • getParentsToRoot

      Content[] getParentsToRoot(Long id_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException, PrivilegeException
      This returns all of direct ancestors of a node, starting with the node's parent and tracing up to the root.
      Parameters:
      id_ - content id
      typemask_ - specifies which content types to return
      Returns:
      content list of parent path to root; only matching types are included. This goes from parent to parent, ending in the root.
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
      PrivilegeException - if the user does not have permission to take this action
    • getParentsToRootIds

      Long[] getParentsToRootIds(Long id_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException, PrivilegeException
      This returns ids of all of direct ancestors of a node, starting with the node's parent and tracing up to the root.
      Parameters:
      id_ - content id
      typemask_ - specifies which content types to return
      Returns:
      content ids of parent path to root; only matching types are included. This goes from parent to parent, ending in the root.
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
      PrivilegeException - if the user does not have permission to take this action
    • getParentsFromRoot

      Content[] getParentsFromRoot(Long id_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      This returns all of direct ancestors of a node, starting with the root and tracing down to the node's parent.
      Parameters:
      id_ - content id
      typemask_ - specifies which content types to return
      Returns:
      content list of parent path to root; only matching types are included. This goes from root down to id.
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • getParentsFromRootIds

      Long[] getParentsFromRootIds(Long id_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      This return ids of all of direct ancestors of a node, starting with the root and tracing down to the node's parent.
      Parameters:
      id_ - content id
      typemask_ - specifies which content types to return
      Returns:
      content ids of parent path to root; only matching types are included. This goes from parent to parent, ending in the root.
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • updateFields

      void updateFields(Content content_, Integer[] fields_, Integer unique_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidUserException, com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException, com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException
      Updates the specified fields of a content item's LATEST version. To move all the versions of a content use move(Long, Long)
      Parameters:
      content_ - Content object to update
      fields_ - Integer[] of field names to update; others except id ignored.
      unique_ - how unique the name must be (one of ContentConstants.UNIQUE_NONE, ContentConstants.UNIQUE_FOR_TYPE, ContentConstants.UNIQUE_FOR_PARENT, or ContentConstants.UNIQUE_FOR_ALL)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidUserException - if an invalid user is referenced
      com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException - if parent refers to self
      com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException - if a content item with the same uuid already exists
      PrivilegeException - if the user does not have the permissions to update the content
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException - if the content name is not unique according to the unique_ parameter
    • updateVersionFields

      void updateVersionFields(Content content_, Integer versionNumber, Integer[] fields_, Integer unique_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidUserException, com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException, com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException
      Updates the specified fields of a content item's specific version. To move all the versions of a content use move(Long, Long)
      Parameters:
      content_ - The content object whose data should be used for the update. The id field must be populated to indicate which persisted content object should be updated.
      versionNumber - The version of the target content that should be updated.
      fields_ - The fields to update (other fields in the passed content object will be ignored).
      unique_ - How unique the name must be, if it's one of the fields being updated (the value must be one of ContentConstants.UNIQUE_NONE, ContentConstants.UNIQUE_FOR_TYPE, ContentConstants.UNIQUE_FOR_PARENT, or ContentConstants.UNIQUE_FOR_ALL).
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidUserException - if an invalid user is referenced (if creator is updated and invalid)
      com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException - if parent refers to self
      com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException - if a content item with the same uuid already exists
      PrivilegeException - if the user does not have the permissions to update the content
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException - if the content name is not unique according to the unique_ parameter
    • updateFields

      void updateFields(Content[] contents_, Integer[] fields_, Integer unique_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidUserException, com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException, com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException
      Updates the specified fields of the content items. To move all the versions of the contents use move(Long[], Long)
      Parameters:
      contents_ - Content objects to update
      fields_ - Integer[] of field names to update; others except id ignored.
      unique_ - how unique the name must be (one of ContentConstants.UNIQUE_NONE, ContentConstants.UNIQUE_FOR_TYPE, ContentConstants.UNIQUE_FOR_PARENT, or ContentConstants.UNIQUE_FOR_ALL)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      InvalidUserException - if an invalid user is referenced
      com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException - if parent refers to self
      com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException - if a content item with the same uuid already exists
      PrivilegeException - if the user does not have the permissions to update the content
      com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException - if the content name is not unique according to the unique_ parameter
    • setSizeOfDocumentVersion

      int setSizeOfDocumentVersion(Long documentContentId) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
      Deprecated.
      since 23.2. Writing to a Document via DocumentOutputStream or ContentUploadOutputStream will update the Document size metadata automatically upon closing the stream.
      Sets the size property of a Document. This method calculates the size of the data saved for the given Document and saves the value within the Document's metadata (the size can then be retrieved by retrieving the Document's Content object and reading the size field).
      Parameters:
      documentContentId - The id of the target Document. This id must be the content id of the specific version for which the size should be set.
      Returns:
      The size of the Document in bytes.
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - If there is no content object with the given id.
      PrivilegeException - If the user does not have sufficient privileges to update the Document's metadata.
    • updateAllChildrenAndVersionsVisibility

      void updateAllChildrenAndVersionsVisibility(Long id, boolean maskType, int bitmask) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
      Update the visibility bitmask for all children and versions of the given id. This is typically used to update the searchability of content. Example to set all ids under contentIdOfKnowledgeCenter as VIS_SEARCHABLE: updateAllChildrenAndVersionsVisibility(contentIdOfKnowledgeCenter, true, VIS_SEARCHABLE) Example to clear all ids under contentIdOfKnowledgeCenter from VIS_SEARCHABLE: updateAllChildrenAndVersionsVisibility(contentIdOfKnowledgeCenter, false, 255-VIS_SEARCHABLE) This is equivalent to updating the visibility on all ids returned by getAllChildrenAndVersionIds for the given id.
      Parameters:
      id -
      maskType - false for bitwise AND, true for bitwise OR
      bitmask - (0...255) value that will be AND'd or OR'd against visibility flag
      Throws:
      PrivilegeException - if no edit privilege on id
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if id is invalid, deleted or deactivated
      See Also:
    • updateAllChildrenAndVersionsExpiration

      void updateAllChildrenAndVersionsExpiration(Long id, Integer expirationDays) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
      Update the expiration days for all children and versions of the given id (including the content with the given id). This is typically used to update the expiration of a knowledge center's children. Updating just the individual field will only take effect on newly created children not on existing data; use this method to update existing data. This is equivalent to updating the expirationDays on all ids returned by getAllChildrenAndVersionIds for the given id.
      Parameters:
      id -
      expirationDays - the number of days after which documents in the knowledge centers will expire. If null, the logid's (typically knowledge center id's) expiration days will be used.
      Throws:
      PrivilegeException - if no edit privilege on id
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if id is invalid, deleted or deactivated
      See Also:
    • move

      void move(Long id_, Long destinationParent_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException
      This moves a Content item from one location to another, cutting connection from current parent, setting connection to new parent, updating bytes used in parents. Unlike updateFields(Content, Integer[], Integer), it moves all the versions of the content, that supports versioning, i.e. Document, FreeformRule, Constant and QueryRule.
      Parameters:
      id_ - content id(s) to move
      destinationParent_ - parent under which to move the id: atomic
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      PrivilegeException - if the user does not have permission to take this action
      com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException - if the destination is a descendant of the item you are moving
    • move

      void move(Long[] ids_, Long destinationParent_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException
      This moves Content items from one location to another, cutting connection from current parent, setting connection to new parent, updating bytes used in parents. Unlike updateFields(Content[], Integer[], Integer), it moves all the versions of the contents, that support versioning, i.e. Document, FreeformRule, Constant and QueryRule.
      Parameters:
      ids_ - content id(s) to move
      destinationParent_ - parent under which to move the id: atomic
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      PrivilegeException - if the user does not have permission to take this action
      com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException - if the destination is a descendant of the item you are moving
    • copy

      CopyReference[] copy(Long source, Long target) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
      This copies Content item from one location to another. The source is copied to the target using the default CopySource rules (COPY_INCLUDE_INTO+COPY_CREATOR). After copying the Content metadata, the underlying file representation must be copied (or linked, as desired). Loop through the CopyReference return list for the information. The copy method returns CopyReference[], as it can make copies of many content items. For each CopyReference you can use the CopyReference.copyContents() API in order to complete the copy.
      Parameters:
      source - content id(s) to move
      target - parent under which to copy the id
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      PrivilegeException - if the user does not have permission to take this action
    • copy

      CopyReference[] copy(Long[] source, Long target) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
      This copies Content item from one location to another. The source ids are copied using default CopySource rules (COPY_INCLUDE_INTO+COPY_CREATOR). After copying the Content metadata, the underlying file representation must be copied (or linked, as desired). Loop through the CopyReference return list for the information. The copy method returns CopyReference[], as it can make copies of many content items. For each CopyReference you can use the CopyReference.copyContents() API in order to complete the copy. All sources are processed, forming the desired list to copy, before any action is taken.
      Parameters:
      source - content id(s) to move
      target - parent under which to copy the id
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      PrivilegeException - if the user does not have permission to take this action
    • copy

      CopyReference[] copy(CopySource[] source, Long target) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
      This copies Content item from one location to another. The CopySource represents explicit rules about the copying. After copying the Content metadata, the underlying file representation must be copied (or linked, as desired). Loop through the CopyReference return list for the information. The copy method returns CopyReference[], as it can make copies of many content items. For each CopyReference you can use the CopyReference.copyContents() API in order to complete the copy. All CopySources are processed, forming the desired list to copy, before any action is taken.
      Parameters:
      source - content id(s) to move
      target - parent under which to copy the id
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      PrivilegeException - if the user does not have permission to take this action
    • delete

      com.appiancorp.suiteapi.content.Approval delete(Long id_, Boolean deleteChildren_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.HasChildrenException, PrivilegeException
      Deletes all versions of the given content item.
      Parameters:
      id_ - content id(s), may be inactive
      deleteChildren_ - delete children (1 is do so, 0 is give exception if children)
      Returns:
      Approval Bean (content ids:Long[];pending ids;names of pending;logging id of pending;admin users of approver;admin groups of approver)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.HasChildrenException - if the content item has children
      PrivilegeException - if the user does not have permission to take this action
    • delete

      com.appiancorp.suiteapi.content.Approval delete(Long[] ids_, Boolean deleteChildren_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.HasChildrenException, PrivilegeException
      Deletes all versions of the given content item.
      Parameters:
      ids_ - content id(s), may be inactive
      deleteChildren_ - delete children (1 is do so, 0 is give exception if children)
      Returns:
      Approval Bean (content ids:Long[];pending ids;names of pending;logging id of pending;admin users of approver;admin groups of approver)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.HasChildrenException - if the content item has children
      PrivilegeException - if the user does not have permission to take this action
    • deleteContent

      com.appiancorp.suiteapi.content.Approval deleteContent(Long[] ids_, Boolean deleteChildren_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.HasChildrenException, PrivilegeException
      Deletes the given content items.
      Parameters:
      ids_ - content id(s), may be inactive
      deleteChildren_ - delete children (1 is do so, 0 is give exception if children)
      Returns:
      Approval Bean (content ids:Long[];pending ids;names of pending;logging id of pending;admin users of approver;admin groups of approver)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.HasChildrenException - if the content item has children
      PrivilegeException - if the user does not have permission to take this action
    • deleteVersion

      com.appiancorp.suiteapi.content.Approval deleteVersion(Long id_, Integer versionNumber_, Boolean children_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.HasChildrenException, InvalidVersionException, PrivilegeException
      Deletes specified version(s) of the given content item.
      Parameters:
      id_ - content id(s), may be inactive
      versionNumber_ - version number to delete
      children_ - delete children (1 is do so, 0 is give exception if children)
      Returns:
      Approval Bean (content ids:Long[];pending ids;names of pending;logging id of pending;admin users of approver;admin groups of approver)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.HasChildrenException - if the content item has children
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
    • deleteVersions

      com.appiancorp.suiteapi.content.Approval deleteVersions(Long id_, Integer[] versionNumbers_, Boolean children_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.HasChildrenException, InvalidVersionException, PrivilegeException
      Deletes specified version(s) of the given content item.
      Parameters:
      id_ - content id(s), may be inactive
      versionNumbers_ - version numbers to delete
      children_ - delete children (1 is do so, 0 is give exception if children)
      Returns:
      Approval Bean (content ids:Long[];pending ids;names of pending;logging id of pending;admin users of approver;admin groups of approver)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.HasChildrenException - if the content item has children
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException - if the user does not have permission to take this action
    • deactivate

      com.appiancorp.suiteapi.content.Approval deactivate(Long id_, Boolean deactivateChildren_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.HasChildrenException
      Deactivates all versions of the given content item. Does not remove the file from disk and does not log in deletion.log.
      Parameters:
      id_ - content id(s), may be inactive
      deactivateChildren_ - deactivate children (1 is do so, 0 is give exception if children)
      Returns:
      Approval Bean (content ids:Long[];pending ids;names of pending;logging id of pending;admin users of approver;admin groups of approver)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.HasChildrenException - if the content item has children
    • deactivate

      com.appiancorp.suiteapi.content.Approval deactivate(Long[] ids_, Boolean deactivateChildren_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.HasChildrenException
      Deactivates all versions of the given content items. Does not remove the file from disk and does not log in deletion.log.
      Parameters:
      ids_ - content id(s), may be inactive
      deactivateChildren_ - deactivate children (1 is do so, 0 is give exception if children)
      Returns:
      Approval Bean (content ids:Long[];pending ids;names of pending;logging id of pending;admin users of approver;admin groups of approver)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.HasChildrenException - if the content item has children
    • deactivateVersion

      com.appiancorp.suiteapi.content.Approval deactivateVersion(Long id_, Integer versionNumber_, Boolean deactivateChildren_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.HasChildrenException, InvalidVersionException
      Deactivates specified version of the given content item. Does not remove the file from disk and does not log in deletion.log
      Parameters:
      id_ - content id(s), may be inactive
      versionNumber_ - version number to deactivate
      deactivateChildren_ - deactivate children (1 is do so, 0 is give exception if children)
      Returns:
      Approval Bean (content ids:Long[];pending ids;names of pending;logging id of pending;admin users of approver;admin groups of approver)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.HasChildrenException - if the content item has children
      InvalidVersionException - if an invalid version is referenced
    • deactivateVersions

      com.appiancorp.suiteapi.content.Approval deactivateVersions(Long id_, Integer[] versionNumbers_, Boolean deactivateChildren_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.HasChildrenException, InvalidVersionException, PrivilegeException
      Deactivates specified version(s) of the given content item. Does not remove the file from disk and does not log in deletion.log.
      Parameters:
      id_ - content id(s), may be inactive
      versionNumbers_ - version numbers to deactivate
      deactivateChildren_ - deactivate children (1 is do so, 0 is give exception if children)
      Returns:
      Approval Bean (content ids:Long[];pending ids;names of pending;logging id of pending;admin users of approver;admin groups of approver)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.HasChildrenException - if the content item has children
      InvalidVersionException - if an invalid version is referenced
      PrivilegeException
    • reactivate

      void reactivate(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Reactivates the given content item.
      Parameters:
      id_ - content id(s), may be inactive
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • reactivate

      void reactivate(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Reactivates the given content items.
      Parameters:
      ids_ - content id(s), may be inactive
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getInactive

      @Deprecated Content[] getInactive(Long root_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Gets all inactive content items within the specified root.
      Parameters:
      root_ - content id: atomic
      filter_ - only content matching the filter will be returned
      Returns:
      list of inactive content items
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getInactiveIds

      Long[] getInactiveIds(Long root_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Gets all inactive content ids within the specified root.
      Parameters:
      root_ - content id: atomic
      filter_ - only content matching the filter will be returned
      Returns:
      list of inactive content ids
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
    • getInactiveIdsNoSystem

      Long[] getInactiveIdsNoSystem(Long root_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Gets all inactive content ids within the specified root but filters out system ids.
      Parameters:
      root_ - content id: atomic
      filter_ - only content matching the filter will be returned
      Returns:
      list of inactive content ids
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
    • getInactivePaging

      ResultPage getInactivePaging(Long root_, ContentFilter filter_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Gets all inactive content items within the specified root.
      Parameters:
      root_ - content id: atomic
      filter_ - only content matching the filter will be returned
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      list of inactive content items
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • getMyInactiveIds

      Long[] getMyInactiveIds()
      This retrieves the content ids in the 'Recycle Bin/Trashcan' of the current user.
      Returns:
      ids of deactivated Content items created by the current user
    • getMyInactive

      @Deprecated Content[] getMyInactive()
      This retrieves the content items in the 'Recycle Bin/Trashcan' of the current user.
      Returns:
      list of deactivated Content items created by the current user
      See Also:
    • getMyInactivePaging

      ResultPage getMyInactivePaging(int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_)
      This retrieves the content items in the 'Recycle Bin/Trashcan' of the current user.
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      list of deactivated Content items created by the current user
      See Also:
    • deleteMyInactive

      Integer deleteMyInactive()
      This is an 'empty Recycle Bin/Trashcan' method.
      Returns:
      count of deleted items
    • getLinks

      Content[] getLinks(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Returns all links to a given content id.
      Parameters:
      id_ - content id(s) from which links will be returned
      Returns:
      content list
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getLinkIds

      Long[] getLinkIds(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Returns all link ids to a given content id.
      Parameters:
      id_ - content id(s) from which links will be returned
      Returns:
      link ids
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getLinksOfType

      Content[] getLinksOfType(Long id_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Returns all links to a given content id.
      Parameters:
      id_ - content id(s) from which links will be returned
      typemask_ - the types of content to return
      Returns:
      content list
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • getLinkIdsOfType

      Long[] getLinkIdsOfType(Long id_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Returns all links to a given content id.
      Parameters:
      id_ - content id(s) from which links will be returned
      typemask_ - the types of content to return
      Returns:
      content ids (flat if multiple)
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
    • addLinks

      @Deprecated void addLinks(Long id_, Long[] links_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Deprecated.
      Add a link. A Link is a symbolic link, as in a filesystem for Documents. It's also used in Communities to link to 'Featured' Documents.
      Parameters:
      id_ - content id to which links will be added: atomic
      links_ - content ids which will be added as links to first parameter content id
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • removeLinks

      @Deprecated void removeLinks(Long id_, Long[] links_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Deprecated.
      Remove a link.
      Parameters:
      id_ - content id from which links will be removed: atomic
      links_ - ids which will be removed from links of first parameter content id
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • getLinkedBy

      Long[] getLinkedBy(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Returns the ids of those content items that link to the given id.
      Parameters:
      id_ - content id to which returned ids link
      Returns:
      content ids
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • searchByRoot

      @Deprecated Content[] searchByRoot(Long rootId_, String regex_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Searches for content from a given root.
      Parameters:
      rootId_ - The root to search in
      regex_ - A regular expression to match against name and description. The regex "*text*" will be used.
      filter_ - A filter for the search results
      Returns:
      list of content items matching the search
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • searchIdsByRoot

      Long[] searchIdsByRoot(Long rootId_, String regex_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Searches for content from a given root.
      Parameters:
      rootId_ - The root to search in
      regex_ - A regular expression to match against name and description. The regex "*text*" will be used.
      filter_ - A filter for the search results
      Returns:
      list of content ids matching the search
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
    • searchByRootPaging

      ResultPage searchByRootPaging(Long rootId_, String regex_, ContentFilter filter_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      Searches for content from a given root.
      Parameters:
      rootId_ - The root to search in
      regex_ - A regular expression to match against name and description. The regex "*text*" will be used.
      filter_ - A filter for the search results
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      list of content items matching the search
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      See Also:
    • searchWithin

      @Deprecated Content[] searchWithin(String regex, Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Search for content within the given containers.
      Parameters:
      regex - A regular expression to match against name and description. The regex "*contains*" will be used.
      ids_ - The ids of the containers within which to search
      Returns:
      list of content items matching the search
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      See Also:
    • searchIdsWithin

      Long[] searchIdsWithin(String regex, Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Search for content within the given containers.
      Parameters:
      regex - A regular expression to match against name and description. The regex "*contains*" will be used.
      ids_ - The ids of the containers within which to search
      Returns:
      list of content ids matching the search
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
    • searchWithinPaging

      ResultPage searchWithinPaging(String regex_, Long[] ids_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
      Search for content within the given containers.
      Parameters:
      regex_ - A regular expression to match against name and description. The regex "*contains*" will be used.
      ids_ - The ids of the containers within which to search
      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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
      sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
      sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
      Returns:
      list of content items matching the search
      Throws:
      com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      See Also:
    • queryByRoot

      @Deprecated Content[] queryByRoot(Long root_, String queryText_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      This is more advanced search, accepting special keywords.

      Reserved KeywordNotes
      activeBy default, only active is searched.
      inactive or nonactivThis is the only way to search inactive.
      hierarchyThis limits to those ids visible in hierarchy.
      onhierarchyThis limits to those ids NOT visible in hierarchy.
      quotaThis limits to those ids that are quota constrained.
      nonquotaThis limits to those ids that are NOT quota constrained.
      loggedThis limits to those ids that are logged.
      unlogged or nonloggedThis limits to those ids that are NOT logged.
      indexableThis limits to those ids that are indexable.
      nonindexableThis limits to those ids that are NOT indexable.
      author:nameThis is a case-sensitive contains for the creator's username.
      author (current)This limits to content created by current user.
      name:text
      description:text
      starts:textThis is name and description text*, case-insensitive.
      ends:textThis is name and description *text, case-insensitive.
      contains:textThis is name and description *text*, case-insensitive.
      subscribedThis limits to current user's subscriptions.
      unsubscribed or nonsubscribedThis limits to current user's subscriptions.
      bytes:number
      approved
      unapproved
      created:time
      modified:time
      expiration:days
      extension:ext

      Other text is searched for as 'contains' in name and description.

      For name and description:
      • : and = are both equals, <> and >< and != are unequal,
      • < is less than, > is greater than, <= is less than or equal to, >= is greater than or equal to.
        Parameters:
        root_ - The root from which to search
        queryText_ - This is the query to perform.
        filter_ - A filter for the search results
        Returns:
        list of content items matching the search
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        See Also:
      • queryIdsByRoot

        Long[] queryIdsByRoot(Long root_, String queryText_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        This is more advanced search, accepting special keywords.
        Parameters:
        root_ - The root from which to search
        queryText_ - This is the query to perform.
        filter_ - A filter for the search results
        Returns:
        list of content ids matching the search
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      • queryByRootPaging

        ResultPage queryByRootPaging(Long root_, String queryText_, ContentFilter filter_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        This is more advanced search, accepting special keywords.
        Parameters:
        root_ - The root from which to search
        queryText_ - This is the query to perform.
        filter_ - A filter for the search results
        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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
        sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
        sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
        Returns:
        list of content items matching the search
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        See Also:
      • getExpired

        @Deprecated Content[] getExpired(Long root_, Integer days_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Returns the list of content items within the given root which will be expired within the given number of days.
        Parameters:
        root_ - content id: only content under root will be returned
        days_ - Days in the future to check for expiration
        filter_ - Only content matching the filter will be returned
        Returns:
        list of expired content items
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        See Also:
      • getExpiredIds

        @Deprecated Long[] getExpiredIds(Long root_, Integer days_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Deprecated.
        Returns the list of content items within the given root which will be expired within the given number of days.
        Parameters:
        root_ - content id: only content under root will be returned
        days_ - Days in the future to check for expiration
        filter_ - Only content matching the filter will be returned
        Returns:
        list of expired content ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      • getExpiredPaging

        @Deprecated ResultPage getExpiredPaging(Long root_, Integer days_, ContentFilter filter_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Deprecated.
        Returns the list of content items within the given root which will be expired within the given number of days.
        Parameters:
        root_ - content id: only content under root will be returned
        days_ - Days in the future to check for expiration
        filter_ - Only content matching the filter will be returned
        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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
        sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
        sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
        Returns:
        list of expired content items
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        See Also:
      • unexpire

        @Deprecated void unexpire(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        This unexpires the content, adding its parent expiration days to itself.
        Parameters:
        id_ - content id
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • unexpire

        @Deprecated void unexpire(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        This unexpires the contents, adding their parent expiration days to themselves.
        Parameters:
        ids_ - content ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • lock

        @Deprecated void lock(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.PendingApprovalException, com.appiancorp.suiteapi.content.exceptions.ContentExpiredException, com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException, PrivilegeException
        Deprecated.
        Exclusively locks the base id.
        Parameters:
        id_ - content id to lock
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.PendingApprovalException - if the content is pending approval
        com.appiancorp.suiteapi.content.exceptions.ContentExpiredException - if the content you reference is expired
        com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException - if the content is locked and the current user is not the owner
        PrivilegeException
      • lock

        @Deprecated void lock(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.PendingApprovalException, com.appiancorp.suiteapi.content.exceptions.ContentExpiredException, com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException, PrivilegeException
        Deprecated.
        Exclusively locks the base ids.
        Parameters:
        ids_ - content ids to lock
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.PendingApprovalException - if the content is pending approval
        com.appiancorp.suiteapi.content.exceptions.ContentExpiredException - if the content you reference is expired
        com.appiancorp.suiteapi.content.exceptions.NotLockOwnerException - if the content is locked and the current user is not the owner
        PrivilegeException
      • unlock

        @Deprecated Long[] unlock(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Only unlocks those ids currently locked by the current user.
        Parameters:
        id_ - id to unlock
        Returns:
        ids unlocked
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • unlock

        @Deprecated Long[] unlock(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Only unlocks those ids currently locked by the current user.
        Parameters:
        ids_ - ids to unlock
        Returns:
        ids unlocked
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • breakLock

        @Deprecated Long[] breakLock(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        If the user attempts to break his or her own lock (or something unlocked) then no additional security privilege is required; treat it like an unlock. If the user attempts to break another's lock, then admin security privilege is required, or an exception will be thrown.
        Parameters:
        id_ - content id of lock to break
        Returns:
        ids with broken locks
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • breakLock

        @Deprecated Long[] breakLock(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        If the user attempts to break his or her own lock (or something unlocked) then no additional security privilege is required; treat it like an unlock. If the user attempts to break another's lock, then admin security privilege is required, or an exception will be thrown.
        Parameters:
        ids_ - content id of lock to break
        Returns:
        ids with broken locks
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • approve

        @Deprecated Approved approve(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Approve the given content item.
        Parameters:
        id_ - content id(s)
        Returns:
        Approved bean (those ids that were successfully approved;action approved;those users who requested said review)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • approve

        @Deprecated Approved[] approve(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Approve the given content items.
        Parameters:
        ids_ - content id(s)
        Returns:
        Approved beans (those ids that were successfully approved;action approved;those users who requested said review)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • approveVersion

        @Deprecated Approved approveVersion(Long id_, Integer versionNumber_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, com.appiancorp.suiteapi.content.exceptions.InvalidApprovalStateException
        Deprecated.
        Approve the given version of a content item.
        Parameters:
        id_ - content id
        versionNumber_ - version number
        Returns:
        Approved bean (those ids that were successfully approved;action approved;those users who requested said review)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidVersionException - if an invalid version is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidApprovalStateException - if there is an invalid content's state
      • reject

        @Deprecated Approved reject(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Reject the given content item.
        Parameters:
        id_ - content id(s)
        Returns:
        Approved bean (those ids that were successfully rejected;action rejected;those users who requested said review)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • reject

        @Deprecated Approved[] reject(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Reject the given content items.
        Parameters:
        ids_ - content id(s)
        Returns:
        Approved beans (those ids that were successfully rejected;action rejected;those users who requested said review)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • rejectVersion

        @Deprecated Approved rejectVersion(Long id_, Integer versionNumber_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidVersionException, com.appiancorp.suiteapi.content.exceptions.InvalidRejectionStateException
        Deprecated.
        Reject the given version of a content item.
        Parameters:
        id_ - content id
        versionNumber_ - version number
        Returns:
        Approved bean (those ids that were successfully rejected;action rejected;those users who requested said review)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidVersionException - if an invalid version is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidRejectionStateException
      • notifyApproved

        @Deprecated void notifyApproved(Approved... approved) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Sends a notification to the user associated with the approval. It receives the objects returned by any of the accept and reject service methods.
        Parameters:
        approved - approved bean
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • requestAccess

        @Deprecated void requestAccess(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Request access to the given content item. Note: This is also done implicitly by adding it as a favorite when the user possesses insufficient permission.
        Parameters:
        id_ - content id
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • requestAccess

        @Deprecated void requestAccess(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Request access to the given content items. Note: This is also done implicitly by adding it as a favorite when the user possesses insufficient permission.
        Parameters:
        ids_ - content ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • checkAccess

        Integer checkAccess(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Returns the current user access to a content item. (This call is for Collaboration compatibility.)
        Parameters:
        id_ - content id
        Returns:
        0=unsubcribed, 1=subscribed/favorite, 2=pending access
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • checkAccess

        Integer[] checkAccess(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Returns the current user access to a content items. (This call is for Collaboration compatibility.)
        Parameters:
        ids_ - content ids
        Returns:
        0=unsubcribed, 1=subscribed/favorite, 2=pending access
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • approveUsers

        String[] approveUsers(Long id_, String[] users_) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Approve access to the specified content item for a set of users.
        Parameters:
        id_ - content id
        users_ - set of users to approve
        Returns:
        users who were successfully approved; they should then be notified by the caller
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • rejectUsers

        String[] rejectUsers(Long id_, String[] users_) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Reject access to the specified content item for a set of users.
        Parameters:
        id_ - content id
        users_ - set of users to reject
        Returns:
        users who were successfully rejected; they should then be notified by the caller
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • getPending

        @Deprecated Content[] getPending(Long id, ContentFilter filter) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Get the Content items that have approvals pending action by the current user. This is the inverse of the getRequests, which are requests to another from the current user. This populates the actionRequested, actionRequester.
        Parameters:
        id -
        filter -
        Returns:
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
      • getPendingPaging

        @Deprecated ResultPage getPendingPaging(Long id, ContentFilter filter, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Deprecated.
        Get the Content items that have approvals pending action by the current user. This is the inverse of the getRequests, which are requests to another from the current user. This populates the actionRequested, actionRequester.
        Parameters:
        id - root content id
        filter - applies to what children are returned
        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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
        sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
        sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
        Returns:
        Content[]
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        See Also:
      • getNumberOfRequests

        Integer getNumberOfRequests()
        This returns the count of the requests returned by getRequests. By only returning a count, and not all the data, this method is faster and more suitable for status updates.
        Returns:
        number of content ids for which a request is outstanding
      • getRequests

        Content[] getRequests()
        Once a user requests an action on a Content item that requires approval, that request is stored with the Content item. This method returns those items that are still pending for this user or the user's group.
        Returns:
        list of content items pending approval from the current user
      • getPendingUsers

        String[] getPendingUsers(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        This accumulates all users pending for the given content item, returning only the unique names.
        Parameters:
        id_ - content id
        Returns:
        usernames of pending users
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • getPendingReview

        @Deprecated Integer getPendingReview(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        This returns the review code for each given id; this may include NO_REVIEW (0).
        Parameters:
        id_ - content id
        Returns:
        review id(s)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • getPendingReviews

        @Deprecated Integer[] getPendingReviews(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        This returns the review code for each given id; this may include NO_REVIEW (0).
        Parameters:
        ids_ - content ids
        Returns:
        review id(s)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • getFavoritesByRoot

        @Deprecated Content[] getFavoritesByRoot(Long rootId_, ContentFilter filter_, Boolean includeExpiredContent_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Retrieve all content items within the given root which are marked as favorites for the current user.
        Parameters:
        rootId_ - root within which to get favorites
        filter_ - Only content matching the filter will be returned
        includeExpiredContent_ - set to true to include expired content
        Returns:
        favorite contents
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        See Also:
      • getFavoriteByRootIds

        @Deprecated Long[] getFavoriteByRootIds(Long rootId_, ContentFilter filter_, Boolean includeExpiredContent_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Deprecated.
        Retrieve all content items within the given root which are marked as favorites for the current user.
        Parameters:
        rootId_ - root within which to get favorites
        filter_ - Only content matching the filter will be returned
        includeExpiredContent_ - set to true to include expired content
        Returns:
        favorite content ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
      • getFavoritesByRootPaging

        @Deprecated ResultPage getFavoritesByRootPaging(Long rootId_, ContentFilter filter_, Boolean includeExpiredContent_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Deprecated.
        Retrieve all content items within the given root which are marked as favorites for the current user.
        Parameters:
        rootId_ - root within which to get favorites
        filter_ - Only content matching the filter will be returned
        includeExpiredContent_ - set to true to include expired content
        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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
        sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
        sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
        Returns:
        favorite contents
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        See Also:
      • isFavorite

        Boolean isFavorite(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Returns true if content is marked as a favorite for the current user.
        Parameters:
        id_ - content id
        Returns:
        true if content is marked as favorite
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • areFavorites

        @Deprecated Boolean[] areFavorites(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Returns true for each content which is marked as a favorite for the current user.
        Parameters:
        ids_ - content ids
        Returns:
        true for each content which is marked as a favorite
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • areFavorites

        @Deprecated Boolean[] areFavorites(Content[] contents_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Returns true for each content which is marked as a favorite for the current user.
        Parameters:
        contents_ - content items
        Returns:
        true for each content which is marked as a favorite
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • populateFavorites

        @Deprecated void populateFavorites(Content[] contents_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Populates the favorite field in the content beans you pass in.
        Parameters:
        contents_ - an array of Content objects
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • addFavorite

        @Deprecated PendingAccess addFavorite(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Mark the given content item as a favorite for the current user.
        Parameters:
        id_ - content id
        Returns:
        PendingAccess bean (may be 0 length)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • addFavoriteForUsers

        @Deprecated void addFavoriteForUsers(Long id, String[] usernames) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
        Deprecated.
        Mark the given content item as a favorite for the given users. Requires administrator privileges.
        Parameters:
        id - content id
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
      • addFavorites

        @Deprecated PendingAccess addFavorites(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Mark the given content items as a favorite for the current user.
        Parameters:
        ids_ - content ids
        Returns:
        PendingAccess bean (may be 0 length)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • removeFavorite

        @Deprecated void removeFavorite(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Remove a content item as a favorite for the current user.
        Parameters:
        id_ - content id
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • removeFavorites

        @Deprecated void removeFavorites(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Remove content items as favorites for the current user.
        Parameters:
        ids_ - content ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • removeFavoriteForUsers

        @Deprecated void removeFavoriteForUsers(Long id_, String[] username_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
        Deprecated.
        Remove content item as a favorite for the given users.
        Parameters:
        id_ - content id
        username_ - list of usernames
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
      • cleanseFavorites

        @Deprecated Long[] cleanseFavorites()
        Deprecated.
        This call eliminates those favorites to which have been deactivated/deleted, or to which the user no longer has access.
        Returns:
        valid favorite ids
      • cleanseApprovals

        @Deprecated void cleanseApprovals()
        Deprecated.
        This call eliminates those queued approvals that have already been handled by other users. (This is done automatically whenever something is approved or rejected by the current user.)
      • getRoleMap

        ContentRoleMap getRoleMap(Long id_, Boolean includeAggregate_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Get the role map for a content item.
        Parameters:
        id_ - singular
        includeAggregate_ - include aggregate (ContentConstants.RM_AGGREGATE or ContentConstants.RM_EXPLICIT)
        Returns:
        RoleMap
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        See Also:
      • setRoleMap

        RoleMapChanges setRoleMap(Long id_, ContentRoleMap rolemap_, Boolean contract_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidUserException, PrivilegeException
        Set the role map for a content item.
        Parameters:
        id_ - singular
        rolemap_ - singular
        contract_ - if true will remove users lower in the hierarchy who are removed from all access in this rolemap
        Returns:
        bean with fields approvedGroups, rejectedGroups, approvedUser, rejectedUser
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidUserException - if an invalid user is referenced
        PrivilegeException - if the user does not have permission to take this action
        See Also:
      • setRoleMapForAllVersions

        void setRoleMapForAllVersions(Long id_, ContentRoleMap rolemap_, Boolean contract_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidUserException, PrivilegeException
        Sets the role map for all the versions of a content item.
        Parameters:
        id_ - The id of the content item whose role map should be set.
        rolemap_ - The role map to set.
        contract_ - if true will remove users lower in the hierarchy who are removed from all access in this rolemap
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content id is specified
        InvalidUserException - if an invalid user is referenced
        PrivilegeException - if the user does not have permission to take this action
      • getRestrictionMap

        @Deprecated RoleMap getRestrictionMap(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
        Deprecated.
        Gets the restriction map for a Content object.
        Parameters:
        id_ - Restriction map will be returned for the object specified by this id.
        Returns:
        RoleMap with the same roles as a ContentRoleMap, indicating the restrictions on this object.
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
        See Also:
      • setRestrictionMap

        @Deprecated void setRestrictionMap(Long id_, RoleMap roleMap_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException, InvalidUserException
        Deprecated.
        Sets the restriction map for a Content object.
        Parameters:
        id_ - Restriction map will be set for the object specified by this id.
        roleMap_ - RoleMap with the same roles as a ContentRoleMap, indicating the restrictions on this object.
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
        InvalidUserException - if an invalid user is referenced
        See Also:
      • setActorsInRoles

        void setActorsInRoles(Long id_, String[] users_, String[][] userRoles_, Long[] groups_, String[][] groupRoles_) throws InvalidRoleException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException, InvalidUserException
        Set security roles for a content item by users and groups. (also supports imaginary "deny" role which automatically sets deny_readers and deny_authors)
        Parameters:
        id_ - content id
        users_ - users to set security for
        userRoles_ - contains an array of security roles for each corresponding entry in the users_ array. It is legal to have null within this array.
        groups_ - groups to set security for
        groupRoles_ - contains an array of security roles for each corresponding entry in the groups_ array. It is legal to have null within this array.
        Throws:
        InvalidRoleException - if an invalid role is passed in
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
        InvalidUserException - if an invalid user is referenced
      • getRoleSet

        ContentRoleSet getRoleSet(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Get the ContentRoleSet associated with the content with the ID provided.
        Parameters:
        id_ - content id
        Returns:
        the role set associated with the given content
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • getRoleSets

        ContentRoleSet[] getRoleSets(Content[] contents_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Get the ContentRoleSets associated with the given contents.
        Parameters:
        contents_ - list of content items
        Returns:
        the role set associated with the given content id
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • getRoleSets

        ContentRoleSet[] getRoleSets(Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Get the ContentRoleSets associated with the given content ids.
        Parameters:
        ids_ - content id
        Returns:
        the role sets associated with the given content
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • getRoleSetForUser

        @Deprecated ContentRoleSet getRoleSetForUser(String username_, Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException, InvalidUserException, DeprecatedException
        Deprecated.
        Requires two sets of credentials.
        Get the ContentRoleSet associated with the given content for a specific user.
        Parameters:
        username_ - user to retrieve role set for (must match current user, or will throw DeprecatedException)
        id_ - content id
        Returns:
        the role sets associated with the given content
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
        InvalidUserException - if an invalid user is referenced
        DeprecatedException
      • getRoleSetsForUser

        @Deprecated ContentRoleSet[] getRoleSetsForUser(String username_, Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException, InvalidUserException, DeprecatedException
        Deprecated.
        Requires two sets of credentials.
        Get the ContentRoleSets associated with the given contents for a specific user.
        Parameters:
        username_ - user to retrieve role set for (must match current user, or will throw DeprecatedException)
        ids_ - content ids
        Returns:
        the role sets associated with the given contents
        Throws:
        PrivilegeException - if the user does not have permission to take this action
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidUserException - if an invalid user is referenced
        DeprecatedException
      • getRoleSetForGroup

        ContentRoleSet getRoleSetForGroup(Long groupId_, Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
        Get the ContentRoleSet associated with the given content for a specific group.
        Parameters:
        groupId_ - group to retrieve role set for
        id_ - content id
        Returns:
        the role sets associated with the given content
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
      • getRoleSetsForGroup

        ContentRoleSet[] getRoleSetsForGroup(Long groupId_, Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
        Get the ContentRoleSets associated with the given contents for a specific group.
        Parameters:
        groupId_ - group to retrieve role set for
        ids_ - content id
        Returns:
        the role sets associated with the given content
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
      • populateRoleSets

        void populateRoleSets(Content[] contents_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
        Populates the roleSet field in the content beans you pass in.
        Parameters:
        contents_ - an array of Content objects
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
      • populateExtensionInfo

        void populateExtensionInfo(Content[] contents_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
        Populates the extensionInfo field in the document beans you pass in. Only applies to documents
        Parameters:
        contents_ - an array of Document objects
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
      • localize

        void localize(Content content_)
        Localizes the name, description, and parent name for the given content(s).
        Parameters:
        content_ - content to localize
      • localize

        void localize(Content[] contents_)
        Localizes the name, description, and parent name for the given content(s).
        Parameters:
        contents_ - content to localize
      • localize

        void localize(Content content_, Locale locale_)
        Localizes the name, description, and parent name for the given content(s).
        Parameters:
        content_ - content to localize
        locale_ - localize according to this local
      • localize

        void localize(Content[] contents_, Locale locale_)
        Localizes the name, description, and parent name for the given content(s).
        Parameters:
        contents_ - content to localize
        locale_ - localize according to this local
      • addUserInRole

        void addUserInRole(Long id_, String role_, String username_) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidRoleException
        Add user to content in given role.
        Parameters:
        id_ - content id
        role_ - from ContentConstants (e.g. ContentConstants.ROLE_READERS)
        username_ - username
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidRoleException - if an invalid role is passed in
      • addUsersInRole

        void addUsersInRole(Long id, String role, String[] username) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidRoleException
        Add users to content in given role.
        Parameters:
        id - content id
        role - from ContentConstants (e.g. ContentConstants.ROLE_READERS)
        username - list of usernames to add role
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidRoleException - if an invalid role is passed in
      • removeUserFromRole

        void removeUserFromRole(Long id, String role, String username) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidRoleException
        Remove user from content in given role.
        Parameters:
        id - content id
        role - from ContentConstants (e.g. ContentConstants.ROLE_READERS)
        username - user to remove role from
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidRoleException - if an invalid role is passed in
      • removeUsersFromRole

        void removeUsersFromRole(Long id, String role, String[] username) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidRoleException
        Remove users from content in given role.
        Parameters:
        id - content id
        role - from ContentConstants (e.g. ContentConstants.ROLE_READERS)
        username - list of usernames to remove role from
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidRoleException - if an invalid role is passed in
      • addGroupInRole

        void addGroupInRole(Long id, String role, Long groupId) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidRoleException
        Add group to content in given role.
        Parameters:
        id - content id
        role - from ContentConstants (e.g. ContentConstants.ROLE_READERS)
        groupId - group to add role to
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidRoleException - if an invalid role is passed in
      • addGroupsInRole

        void addGroupsInRole(Long id, String role, Long[] groupId) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidRoleException
        Add groups to content in given role.
        Parameters:
        id - content id
        role - from ContentConstants (e.g. ContentConstants.ROLE_READERS)
        groupId - list of groups to add role to
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidRoleException - if an invalid role is passed in
      • removeGroupFromRole

        void removeGroupFromRole(Long id, String role, Long groupId) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidRoleException
        Remove group from content in given role.
        Parameters:
        id - content id
        role - from ContentConstants (e.g. ContentConstants.ROLE_READERS)
        groupId - group to remove role from
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidRoleException - if an invalid role is passed in
      • removeGroupsFromRole

        void removeGroupsFromRole(Long id, String role, Long[] groupId) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, InvalidRoleException
        Remove groups from content in given role.
        Parameters:
        id - content id
        role - from ContentConstants (e.g. ContentConstants.ROLE_READERS)
        groupId - list of groups to remove role from
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        InvalidRoleException - if an invalid role is passed in
      • getViewable

        @Deprecated Long[] getViewable(Long root, ContentFilter filter) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Get all active, non-expired ids off the root, where view role held by user.
        Parameters:
        root - content id
        filter - Only content matching the filter will be returned
        Returns:
        content ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        See Also:
      • getViewableByUser

        Long[] getViewableByUser(Long root, ContentFilter filter, String username) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException, DeprecatedException
        Get all active, non-expired ids off the root, where view role held by user.
        Parameters:
        root - content id
        filter - Only content matching the filter will be returned
        username - user (must match current user, or will throw DeprecatedException)
        Returns:
        content ids
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        DeprecatedException
      • getEditable

        @Deprecated Long[] getEditable(Long root, ContentFilter filter) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Get all active, non-expired ids off the root, where editor role held by user.
        Parameters:
        root - content id
        filter - Only content matching the filter will be returned
        Returns:
        content ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        See Also:
      • getEditableByUser

        Long[] getEditableByUser(Long root_, ContentFilter filter_, String username_) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException, DeprecatedException
        Get all active, non-expired ids off the root, where editor role held by user.
        Parameters:
        root_ - content id
        filter_ - Only content matching the filter will be returned
        username_ - username (must match current user, or will throw DeprecatedException)
        Returns:
        content ids
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        DeprecatedException
      • getAdministratable

        @Deprecated Long[] getAdministratable(Long root, ContentFilter filter) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Get all active, non-expired ids off the root, where administratable role held by user.
        Parameters:
        root - content id
        filter - Only content matching the filter will be returned
        Returns:
        content ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        See Also:
      • getAdministratableByUser

        Long[] getAdministratableByUser(Long root, ContentFilter filter, String username) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException, DeprecatedException
        Get all active, non-expired ids off the root, where administratable role held by user.
        Parameters:
        root - content id
        filter - only content matching the filter will be returned
        username - username (must match current user, or will throw DeprecatedException)
        Returns:
        content ids
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        DeprecatedException
      • canAdministrate

        Boolean canAdministrate(Long id) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can current user Administrate?
        Parameters:
        id - content id
        Returns:
        boolean (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canAdministrate

        Boolean[] canAdministrate(Long[] ids) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can current user Administrate?
        Parameters:
        ids - content ids
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canAdministrate

        Boolean[] canAdministrate(Content[] content) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can current user Administrate?
        Parameters:
        content - content array
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canUserAdministrate

        Boolean canUserAdministrate(Long id, String username) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, DeprecatedException
        Can given User Administrate?
        Parameters:
        id - content id
        username - username (must match current user, or will throw DeprecatedException)
        Returns:
        boolean (0 if not, 1 if so)
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        DeprecatedException
      • canUserAdministrate

        Boolean[] canUserAdministrate(Long[] ids, String username) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can given User Administrate?
        Parameters:
        ids - content ids
        username - username (must match current user, or will throw DeprecatedException)
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canGroupAdministrate

        Boolean canGroupAdministrate(Long id, Long groupId) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can given Group Administrate?
        Parameters:
        id - content id
        groupId - group id
        Returns:
        boolean (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canGroupAdministrate

        Boolean[] canGroupAdministrate(Long[] ids, Long groupId) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can given Group Administrate?
        Parameters:
        ids - content ids
        groupId - group id
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • isViewNotRestricted

        Boolean isViewNotRestricted(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Is view privilege restricted?
        Parameters:
        id_ - content id
        Returns:
        true if not restricted
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • isEditNotRestricted

        Boolean isEditNotRestricted(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Is edit privilege restricted?
        Parameters:
        id_ - content id
        Returns:
        true if not restricted
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • isAdministrateNotRestricted

        Boolean isAdministrateNotRestricted(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Is administrate privilege restricted?
        Parameters:
        id_ - content id
        Returns:
        true if not restricted
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canEdit

        Boolean canEdit(Long id) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can current user Edit?
        Parameters:
        id - content id
        Returns:
        boolean (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canEdit

        Boolean[] canEdit(Long[] ids) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can current user Edit?
        Parameters:
        ids - content ids
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canEdit

        Boolean[] canEdit(Content[] content_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can current user Edit?
        Parameters:
        content_ - content list
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canUserEdit

        Boolean canUserEdit(Long id, String username) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, DeprecatedException
        Can given User Edit?
        Parameters:
        id - content id
        username - username (must match current user, or will throw DeprecatedException)
        Returns:
        boolean (0 if not, 1 if so)
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        DeprecatedException
      • canUserEdit

        Boolean[] canUserEdit(Long[] ids, String username) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can given User Edit?
        Parameters:
        ids - content id
        username - username (must match current user, or will throw DeprecatedException)
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canGroupEdit

        Boolean canGroupEdit(Long id, Long groupId) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can given Group Edit?
        Parameters:
        id - content id
        groupId - group id
        Returns:
        boolean (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canGroupEdit

        Boolean[] canGroupEdit(Long[] ids, Long groupId) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can given Group Edit?
        Parameters:
        ids - content ids
        groupId - group id
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canView

        Boolean canView(Long id) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can current user View?
        Parameters:
        id - content id
        Returns:
        boolean (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canView

        Boolean[] canView(Long[] ids) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can current user View?
        Parameters:
        ids - content ids
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canView

        Boolean[] canView(Content[] content) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can current user View?
        Parameters:
        content - content list
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canUserView

        Boolean canUserView(Long id, String username) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, DeprecatedException
        Can given User View?
        Parameters:
        id - content id
        username - username (must match current user, or will throw DeprecatedException)
        Returns:
        boolean (0 if not, 1 if so)
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        DeprecatedException
      • canUserView

        Boolean[] canUserView(Long[] ids, String username) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can given User View?
        Parameters:
        ids - content ids
        username - username (must match current user, or will throw DeprecatedException)
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canGroupView

        Boolean canGroupView(Long id, Long groupId) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can given Group View?
        Parameters:
        id - content id
        groupId - group id
        Returns:
        boolean (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • canGroupView

        Boolean[] canGroupView(Long[] ids, Long groupId) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Can given Group View?
        Parameters:
        ids - content ids
        groupId - group id
        Returns:
        boolean array (0 if not, 1 if so)
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • getAccessLevel

        Integer getAccessLevel(Long id_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Get the Access Level for the current user for a content item.
        Parameters:
        id_ - content id
        typemask_ - specifies the content type
        Returns:
        access level. One of ContentConstants.AL_ADMIN, ContentConstants.AL_EDITOR, ContentConstants.AL_INVALID_ID, ContentConstants.AL_NONE, ContentConstants.AL_VIEWER
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
      • getAccessLevel

        Integer getAccessLevel(Long id_, int typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Get the Access Level for the current user for a content item.
        Parameters:
        id_ - content id
        typemask_ - specifies the content type
        Returns:
        access level. One of ContentConstants.AL_ADMIN, ContentConstants.AL_EDITOR, ContentConstants.AL_INVALID_ID, ContentConstants.AL_NONE, ContentConstants.AL_VIEWER
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
      • getAccessLevel

        Integer[] getAccessLevel(Long[] ids_, Integer typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Get the Access Level for the current user for a list of content items.
        Parameters:
        ids_ - content id
        typemask_ - specifies the content type
        Returns:
        access level array. One of ContentConstants.AL_ADMIN, ContentConstants.AL_EDITOR, ContentConstants.AL_INVALID_ID, ContentConstants.AL_NONE, ContentConstants.AL_VIEWER
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
      • getAccessLevel

        Integer[] getAccessLevel(Long[] ids_, int typemask_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Get the Access Level for the current user for a list of content items.
        Parameters:
        ids_ - content id
        typemask_ - specifies the content type
        Returns:
        access level array. One of ContentConstants.AL_ADMIN, ContentConstants.AL_EDITOR, ContentConstants.AL_INVALID_ID, ContentConstants.AL_NONE, ContentConstants.AL_VIEWER
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
      • getAccessLevelForUser

        Integer getAccessLevelForUser(Long id_, Integer typemask_, String username_) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException, DeprecatedException
        Get the Access Level for the given user for a content item.
        Parameters:
        id_ - content id
        typemask_ - specifies the content type
        username_ - username (must match current user, or will throw DeprecatedException)
        Returns:
        access level. One of ContentConstants.AL_ADMIN, ContentConstants.AL_EDITOR, ContentConstants.AL_INVALID_ID, ContentConstants.AL_NONE, ContentConstants.AL_VIEWER
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
        DeprecatedException
      • getAccessLevelForUser

        Integer[] getAccessLevelForUser(Long[] ids_, Integer typemask_, String username_) throws InvalidUserException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException, DeprecatedException
        Get the Access Level for the given user for a list of content items.
        Parameters:
        ids_ - content id
        typemask_ - specifies the content type
        username_ - username (must match current user, or will throw DeprecatedException)
        Returns:
        access level array. One of ContentConstants.AL_ADMIN, ContentConstants.AL_EDITOR, ContentConstants.AL_INVALID_ID, ContentConstants.AL_NONE, ContentConstants.AL_VIEWER
        Throws:
        InvalidUserException - if an invalid user is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if an invalid typemask was passed in
        DeprecatedException
      • getWhatsNew

        @Deprecated Content[] getWhatsNew(Long root_, Integer maxResults_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Returns list of most recently modified content items within the specified root.
        Parameters:
        root_ - content id
        maxResults_ - max number of content items to return
        filter_ - only content matching the filter will be returned
        Returns:
        content list
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        See Also:
      • getWhatsNewIds

        Long[] getWhatsNewIds(Long root_, Integer maxResults_, ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Returns id list of most recently modified content items within the specified root.
        Parameters:
        root_ - content id
        maxResults_ - max number of content items to return
        filter_ - only content matching the filter will be returned
        Returns:
        id list
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • getWhatsNewPaging

        ResultPage getWhatsNewPaging(Long root_, Integer maxResults_, ContentFilter filter_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException, com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Returns list of most recently modified content items within the specified root.
        Parameters:
        root_ - content id
        maxResults_ - max number of content items to return
        filter_ - only content matching the filter will be returned
        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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
        sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
        sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
        Returns:
        content list
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - if the filter contains an invalid typemask
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        See Also:
      • setPersonalId

        void setPersonalId(Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Set the id for your Personal content item. Currently refers to your personal knowledge center.
        Parameters:
        id_ - of the content object to set as your personal content
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        See Also:
      • getPersonalId

        Long getPersonalId() throws com.appiancorp.suiteapi.content.exceptions.InvalidPersonalContentException
        Get the id for your Personal content item. Currently refers to your personal knowledge center. If no personal knowledge center exists it will be created.
        Returns:
        the id for your Personal content
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidPersonalContentException - if Personal Content does not exist for this user
        See Also:
      • getPersonal

        Content getPersonal() throws com.appiancorp.suiteapi.content.exceptions.InvalidPersonalContentException
        Get your Personal content item. Currently refers to your personal knowledge center. If no personal knowledge center exists it will be created.
        Returns:
        your Personal content item
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidPersonalContentException - if Personal Content does not exist for this user
      • getPersonalAndTeamsIds

        Long[] getPersonalAndTeamsIds(ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidPersonalContentException
        Get children of 'Personal and Teams'. If no personal knowledge center exists it will be created.
        Parameters:
        filter_ - only content matching the filter will be returned
        Returns:
        content ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidPersonalContentException - if Personal Content does not exist for this user
      • getPersonalAndTeams

        @Deprecated Content[] getPersonalAndTeams(ContentFilter filter_) throws com.appiancorp.suiteapi.content.exceptions.InvalidPersonalContentException
        Get children of 'Personal and Teams'. If no personal knowledge center exists it will be created.
        Parameters:
        filter_ - only content matching the filter will be returned
        Returns:
        content list
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidPersonalContentException - if Personal Content does not exist for this user
        See Also:
      • getPersonalAndTeamsPaging

        ResultPage getPersonalAndTeamsPaging(ContentFilter filter_, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidPersonalContentException
        Get children of 'Personal and Teams'. If no personal knowledge center exists it will be created.
        Parameters:
        filter_ - only content matching the filter will be returned
        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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
        sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
        sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
        Returns:
        content ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidPersonalContentException - if Personal Content does not exist for this user
        See Also:
      • browse

        @Deprecated Content[] browse(Long root, ContentFilter filter) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
        Browse includes: what the user may see via group permissions, including favorites, no personal content items, including advertised content items not visible, but not already in favorites. Typically used with Personal Knowledge Centers off of Knowledge Root.
        Parameters:
        root - content id
        filter - Only content matching the filter will be returned
        Returns:
        list of content items
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
      • browseIds

        Long[] browseIds(Long root, ContentFilter filter) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
        Browse includes: what the user may see via group permissions, including favorites, no personal content items, including advertised content items not visible, but not already in favorites. Typically used with Personal Knowledge Centers off of Knowledge Root.
        Parameters:
        root - content id
        filter - Only content matching the filter will be returned
        Returns:
        list of content item ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
      • browsePaging

        ResultPage browsePaging(Long root, ContentFilter filter, int startIndex_, int batchSize_, Integer sortProperty_, Integer sortOrder_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException
        Browse includes: what the user may see via group permissions, including favorites, no personal content items, including advertised content items not visible, but not already in favorites. Typically used with Personal Knowledge Centers off of Knowledge Root.
        Parameters:
        root - content id
        filter - Only content matching the filter will be returned
        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. Use Constants.COUNT_ALL to return the entire collection, but this is STRONGLY discouraged.
        sortProperty_ - the property by which the results will be sorted. This is one of the COLUMN_XXX constants in ContentConstants.
        sortOrder_ - the order in which to sort the results.This is one of Constants.SORT_ORDER_ASCENDING or Constants.SORT_ORDER_DESCENDING
        Returns:
        list of content items
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
        See Also:
      • getDownloadLogType

        Integer getDownloadLogType()
        Gets the download log type. Currently always returns TYPE_KC.
        Returns:
        download log type
      • updateUsernames

        @Deprecated void updateUsernames(String[] oldUsernames_, String[] newUsernames_, long maxExpirationTimeInSeconds_) throws IllegalArgumentException, PrivilegeException, DuplicateNameException
        DEPRECATED: See UserService.renameUsersByUuid(java.lang.String[], java.lang.String[]) Updates a list of old usernames to new usernames.

        If successful, this method must be followed by commitUpdateUsernames(). After commitUpdateUsernames has been called, the old usernames will still be active, but will expire after the interval specified by maxExpirationTimeInSeconds_; if updateUsernames is successful but commitUpdateUsernames is not called, the new usernames will not become active.

        If unsuccessful, this method should be followed by rollbackUpdateUsernames(). This will simply free memory dedicated to mapping old usernames to new usernames.

        Note: Only this or the CollaborationService updateUsernames must be called. Do not call both.

        Parameters:
        oldUsernames_ - the usernames to be updated
        newUsernames_ - the usernames to which the old usernames will be updated
        maxExpirationTimeInSeconds_ - the interval, in seconds, after commitUpdateUsernames has been called, after which the old usernames will expire. If this parameter is zero or a negative value the old usernames will expire instantly. After expiration, the old usernames will no longer be valid.
        Throws:
        IllegalArgumentException - if the length of oldUsernames_ is not the same as the length of newUsernames_.
        PrivilegeException - if the current user is not a system administrator
        DuplicateNameException - if any oldUsernames_ or newUsernames_ contain any duplicates, or if an old username is being updated to a username that already exists
        ServiceException - if any system-level error occurs
      • rollbackUpdateUsernames

        @Deprecated void rollbackUpdateUsernames()
        DEPRECATED: See UserService.renameUsersByUuid(java.lang.String[], java.lang.String[]) Rolls back an update of usernames.

        This method should be called if updateUsernames(String[], String[], long) is unsuccessful. The rollback will simply free memory dedicated to mapping old usernames to new usernames.

        Throws:
        ServiceException - if any system-level error occurs
      • commitUpdateUsernames

        @Deprecated void commitUpdateUsernames()
        DEPRECATED: See UserService.renameUsersByUuid(java.lang.String[], java.lang.String[]) Commits an update of usernames.

        This method should be preceded by a call to updateUsernames(String[], String[], long). After the commit, the old usernames will be temporarily active, and will expire after the interval specified by maxExpirationTimeInSeconds_; if commitUpdateUsernames is not called, the new usernames will not become active.

        Throws:
        ServiceException - if any system-level error occurs
      • getSystemId

        @Deprecated Long getSystemId(String name_)
        Deprecated.
        use getIdByUuid(String) instead. This method will be removed in a future release
        Get the system id corresponding to the given name K Supplied names include: community (the system default community) kc (the system kc) image_folder_id leader_message_channel_image_folder_id priority_image_folder_id indicator_image_folder_id reports_folder_id.
        Parameters:
        name_ - this is a known name for a system Content id
        Returns:
        system id, or null for unknown
        See Also:
      • getSystemIds

        @Deprecated Long[] getSystemIds(String[] names_)
        Deprecated.
        use getIdsByUuid(String[]) instead. This method will be removed in a future release
        Get the system ids corresponding to the given names.
        Parameters:
        names_ - these are the known names for a system Content id
        Returns:
        list of system ids (-1 for unknown)
        See Also:
      • getSystemNames

        @Deprecated String[] getSystemNames()
        Deprecated.
        Get all system names.
        Returns:
        name array (it will be small)
      • setSystemId

        @Deprecated void setSystemId(String name_, Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Use create(Content, Integer) with a pre-populated UUID and the flag ContentConstants.VIS_SYSTEM.
        Set a system name to a system id.
        Parameters:
        name_ - system name, must globally unique
        id_ - content id
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        See Also:
      • setSystemIds

        @Deprecated void setSystemIds(String[] names_, Long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, IllegalArgumentException
        Deprecated.
        Use create(Content[], Integer) with pre-populated UUIDs and the flag ContentConstants.VIS_SYSTEM.
        Set system names to system ids.
        Parameters:
        names_ - system names, must globally unique
        ids_ - content ids
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        IllegalArgumentException - if the length of names_ is different from the length of ids_
        See Also:
      • setRoot

        @Deprecated void setRoot(String name_, Long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Deprecated.
        Sets the given name to be a system id, and its own root, splitting it from its existing hierarchy. Setting as root sets its parent to itself, so it won't traverse further up the tree, and it detaches from the old root. This method also sets the system id; no need for a separate call to call setSystemId().
        Parameters:
        name_ - root name
        id_ - root id
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • setAsRoot

        void setAsRoot(Long id) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        Sets the given id as its own root, splitting it from its existing hierarchy. Setting it as root sets its parent to itself, so it won't traverse further up the tree, and it detaches from the old root.
        Parameters:
        id - root id
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
      • suggest

        String suggest(String query_, int maxItems_, SuggestParam[] params_, Boolean groupResults_)
        Queries for content and returns a JSON formatted string to be used by autocomplete.
        Parameters:
        query_ - query
        maxItems_ - max number of items to return
        params_ - list of information on what is being suggested and what format the results should be in. valid types are rules.
        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)
        Queries for content and returns a JSON formatted string to be used by autocomplete.
        Parameters:
        query_ - query
        maxItems_ - max number of items to return
        params_ - list of information on what is being suggested and what format the results should be in. valid types are rules.
        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
      • adjustCounter

        Integer adjustCounter(Long id_, Integer value) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Adjust a rules based constant (counter) of type integer or double by the given adjustment value. This is useful for atomically incrementing or decrementing global constant counters. Note, that while this is useful for ensuring that read/update/write errors do not occur, the propagation of the update is the same as all constant updates. Also, no new version of the id is created -- it is the same id as before. (This is to prevent a million counter updates from creating a million separate content items.)
        Parameters:
        id_ - rule id of integer or double constant
        value_ - adjustment value (e.g., 1 to increase by 1, -1 to decrease by 1, etc.)
        Returns:
        new value
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - for any type error, including adjusting non-rule, non-constant, non-integer or -double.
      • adjustCounter

        Double adjustCounter(Long id_, Double value) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException
        Adjust a rules based constant (counter) of type integer or double by the given adjustment value. This is useful for atomically incrementing or decrementing global constant counters. Note, that while this is useful for ensuring that read/update/write errors do not occur, the propagation of the update is the same as all constant updates. Also, no new version of the id is created -- it is the same id as before. (This is to prevent a million counter updates from creating a million separate content items.)
        Parameters:
        id_ - rule id of integer or double constant
        value_ - adjustment value (e.g., 1 to increase by 1, -1 to decrease by 1, etc.)
        Returns:
        new value
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
        com.appiancorp.suiteapi.content.exceptions.InvalidTypeMaskException - for any type error, including adjusting non-rule, non-constant, non-integer or -double.
      • moveKnowledgeCenter

        void moveKnowledgeCenter(Long kcId_, Long communityId_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException, InvalidStateException
        Move a KC to a community. This method will also update the Content Object to reflect the changes of Type and Quota. If the move succeeds, the KC will be updated to a Community KC.
        Parameters:
        kcId_ - content id of the Knowledge Center to move
        communityId_ - id of community under which to move the Knowledge Center
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
        com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException - if the destination is a descendant of the item you are moving
        InvalidStateException - Deprecated. If the move succeeds, the KC will be updated to a Community KC.
      • moveKnowledgeCenters

        void moveKnowledgeCenters(Long[] kcIds_, Long communityId_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException, InvalidStateException
        Moves KCs to a community. This method will also update the Content Objects to reflect the changes to the columns of Type and Quota. If the move succeeds, the KCs will be updated to Community KCs.
        Parameters:
        kcIds_ - content ids of the Knowledge Centers to move
        communityId_ - id of community under which to move the Knowledge Centers
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        PrivilegeException - if the user does not have permission to take this action
        com.appiancorp.suiteapi.content.exceptions.IllegalRecursionException - if the destination is a descendant of the item you are moving
        InvalidStateException - Deprecated. If the move succeeds, the KC will be updated to a Community KC.
      • validateTypedValues

        Validates given TypedValues. This method is free to throw an exception or to return false if any TypedValue passed is invalid for this engine. This engine supports: AppianType.DOCUMENT AppianType.FOLDER AppianType.KNOWLEDGE_CENTER AppianType.COMMUNITY AppianType.DOCUMENT_OR_FOLDER
        Parameters:
        typedValues -
        Returns:
        true if valid, false if invalid
        Throws:
        InvalidDocumentException
        InvalidFolderException
        InvalidKnowledgeCenterException
        InvalidCommunityException
      • getIdByUuid

        Long getIdByUuid(@ConvertWith(com.appiancorp.kougar.mapper.parameters.UuidParameterConverter.class) String uuid)
        Gets a content id by UUID. The version returned is NOT always the current version (ContentConstants.VERSION_CURRENT). Consider using getVersionId(String, Integer) instead.
        Parameters:
        uuid - content UUID
        Returns:
        content id or null if the UUID is not found
        See Also:
        • constants for System UUIDs
      • getIdsByUuid

        Long[] getIdsByUuid(@ConvertWith(com.appiancorp.kougar.mapper.parameters.UuidParameterConverter[][].class) String[] uuids)
        Gets content ids by UUID. The versions returned are NOT always the current version (ContentConstants.VERSION_CURRENT).
        Parameters:
        uuids - content UUIDs
        Returns:
        content ids or null items for UUIDs not found
        Throws:
        NullPointerException - if uuids is null
        See Also:
        • constants for System UUIDs
      • getDatatypeIds

        Long[] getDatatypeIds(Long... contentIds)
        Gets the datatype ids that content ids map to. For example, a content object with ContentConstants.TYPE_RULE type and ContentConstants.SUBTYPE_RULE_QUERY subtype maps to a AppianType.QUERY_RULE datatype
        Parameters:
        contentIds - content ids
        Returns:
        datatype ids mappped to the content objects specified by the given content ids
      • getDocumentInputStream

        DocumentInputStream getDocumentInputStream(long id_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, AppianStorageException
        Opens a stream to a Document allowing for the caller to read its contents.
        Parameters:
        id_ - the content ID of the version of the document; use getVersionId(Long, Integer) to obtain the id of the version of the document
        Returns:
        DocumentInputStream containing the content of the document
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        AppianStorageException - if an error occurs while opening the input stream for the file
        See Also:
      • getDocumentInputStream

        DocumentInputStream[] getDocumentInputStream(long[] ids_) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, AppianStorageException
        Opens streams to multiple Documents allowing the caller to read their contents.
        Parameters:
        ids_ - the content IDs of the versions of the documents; use getVersionIds(Long, Integer[]) to obtain the ids of the versions of the document
        Returns:
        DocumentInputStream[] containing the contents of the documents
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException - if an invalid content item is referenced
        AppianStorageException - if an error occurs while opening an input stream for a file
        See Also:
      • uploadDocument

        com.appiancorp.suiteapi.content.ContentUploadOutputStream uploadDocument(Document doc, Integer unique) throws com.appiancorp.suiteapi.content.exceptions.InvalidContentException, StorageLimitException, PrivilegeException, com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException, com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException, AppianStorageException
        Creates a document and provides an output stream to which the document's content should be written. The document is created using the createApproval(Content, Integer) API. The caller must write the document's data to the returned output stream and complete the upload by calling ContentUploadOutputStream.close(). Invoking the stream's close method will calculate the size of the data written to the stream and save it as metadata for the document.
        Parameters:
        doc - The Document to create.
        unique - How unique the name must be.
        Returns:
        The output stream to which the document's data should be written.
        Throws:
        com.appiancorp.suiteapi.content.exceptions.InvalidContentException
        StorageLimitException
        PrivilegeException
        com.appiancorp.suiteapi.content.exceptions.InsufficientNameUniquenessException
        com.appiancorp.suiteapi.content.exceptions.DuplicateUuidException
        AppianStorageException