This service is used to manage the search feature in WCM back-end

Package org.exoplatform.services.cms.queries.QueryService;

|| *Method* || *Return* || *Prototype* || *Description* ||
| *{{getRelativePath}}* | {{String}} | {{getRelativePath()}} | Get the relative path |
| *{{getQueries}}* | {{List<Query>}} | {{getQueries(String userName, String repository, SessionProvider provider) throws Exception}} | Get queries by giving the following params {example}{example} @param userName String Can be <code>null</code> {example}{example} @param repository String: The name of repository {example}{example} @param provider SessionProvider {example}{example} @return queries List<Query> {example}{example} @see Query {example}{example} @see SessionProvider {example}{example} @throws Exception |
| *{{execute}}* | {{QueryResult}} | {{execute(String queryPath, String workspace, String repository, SessionProvider provider, String userId) throws Exception}} | Execute query by giving the following params {example}{example} @param queryPath String The path of query {example}{example} @param workspace String: The name of workspace {example}{example} @param repository String: The name of repository {example}{example} @param provider SessionProvider {example}{example} @param userId String: The id of current user {example}{example} @return queries QueryResult {example}{example} @see QueryResult {example}{example} @see SessionProvider {example}{example} @throws Exception |
| *{{addQuery}}* | {{void}} | {{addQuery(String queryName, String statement, String language, String userName, String repository) throws Exception}} | Add new query by giving the following params {example}{example} @param queryName String: The name of query {example}{example} @param statement String: The statement query {example}{example} @param language String The language is requested {example}{example} @param userName String Can be <code>null</code> {example}{example} @param repository String The name of repository {example}{example} @throws Exception |
| *{{removeQuery}}* | {{void}} | {{removeQuery(String queryPath, String userName, String repository) throws Exception}} | Remove query by giving the following params {example}{example} @param queryPath String: The path of query {example}{example} param userName String Can be <code>null</code> {example}{example} @param repository String: The name of repository {example}{example} @throws Exception |
| *{{addSharedQuery}}* | {{void}} | {{addSharedQuery(String queryName, String statement, String language, String\[\] permissions, boolean cachedResult, String repository) throws Exception}} | Add new shared query by giving the following params {example}{example} @param queryName String The name of query {example}{example} @param statement String The statement query {example}{example} @param language String The language is requested {example}{example} @param permissions String\[\] {example}{example} @param cachedResult boolean: Choosen for caching results {example}{example} @param repository String The name of repository {example}{example} @throws Exception |
| *{{addSharedQuery}}* | {{void}} | {{addSharedQuery(String queryName, String statement, String language, String\[\] permissions, boolean cachedResult, String repository, SessionProvider provider) throws Exception}} | Add new shared query by giving the following params {example}{example} @param queryName String The name of query {example}{example} @param statement String The statement query {example}{example} @param language String: The language is requested {example}{example} @param permissions String\[\] {example}{example} @param cachedResult boolean: Choosen for caching results {example}{example} @param repository String: The name of repository {example}{example} @param provider: Session provider {example}{example} @throws Exception |
| *{{getSharedQuery}}* | {{Node}} | {{getSharedQuery(String queryName, String repository, SessionProvider provider) throws Exception}} | Get shared queries by giving the following params {example}{example} @param userId String: The id of current user {example}{example} @param repository String: The name of repository {example}{example} @param provider: SessionProvider {example}{example} @return sharedQueries List<Node> {example}{example} @see Node {example}{example} @see SessionProvider {example}{example} @throws Exception |
| *{{removeSharedQuery}}* | {{void}} | {{removeSharedQuery(String queryName, String repository) throws Exception}} | Remove share query by giving the following params {example}{example} @param queryName String: The name of query {example}{example} @param repository String: The name of repository {example}{example} @throws Exception |
| *{{getSharedQueries}}* | {{List<Node>}} | {{getSharedQueries(String repository, SessionProvider provider) throws Exception}} | Get shared queries by giving the following params {example}{example} @param repository String: The name of repository {example}{example} @param provider SessionProvider {example}{example} @return sharedQueries List<Node> {example}{example} @see Node {example}{example} @see SessionProvider {example}{example} @throws Exception |
| *{{getQueryByPath}}* | {{Query}} | {{getQueryByPath(String queryPath, String userName, String repository, SessionProvider provider) throws Exception}} | Get query with path by giving the following params {example}{example} @param queryPath String: The path of query {example}{example} @param userName String: The name of current user {example}{example} @param repository String: The name of repository {example}{example} @param provider: SessionProvider {example}{example} @return query Query {example}{example} @see Node {example}{example} @see Query {example}{example} @see SessionProvider {example}{example} @throws Exception |
| *{{getSharedQueries}}* | {{List<Node>}} | {{getSharedQueries(String userId, String repository, SessionProvider provider) throws Exception}} | Get shared queries by giving the following params {example}{example} @param userId String: The id of current user {example}{example} @param repository String: The name of repository {example}{example} @param provider SessionProvider {example}{example} @return sharedQueries List<Node> {example}{example} @see Node {example}{example} @see SessionProvider {example}{example} @throws Exception |
| *{{getSharedQueries}}* | {{List<Node>}} | {{getSharedQueries(String queryType, String userId, String repository, SessionProvider provider) throws Exception}} | Get shared queries by giving the following params {example}{example} @param queryType String: The type of query {example}{example} @param userId String: The id of current user {example}{example} @param repository String: The name of repository {example}{example} @param provider SessionProvider {example}{example} @return sharedQueries List<Node> {example}{example} @see Node {example}{example} @see SessionProvider {example}{example} @throws Exception |
| *{{init}}* | {{void}} | {{init(String repository) throws Exception}} | Init all query plugin by giving the following params {example}{example} @param repository String: The name of repository {example}{example} @see QueryPlugin {example}{example} @throws Exception |

