Interface PersonalizationSearchService

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

public interface PersonalizationSearchService extends com.appiancorp.services.ContextSensitiveService
Provides access to search methods within Personalization.

Method generateSearchIndex(java.sql.Timestamp) wil generate an index file for all users and groups created or updated after a particular time. This index file can be used by the search engine to facilitate searching on users and groups.

Methods of service classes can all throw the unchecked exception ServiceException if any system-level error (for example, server failure) occurs, and will in general throw a checked exception (InvalidXXXException) when an entity to be retrieved is inaccessible, instead of returning null. Exceptions to this paradigm (including the use of ResultList as described below) are noted. All checked exceptions extend AppianException.

It may be necessary to retrieve a subset of results as opposed to an entire collection, and also to sort the subset by some property of the returned object. "Paging" methods which return a ResultPage are provided in certain instances for this purpose. The ResultPage will contain the sorted subset of results (via Result.getResults()), and the total number of items in the available result set (via ResultPage.getAvailableItems()).

It may also be necessary to retrieve some results, even if all results cannot be retrieved (for instance, some of the entities corresponding to a list of entity IDs may no longer exist). Methods which return a ResultList are provided for this purpose. The Result.getResults() method in this case will return all results which can be retrieved. In addition, there will be a list of result codes (ResultList.getResultCodes()) that represent the successful retrieval of an entity, or, if the entity could not be retrieved, the reason for the failure. See the CODE_XXX constants in ResultList for details.

See Also:
  • Field Details

    • INVALID

      static final Integer INVALID
      A constant indicating that a group or username does not refer to a valid user or group
    • NO_ACCESS

      static final Integer NO_ACCESS
      A constant indicating that a user has no access to a given entity
    • VIEW

      static final Integer VIEW
      A constant indicating that a user can view a given entity
    • LIMITED_EDIT

      static final Integer LIMITED_EDIT
      A constant indicating that a user can edit his basic attributes (address, field01, etc.) but cannot edit supervisor and user type, among others. Thus, a non-admin user will have LIMITED_EDIT(2) for himself and VIEW(1) on everyone else.
    • ADMIN

      static final Integer ADMIN
      A constant indicating that a user is an administrator of a given entity
    • generateSearchIndex$UPDATES

      static final boolean generateSearchIndex$UPDATES
      See Also:
    • getPermissionsForUserIdsForUser$UPDATES

      static final boolean getPermissionsForUserIdsForUser$UPDATES
      See Also:
    • getPermissionsForGroupIds$UPDATES

      static final boolean getPermissionsForGroupIds$UPDATES
      See Also:
    • getPermissionsForGroupIdsForUser$UPDATES

      static final boolean getPermissionsForGroupIdsForUser$UPDATES
      See Also:
    • getApplicationName$UPDATES

      static final boolean getApplicationName$UPDATES
      See Also:
    • getWorkspace$UPDATES

      static final boolean getWorkspace$UPDATES
      See Also:
    • getPermissionsForUserNames$UPDATES

      static final boolean getPermissionsForUserNames$UPDATES
      See Also:
    • getPermissionsForUserNamesForUser$UPDATES

      static final boolean getPermissionsForUserNamesForUser$UPDATES
      See Also:
  • Method Details

    • generateSearchIndex

      String generateSearchIndex(Timestamp timeStamp_)
      Generates search index bodies for:
      Parameters:
      timeStamp_ - only include users and groups modified since this time. Pass null to index all users and groups.
      Returns:
      filename of search index output
      Throws:
      ServiceException - if any system-level error occurs
    • getPermissionsForUserIdsForUser

      @Deprecated int[] getPermissionsForUserIdsForUser(Long[] userIds_, String userName_)
      Gets the permissions of the given user for the users with the specified ids.
      Parameters:
      userIds_ - the ids of the users for which to get permissions
      userName_ - user name to find the access capabilities of
      Returns:
      array of same size as userIds, where each member is a constant representing access capabilities of the given user to the given user with the given id. The possible permission values are: INVALID, NO_ACCESS, LIMITED_EDIT and ADMIN.
      Throws:
      ServiceException - if any system-level error occurs
    • getPermissionsForGroupIds

      int[] getPermissionsForGroupIds(Long[] ids_)
      Gets the permissions of the current user for the groups with the specified ids. If an ID is passed which does not correspond to a valid group, then INVALID will be returned for that ID.
      Parameters:
      ids_ - the ids of the groups for which to get permissions. If null, an empty array will be returned.
      Returns:
      array of same size as ids_, where each member is a constant representing access capabilities of the current user to the group with the given id. The constant values are as follows:
      Throws:
      ServiceException - if any system-level error occurs
    • getPermissionsForGroupIdsForUser

      int[] getPermissionsForGroupIdsForUser(Long[] ids_, String userName_) throws InvalidUserException
      Gets the permissions of the given user for the groups with the specified ids. If an ID is passed which does not correspond to a valid group, then INVALID will be returned for that ID.
      Parameters:
      ids_ - the ids of the groups for which to get permissions. If null, an empty array will be returned.
      userName_ - user name to find the access capabilities of
      Returns:
      array of same size as ids_, where each member is a constant representing access capabilities of the given user to the group with the given id. The constant values are as follows:
      Throws:
      InvalidUserException - if the username does not correspond to a valid user
      ServiceException - if any system-level error occurs
    • getApplicationName

      String getApplicationName()
      Gets the name of the application
      Returns:
      the name of the application
      Throws:
      ServiceException - if any system-level error occurs
    • getWorkspace

      String[] getWorkspace()
      Gets the current memory profile for the workspace.
      Returns:
      array of Strings of length 4 describing memory usage:
      • [0]Used - Memory Used by the Server so far for storage
      • [1]Allocated - Memory allocated for use. Often if a large data item was allocated by a server and subsequently freed, this value will be large compared to "Used". If nearly all memory allocated is in use, this value will be close to (but always higher than) "Used"
      • [2]Mapped - is the space used by memory-mapped files
      • [3]Available - is the total available memory for the Server process
      Note: All usage statistics are in Bytes.
      Throws:
      ServiceException - if any system-level error occurs
    • getPermissionsForUserNames

      @Deprecated int[] getPermissionsForUserNames(String[] userNames_)
      Gets the permissions of the current user for the users with the specified usernames.
      Parameters:
      userNames_ - the usernames of the users for which to get permissions
      Returns:
      array of same size as userNames_, where each is member is a constant representing access capabilities of the current user to the user with the given username. The possible permission values are: INVALID, NO_ACCESS, LIMITED_EDIT and ADMIN.
      Throws:
      ServiceException - if any system-level error occurs
    • getPermissionsForUserNamesForUser

      @Deprecated int[] getPermissionsForUserNamesForUser(String[] userNames_, String userName_)
      Gets the permissions of the given user for the users with the specified usernames.
      Parameters:
      userNames_ - the usernames of the users for which to get permissions
      userName_ - username to find the access capabilities of
      Returns:
      array of same size as userNames_, where each is member is a constant representing access capabilities of the user with the given userName to the users with the given usernames. The possible permission values are: INVALID, NO_ACCESS, LIMITED_EDIT and ADMIN. The constant values are as follows:
      Throws:
      ServiceException - if any system-level error occurs