Class RestEnterpriseSearchService
java.lang.Object
com.logicaldoc.webservice.AbstractService
com.logicaldoc.enterprise.webservice.soap.endpoint.SoapEnterpriseSearchService
com.logicaldoc.enterprise.webservice.rest.endpoint.RestEnterpriseSearchService
- All Implemented Interfaces:
EnterpriseSearchService
,EnterpriseSearchService
@Path("/")
@Consumes("application/json")
@Produces("application/json")
public class RestEnterpriseSearchService
extends SoapEnterpriseSearchService
implements EnterpriseSearchService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.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[][]
Queries the database to search for documents.Methods inherited from class com.logicaldoc.enterprise.webservice.soap.endpoint.SoapEnterpriseSearchService
findByParameters, findDocumentsByParameters, queryDocuments
Methods inherited from class com.logicaldoc.webservice.AbstractService
convertDateToString, convertStringToDate, getCurrentMessage, isValidateSession, setCurrentMessage, setValidateSession
-
Constructor Details
-
RestEnterpriseSearchService
public RestEnterpriseSearchService()
-
-
Method Details
-
findByParameters
@POST @Path("/findByParameters") public 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 Description copied from interface:EnterpriseSearchService
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.- Specified by:
findByParameters
in interfaceEnterpriseSearchService
- Parameters:
templateId
- the type of documents to be retrievedcriteria
- an array of search criteria that must be metorder
- optional order expression (eg. creation desc)maxResults
- maximum number of results- Returns:
- Collection of found documents
- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- The user has not been authenticatedFeatureNotEnabledException
- The feature is not enabled in the licensecom.logicaldoc.webservice.WebserviceException
- Error in the webservice logiccom.logicaldoc.core.PersistenceException
- Error in the data layer
-
findDocumentsByParameters
@POST @Path("/findDocumentsByParameters") public 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 Description copied from interface:EnterpriseSearchService
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.- Specified by:
findDocumentsByParameters
in interfaceEnterpriseSearchService
- Parameters:
templateId
- the type of documents to be retrievedcriteria
- an array of search criteria that must be metorder
- optional order expression (eg. creation desc)maxResults
- maximum number of results- Returns:
- Collection of found documents
- Throws:
com.logicaldoc.core.security.authentication.AuthenticationException
- The user has not been authenticatedFeatureNotEnabledException
- The feature is not enabled in the licensecom.logicaldoc.webservice.WebserviceException
- Error in the webservice logiccom.logicaldoc.core.PersistenceException
- Error in the data layer
-
queryDocuments
@POST @Path("/queryDocuments") @Consumes("application/x-www-form-urlencoded") public 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 Description copied from interface:EnterpriseSearchService
Queries the database to search for documents. The query is composed as: SELECT $select FROM ld_document DOC $tables WHERE $where $order;- Specified by:
queryDocuments
in interfaceEnterpriseSearchService
- Parameters:
select
- columns to returntables
- additional tables to join with ld_doumentwhere
- query conditionsorder
- optional clause for ordering or grouping the resultsmaxResults
- maximum number of results- Returns:
- Collection of found folders
- Throws:
com.logicaldoc.core.security.authorization.PermissionException
- The query uses not admitted syntaxcom.logicaldoc.core.security.authentication.AuthenticationException
- The user has not been authenticatedFeatureNotEnabledException
- The feature is not enabled in the licensecom.logicaldoc.webservice.WebserviceException
- Error in the webservice logiccom.logicaldoc.core.PersistenceException
- Error in the data layer
-