Interface ForumsSearchService

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

@Deprecated public interface ForumsSearchService extends com.appiancorp.services.ContextSensitiveService
Deprecated.
The Discussion Forums functionality will be removed in a future release. Use the News feed and related smart services to build applications with similar functionality.
Service for searching within messages in the forums application.

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

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

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

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

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Deprecated.
     
    static final int
    Deprecated.
     
    static final boolean
    Deprecated.
     
    static final boolean
    Deprecated.
     
    static final int
    Deprecated.
     

    Fields inherited from interface com.appiancorp.services.ContextSensitiveService

    SET_SERVICE_CONTEXT_METHOD_NAME
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated.
    Generates search index bodies for: Message
    int[]
    Deprecated.
    Gets the permissions for the given user of the specified message ids

    Methods inherited from interface com.appiancorp.services.ContextSensitiveService

    setServiceContext
  • Field Details

  • Method Details

    • generateSearchIndex

      String generateSearchIndex(Timestamp timeStamp_)
      Deprecated.
      Generates search index bodies for: Message
      Parameters:
      timeStamp_ - only include messages modified since timestamp. Pass null to index all messages.
      Returns:
      filename of search index output
      Throws:
      ServiceException - if any system-level error occurs
    • getPermissionsForMessageIdsForUser

      int[] getPermissionsForMessageIdsForUser(Long[] ids_, String userName_) throws InvalidUserException
      Deprecated.
      Gets the permissions for the given user of the specified message ids
      Parameters:
      ids_ - message IDs for which to retrieve permissions
      userName_ - The username of user whose permissions are to be retrieved. If the username is invalid, the method will execute as if for an anonymous user.
      Returns:
      array of same size as ids_, where each is member is a constant representing access capabilities for the given user to the message with the given ID. For those null elements of the ids array the function puts -1 at the corresponding place in the persmissions array. The constant values are as follows:
      • INVALID, if no message with the given ID exists
      • CANTSEE, if the current user does not have access to the message with the given ID
      • CANSEE, if the current user has access to the message with the given ID
      Throws:
      ServiceException - if any system-level error occurs
      NullPointerException - if the ids_ array, the userName_ or both are null
      InvalidUserException - will not trigger. Added for backwards compatibility.