public class QueryServiceImpl extends Object implements QueryService, org.picocontainer.Startable
CACHE_NAME| Constructor and Description |
|---|
QueryServiceImpl(org.exoplatform.services.jcr.RepositoryService repositoryService,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
org.exoplatform.container.xml.InitParams params,
org.exoplatform.container.xml.PortalContainerInfo containerInfo,
org.exoplatform.services.cache.CacheService cacheService,
org.exoplatform.services.organization.OrganizationService organizationService,
DMSConfiguration dmsConfiguration)
Constructor method
|
| Modifier and Type | Method and Description |
|---|---|
void |
addQuery(String queryName,
String statement,
String language,
String userName)
Add new query by giving the following params : queryName, statement,
language, userName
|
void |
addSharedQuery(String queryName,
String statement,
String language,
String[] permissions,
boolean cachedResult)
Add new shared query by giving the following params: queryName, statement,
language, permissions, cachedResult
|
void |
addSharedQuery(String queryName,
String statement,
String language,
String[] permissions,
boolean cachedResult,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Add new shared query by giving the following params: queryName, statement,
language, permissions, cachedResult, provider
|
javax.jcr.query.QueryResult |
execute(String queryPath,
String workspace,
org.exoplatform.services.jcr.ext.common.SessionProvider provider,
String userId)
Execute query by giving the following params : queryPath, workspace,
provider, userId
|
Set<String> |
getAllConfiguredQueries()
gets all configured queries
|
List<javax.jcr.query.Query> |
getQueries(String userName,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Get queries by giving the following params : userName, repository, provider
|
javax.jcr.query.Query |
getQuery(String queryPath,
String workspace,
org.exoplatform.services.jcr.ext.common.SessionProvider provider,
String userId)
Returns Query object by giving the following params : queryPath, workspace,
provider, userId
|
javax.jcr.query.Query |
getQueryByPath(String queryPath,
String userName,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Get query with path by giving the following params : queryPath, userName,
provider
|
String |
getRelativePath()
Get the relative path
|
List<javax.jcr.Node> |
getSharedQueries(org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Get shared queries by giving the following params : provider
|
List<javax.jcr.Node> |
getSharedQueries(String userId,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Get shared queries by giving the following params : userId, provider
|
List<javax.jcr.Node> |
getSharedQueries(String queryType,
String userId,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Get shared queries by giving the following params : queryType, userId,
provider
|
javax.jcr.Node |
getSharedQuery(String queryName,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Get shared queries by giving the following params : queryName, provider
|
void |
init()
Init query node with current repository
|
void |
removeQuery(String queryPath,
String userName)
Remove query by giving the following params : queryPath, userName
|
void |
removeSharedQuery(String queryName,
org.exoplatform.services.jcr.ext.common.SessionProvider provider)
Remove share query by giving the following params : queryName
|
void |
setQueryPlugin(QueryPlugin queryPlugin)
Add new QueryPlugin to queryPlugins_
|
void |
start()
Implemented method from Startable class
init all ManageDrivePlugin
|
void |
stop()
Implemented method from Startable class
|
public QueryServiceImpl(org.exoplatform.services.jcr.RepositoryService repositoryService,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
org.exoplatform.container.xml.InitParams params,
org.exoplatform.container.xml.PortalContainerInfo containerInfo,
org.exoplatform.services.cache.CacheService cacheService,
org.exoplatform.services.organization.OrganizationService organizationService,
DMSConfiguration dmsConfiguration)
throws Exception
repositoryService - nodeHierarchyCreator - params - containerInfo - cacheService - organizationService - dmsConfiguration - Exceptionpublic void start()
start in interface org.picocontainer.StartableQueryPluginpublic void stop()
stop in interface org.picocontainer.Startablepublic void init()
throws Exception
init in interface QueryServiceExceptionQueryPluginpublic void setQueryPlugin(QueryPlugin queryPlugin)
queryPlugin - QueryPluginQueryPluginpublic String getRelativePath()
getRelativePath in interface QueryServicepublic List<javax.jcr.query.Query> getQueries(String userName, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getQueries in interface QueryServiceuserName - String Can be nullprovider - SessionProviderExceptionQuery,
SessionProviderpublic void addQuery(String queryName, String statement, String language, String userName) throws Exception
addQuery in interface QueryServicequeryName - String The name of querystatement - String The statement querylanguage - String The language is requesteduserName - String Can be nullExceptionpublic void removeQuery(String queryPath, String userName) throws Exception
removeQuery in interface QueryServicequeryPath - String The path of queryuserName - String Can be nullExceptionpublic void addSharedQuery(String queryName, String statement, String language, String[] permissions, boolean cachedResult) throws Exception
addSharedQuery in interface QueryServicequeryName - String The name of querystatement - String The statement querylanguage - String The language is requestedpermissions - String[]cachedResult - boolean Choosen for caching resultsExceptionpublic void addSharedQuery(String queryName, String statement, String language, String[] permissions, boolean cachedResult, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
QueryServiceaddSharedQuery in interface QueryServicequeryName - String The name of querystatement - String The statement querylanguage - String The language is requestedpermissions - String[]cachedResult - boolean Choosen for caching resultsprovider - Session providerExceptionpublic javax.jcr.Node getSharedQuery(String queryName, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getSharedQuery in interface QueryServicequeryName - the name of queryprovider - SessionProviderExceptionNode,
SessionProviderpublic List<javax.jcr.Node> getSharedQueries(org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getSharedQueries in interface QueryServiceprovider - SessionProviderExceptionNode,
SessionProviderpublic List<javax.jcr.Node> getSharedQueries(String userId, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getSharedQueries in interface QueryServiceuserId - String The id of current userprovider - SessionProviderExceptionNode,
SessionProviderpublic List<javax.jcr.Node> getSharedQueries(String queryType, String userId, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getSharedQueries in interface QueryServicequeryType - String The type of queryuserId - String The id of current userprovider - SessionProviderExceptionNode,
SessionProviderpublic javax.jcr.query.Query getQueryByPath(String queryPath, String userName, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
getQueryByPath in interface QueryServicequeryPath - String The path of queryuserName - String The name of current userprovider - SessionProviderExceptionNode,
Query,
SessionProviderpublic void removeSharedQuery(String queryName, org.exoplatform.services.jcr.ext.common.SessionProvider provider) throws Exception
removeSharedQuery in interface QueryServicequeryName - String The name of queryprovider - SessionProviderExceptionpublic javax.jcr.query.QueryResult execute(String queryPath, String workspace, org.exoplatform.services.jcr.ext.common.SessionProvider provider, String userId) throws Exception
execute in interface QueryServicequeryPath - String The path of queryworkspace - String The name of workspaceprovider - SessionProvideruserId - String The id of current userExceptionQueryResult,
SessionProviderpublic javax.jcr.query.Query getQuery(String queryPath, String workspace, org.exoplatform.services.jcr.ext.common.SessionProvider provider, String userId) throws Exception
getQuery in interface QueryServicequeryPath - String The path of queryworkspace - String The name of workspaceprovider - SessionProvideruserId - String The id of current userExceptionQueryResult,
SessionProviderpublic Set<String> getAllConfiguredQueries()
QueryServicegetAllConfiguredQueries in interface QueryServiceCopyright © 2003–2019 eXo Platform SAS. All rights reserved.