Package com.openkm.sdk4j.impl
Class SearchImpl
- java.lang.Object
-
- com.openkm.sdk4j.impl.ClientImpl
-
- com.openkm.sdk4j.impl.SearchImpl
-
- All Implemented Interfaces:
BaseSearch,Serializable
public class SearchImpl extends ClientImpl implements BaseSearch, Serializable
SearchImpl- Author:
- sochoa
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SearchImpl(String host)SearchImpl
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamcsvExport(String lang, QueryParams queryParams, boolean compact)Csv export input stream.voiddeleteSearch(int qpId)Delete search.List<QueryResult>find(QueryParams queryParams, String propertiesPlugin)Find list.List<QueryResult>find(QueryParams queryParams, String sortField, boolean sortReverse, String propertiesPlugin)Find list.List<QueryParams>findAllDefaultByNodeClass(long ncId)Find all default by node class list.List<QueryResult>findByQuery(String query, String propertiesPlugin)Find by query list.List<QueryResult>findByQuery(String query, String sortField, boolean sortReverse, String propertiesPlugin)Find by query list.ResultSetfindByQueryPaginated(String query, int offset, int limit, String propertiesPlugin)Find by query paginated result set.ResultSetfindByQueryPaginated(String query, String sortField, boolean sortReverse, int offset, int limit, String propertiesPlugin)Find by query paginated result set.ResultSetfindPaginated(QueryParams queryParams, int offset, int limit, String propertiesPlugin)Find paginated result set.ResultSetfindPaginated(QueryParams queryParams, String sortField, boolean sortReverse, int offset, int limit, String propertiesPlugin)Find paginated result set.SimpleNodeBaseResultSetfindSimpleNodeBaseByQueryPaginated(String query, int offset, int limit)Find simple node base by query paginated simple node base result set.SimpleNodeBaseResultSetfindSimpleNodeBaseByQueryPaginated(String query, String sortField, boolean sortReverse, int offset, int limit)Find simple node base by query paginated simple node base result set.SimpleNodeBaseResultSetfindSimpleNodeBasePaginated(QueryParams queryParams, int offset, int limit)Find simple node base paginated simple node base result set.SimpleNodeBaseResultSetfindSimpleNodeBasePaginated(QueryParams queryParams, String sortField, boolean sortReverse, int offset, int limit)Find simple node base paginated simple node base result set.SimpleNodeBaseResultSetfindSimpleNodeBasePaginated(QueryParams queryParams, String sortField, boolean sortReverse, int offset, int limit, String pluginName)Find simple node base paginated simple node base result set.List<QueryResult>findWithMetadata(QueryParams queryParams, String sortField, boolean sortReverse, String propertiesPlugin, List<String> groups)Find with metadata list.List<QueryResult>findWithMetadata(QueryParams queryParams, String propertiesPlugin, List<String> groups)Find with metadata list.ResultSetfindWithMetadataPaginated(QueryParams queryParams, int offset, int limit, String propertiesPlugin, List<String> groups)Find with metadata paginated result set.ResultSetfindWithMetadataPaginated(QueryParams queryParams, String sortField, boolean sortReverse, int offset, int limit, String propertiesPlugin, List<String> groups)Find with metadata paginated result set.List<QueryParams>getAllSearches()Gets all searches.List<Document>getCategorizedDocuments(String categoryId)Gets categorized documents.List<MimeType>getMimeTypes()Gets mime types.QueryParamsgetSearch(int qpId)Gets search.NodeSearchConfiggetSearchConfig(String pluginName)Gets search config.SearchPluginListgetSearchPlugins()Gets search plugins.longsaveSearch(QueryParams params)Save search long.voidsetAuthorizationToken(String authorizationToken)setAuthenticationTokenvoidupdateSearch(QueryParams params)Update search.-
Methods inherited from class com.openkm.sdk4j.impl.ClientImpl
getClient, getWebTarget, setAuthorizationHeader, setJsessionIdHeader
-
-
-
-
Constructor Detail
-
SearchImpl
public SearchImpl(String host)
SearchImpl
-
-
Method Detail
-
setAuthorizationToken
public void setAuthorizationToken(String authorizationToken)
setAuthenticationToken
-
find
public List<QueryResult> find(QueryParams queryParams, String propertiesPlugin) throws AccessDeniedException, ParseException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind list.- Specified by:
findin interfaceBaseSearch- Parameters:
queryParams- the query paramspropertiesPlugin- the properties plugin- Returns:
- the list
- Throws:
AccessDeniedException- the access denied exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
find
public List<QueryResult> find(QueryParams queryParams, String sortField, boolean sortReverse, String propertiesPlugin) throws AccessDeniedException, ParseException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind list.- Specified by:
findin interfaceBaseSearch- Parameters:
queryParams- the query paramssortField- the sort fieldsortReverse- the sort reversepropertiesPlugin- the properties plugin- Returns:
- the list
- Throws:
AccessDeniedException- the access denied exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findPaginated
public ResultSet findPaginated(QueryParams queryParams, int offset, int limit, String propertiesPlugin) throws AccessDeniedException, ParseException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind paginated result set.- Specified by:
findPaginatedin interfaceBaseSearch- Parameters:
queryParams- the query paramsoffset- the offsetlimit- the limitpropertiesPlugin- the properties plugin- Returns:
- the result set
- Throws:
AccessDeniedException- the access denied exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findPaginated
public ResultSet findPaginated(QueryParams queryParams, String sortField, boolean sortReverse, int offset, int limit, String propertiesPlugin) throws AccessDeniedException, ParseException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind paginated result set.- Specified by:
findPaginatedin interfaceBaseSearch- Parameters:
queryParams- the query paramssortField- the sort fieldsortReverse- the sort reverseoffset- the offsetlimit- the limitpropertiesPlugin- the properties plugin- Returns:
- the result set
- Throws:
AccessDeniedException- the access denied exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findSimpleNodeBasePaginated
public SimpleNodeBaseResultSet findSimpleNodeBasePaginated(QueryParams queryParams, int offset, int limit) throws AccessDeniedException, ParseException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind simple node base paginated simple node base result set.- Specified by:
findSimpleNodeBasePaginatedin interfaceBaseSearch- Parameters:
queryParams- the query paramsoffset- the offsetlimit- the limit- Returns:
- the simple node base result set
- Throws:
AccessDeniedException- the access denied exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findSimpleNodeBasePaginated
public SimpleNodeBaseResultSet findSimpleNodeBasePaginated(QueryParams queryParams, String sortField, boolean sortReverse, int offset, int limit) throws AccessDeniedException, ParseException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind simple node base paginated simple node base result set.- Specified by:
findSimpleNodeBasePaginatedin interfaceBaseSearch- Parameters:
queryParams- the query paramssortField- the sort fieldsortReverse- the sort reverseoffset- the offsetlimit- the limit- Returns:
- the simple node base result set
- Throws:
AccessDeniedException- the access denied exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findSimpleNodeBasePaginated
public SimpleNodeBaseResultSet findSimpleNodeBasePaginated(QueryParams queryParams, String sortField, boolean sortReverse, int offset, int limit, String pluginName) throws AccessDeniedException, ParseException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind simple node base paginated simple node base result set.- Specified by:
findSimpleNodeBasePaginatedin interfaceBaseSearch- Parameters:
queryParams- the query paramssortField- the sort fieldsortReverse- the sort reverseoffset- the offsetlimit- the limitpluginName- the plugin name- Returns:
- the simple node base result set
- Throws:
AccessDeniedException- the access denied exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findWithMetadata
public List<QueryResult> findWithMetadata(QueryParams queryParams, String propertiesPlugin, List<String> groups) throws ParseException, AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind with metadata list.- Specified by:
findWithMetadatain interfaceBaseSearch- Parameters:
queryParams- the paramspropertiesPlugin- the properties plugingroups- the groups- Returns:
- the list
- Throws:
ParseException- the parse exceptionAccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findWithMetadata
public List<QueryResult> findWithMetadata(QueryParams queryParams, String sortField, boolean sortReverse, String propertiesPlugin, List<String> groups) throws ParseException, AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind with metadata list.- Specified by:
findWithMetadatain interfaceBaseSearch- Parameters:
queryParams- the paramssortField- the sort fieldsortReverse- the sort reversepropertiesPlugin- the properties plugingroups- the groups- Returns:
- the list
- Throws:
ParseException- the parse exceptionAccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findWithMetadataPaginated
public ResultSet findWithMetadataPaginated(QueryParams queryParams, int offset, int limit, String propertiesPlugin, List<String> groups) throws AccessDeniedException, ParseException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind with metadata paginated result set.- Specified by:
findWithMetadataPaginatedin interfaceBaseSearch- Parameters:
queryParams- the query paramsoffset- the offsetlimit- the limitpropertiesPlugin- the properties plugingroups- the groups- Returns:
- the result set
- Throws:
AccessDeniedException- the access denied exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findWithMetadataPaginated
public ResultSet findWithMetadataPaginated(QueryParams queryParams, String sortField, boolean sortReverse, int offset, int limit, String propertiesPlugin, List<String> groups) throws AccessDeniedException, ParseException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind with metadata paginated result set.- Specified by:
findWithMetadataPaginatedin interfaceBaseSearch- Parameters:
queryParams- the query paramssortField- the sort fieldsortReverse- the sort reverseoffset- the offsetlimit- the limitpropertiesPlugin- the properties plugingroups- the groups- Returns:
- the result set
- Throws:
AccessDeniedException- the access denied exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findByQuery
public List<QueryResult> findByQuery(String query, String propertiesPlugin) throws ParseException, AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind by query list.- Specified by:
findByQueryin interfaceBaseSearch- Parameters:
query- the querypropertiesPlugin- the properties plugin- Returns:
- the list
- Throws:
ParseException- the parse exceptionAccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findByQuery
public List<QueryResult> findByQuery(String query, String sortField, boolean sortReverse, String propertiesPlugin) throws ParseException, AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind by query list.- Specified by:
findByQueryin interfaceBaseSearch- Parameters:
query- the querysortField- the sort fieldsortReverse- the sort reversepropertiesPlugin- the properties plugin- Returns:
- the list
- Throws:
ParseException- the parse exceptionAccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findByQueryPaginated
public ResultSet findByQueryPaginated(String query, int offset, int limit, String propertiesPlugin) throws ParseException, AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind by query paginated result set.- Specified by:
findByQueryPaginatedin interfaceBaseSearch- Parameters:
query- the queryoffset- the offsetlimit- the limitpropertiesPlugin- the properties plugin- Returns:
- the result set
- Throws:
ParseException- the parse exceptionAccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findByQueryPaginated
public ResultSet findByQueryPaginated(String query, String sortField, boolean sortReverse, int offset, int limit, String propertiesPlugin) throws ParseException, AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind by query paginated result set.- Specified by:
findByQueryPaginatedin interfaceBaseSearch- Parameters:
query- the querysortField- the sort fieldsortReverse- the sort reverseoffset- the offsetlimit- the limitpropertiesPlugin- the properties plugin- Returns:
- the result set
- Throws:
ParseException- the parse exceptionAccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findSimpleNodeBaseByQueryPaginated
public SimpleNodeBaseResultSet findSimpleNodeBaseByQueryPaginated(String query, int offset, int limit) throws ParseException, AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind simple node base by query paginated simple node base result set.- Specified by:
findSimpleNodeBaseByQueryPaginatedin interfaceBaseSearch- Parameters:
query- the queryoffset- the offsetlimit- the limit- Returns:
- the simple node base result set
- Throws:
ParseException- the parse exceptionAccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findSimpleNodeBaseByQueryPaginated
public SimpleNodeBaseResultSet findSimpleNodeBaseByQueryPaginated(String query, String sortField, boolean sortReverse, int offset, int limit) throws ParseException, AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind simple node base by query paginated simple node base result set.- Specified by:
findSimpleNodeBaseByQueryPaginatedin interfaceBaseSearch- Parameters:
query- the querysortField- the sort fieldsortReverse- the sort reverseoffset- the offsetlimit- the limit- Returns:
- the simple node base result set
- Throws:
ParseException- the parse exceptionAccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getCategorizedDocuments
public List<Document> getCategorizedDocuments(String categoryId) throws AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchGets categorized documents.- Specified by:
getCategorizedDocumentsin interfaceBaseSearch- Parameters:
categoryId- the category id- Returns:
- the categorized documents
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
saveSearch
public long saveSearch(QueryParams params) throws RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchSave search long.- Specified by:
saveSearchin interfaceBaseSearch- Parameters:
params- the params- Returns:
- the long
- Throws:
RepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
updateSearch
public void updateSearch(QueryParams params) throws RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchUpdate search.- Specified by:
updateSearchin interfaceBaseSearch- Parameters:
params- the params- Throws:
RepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getSearch
public QueryParams getSearch(int qpId) throws AccessDeniedException, PathNotFoundException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchGets search.- Specified by:
getSearchin interfaceBaseSearch- Parameters:
qpId- the qp id- Returns:
- the search
- Throws:
AccessDeniedException- the access denied exceptionPathNotFoundException- the path not found exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getAllSearches
public List<QueryParams> getAllSearches() throws AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchGets all searches.- Specified by:
getAllSearchesin interfaceBaseSearch- Returns:
- the all searches
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
deleteSearch
public void deleteSearch(int qpId) throws RepositoryException, DatabaseException, UnknownException, WebserviceExceptionDescription copied from interface:BaseSearchDelete search.- Specified by:
deleteSearchin interfaceBaseSearch- Parameters:
qpId- the qp id- Throws:
RepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getSearchPlugins
public SearchPluginList getSearchPlugins() throws UnknownException, WebserviceException
Description copied from interface:BaseSearchGets search plugins.- Specified by:
getSearchPluginsin interfaceBaseSearch- Returns:
- search plugins
- Throws:
UnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getSearchConfig
public NodeSearchConfig getSearchConfig(String pluginName) throws UnknownException, WebserviceException
Description copied from interface:BaseSearchGets search config.- Specified by:
getSearchConfigin interfaceBaseSearch- Parameters:
pluginName- the plugin name- Returns:
- search config
- Throws:
UnknownException- the unknown exceptionWebserviceException- the webservice exception
-
findAllDefaultByNodeClass
public List<QueryParams> findAllDefaultByNodeClass(long ncId) throws AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchFind all default by node class list.- Specified by:
findAllDefaultByNodeClassin interfaceBaseSearch- Parameters:
ncId- the nc id- Returns:
- the list
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
getMimeTypes
public List<MimeType> getMimeTypes() throws AccessDeniedException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchGets mime types.- Specified by:
getMimeTypesin interfaceBaseSearch- Returns:
- the mime types
- Throws:
AccessDeniedException- the access denied exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
csvExport
public InputStream csvExport(String lang, QueryParams queryParams, boolean compact) throws AccessDeniedException, ParseException, RepositoryException, DatabaseException, UnknownException, WebserviceException
Description copied from interface:BaseSearchCsv export input stream.- Specified by:
csvExportin interfaceBaseSearch- Parameters:
lang- the langqueryParams- the query paramscompact- the compact- Returns:
- the input stream
- Throws:
AccessDeniedException- the access denied exceptionParseException- the parse exceptionRepositoryException- the repository exceptionDatabaseException- the database exceptionUnknownException- the unknown exceptionWebserviceException- the webservice exception
-
-