Interface EnterpriseSearchService

All Known Implementing Classes:
RestEnterpriseSearchService

@Consumes("application/json") @Produces("application/json") public interface EnterpriseSearchService
  • Method Summary

    Modifier and Type
    Method
    Description
    com.logicaldoc.webservice.model.WSDocument[]
    findByParameters(Long templateId, WSCriterion[] criteria, String order, Integer maxResults)
    Allows a user to retrieve all documents that match the list of criteria and that belong to the template with the given identifier.
    com.logicaldoc.webservice.model.WSDocument[]
    findDocumentsByParameters(Long templateId, WSCriterion[] criteria, String order, Integer maxResults)
    Allows a user to retrieve all documents that match the list of criteria and that belong to the template with the given identifier.
    String[][]
    queryDocuments(String select, String tables, String where, String order, Integer maxResults)
    Queries the database to search for documents.
  • Method Details

    • findByParameters

      @POST @Path("/findByParameters") com.logicaldoc.webservice.model.WSDocument[] findByParameters(@QueryParam("templateId") Long templateId, WSCriterion[] criteria, @QueryParam("order") String order, @QueryParam("maxResults") Integer maxResults) throws com.logicaldoc.core.security.authentication.AuthenticationException, FeatureNotEnabledException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException
      Allows a user to retrieve all documents that match the list of criteria and that belong to the template with the given identifier. It also retrieves regular documents and aliases.
      Parameters:
      templateId - the type of documents to be retrieved
      criteria - an array of search criteria that must be met
      order - optional order expression (eg. creation desc)
      maxResults - maximum number of results
      Returns:
      Collection of found documents
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer
      com.logicaldoc.webservice.WebserviceException - Error in the webservice logic
      FeatureNotEnabledException - The feature is not enabled in the license
      com.logicaldoc.core.security.authentication.AuthenticationException - The user has not been authenticated
    • findDocumentsByParameters

      @POST @Path("/findDocumentsByParameters") com.logicaldoc.webservice.model.WSDocument[] findDocumentsByParameters(@QueryParam("templateId") Long templateId, WSCriterion[] criteria, @QueryParam("order") String order, @QueryParam("maxResults") Integer maxResults) throws com.logicaldoc.core.security.authentication.AuthenticationException, FeatureNotEnabledException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException
      Allows a user to retrieve all documents that match the list of criteria and that belong to the template with the given identifier. Retrieves only regular documents.
      Parameters:
      templateId - the type of documents to be retrieved
      criteria - an array of search criteria that must be met
      order - optional order expression (eg. creation desc)
      maxResults - maximum number of results
      Returns:
      Collection of found documents
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer
      com.logicaldoc.webservice.WebserviceException - Error in the webservice logic
      FeatureNotEnabledException - The feature is not enabled in the license
      com.logicaldoc.core.security.authentication.AuthenticationException - The user has not been authenticated
    • queryDocuments

      @POST @Path("/queryDocuments") @Consumes("application/x-www-form-urlencoded") String[][] queryDocuments(@FormParam("select") String select, @FormParam("tables") String tables, @FormParam("where") String where, @FormParam("order") String order, @FormParam("maxResults") Integer maxResults) throws com.logicaldoc.core.security.authorization.PermissionException, com.logicaldoc.core.security.authentication.AuthenticationException, FeatureNotEnabledException, com.logicaldoc.webservice.WebserviceException, com.logicaldoc.core.PersistenceException
      Queries the database to search for documents. The query is composed as: SELECT $select FROM ld_document DOC $tables WHERE $where $order;
      Parameters:
      select - columns to return
      tables - additional tables to join with ld_doument
      where - query conditions
      order - optional clause for ordering or grouping the results
      maxResults - maximum number of results
      Returns:
      Collection of found folders
      Throws:
      com.logicaldoc.core.PersistenceException - Error in the data layer
      com.logicaldoc.webservice.WebserviceException - Error in the webservice logic
      FeatureNotEnabledException - The feature is not enabled in the license
      com.logicaldoc.core.security.authentication.AuthenticationException - The user has not been authenticated
      com.logicaldoc.core.security.authorization.PermissionException - The query uses not admitted syntax