Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.service.cmr.search
Interface SearchService

@org.alfresco.api.AlfrescoPublicApi
public interface SearchService
This encapsulates the execution of search against different indexing mechanisms. Canned queries have been translated into the query string by this stage. Handling of parameterisation is left to the implementation.
Author:
Andy hind

Field Summary
LANGUAGE_CMIS_ALFRESCO
LANGUAGE_CMIS_STRICT
LANGUAGE_FTS_ALFRESCO
LANGUAGE_LUCENE
LANGUAGE_SOLR_ALFRESCO
LANGUAGE_SOLR_CMIS
LANGUAGE_SOLR_FTS_ALFRESCO
LANGUAGE_XPATH
Method Summary
boolean
contains(NodeRef nodeRef, QName propertyQName, String googleLikePattern)
          Search for string pattern in both the node text (if present) and node properties
boolean
contains(NodeRef nodeRef, QName propertyQName, String googleLikePattern, org.alfresco.service.cmr.search.SearchParameters.Operator defaultOperator)
          Search for string pattern in both the node text (if present) and node properties
boolean
like(NodeRef nodeRef, QName propertyQName, String sqlLikePattern, boolean includeFTS)
          Search for string pattern in both the node text (if present) and node properties
query(SearchParameters searchParameters)
          Search using the given SearchParameters
query(StoreRef store, QName queryId, QueryParameter[] queryParameters)
          Execute a canned query
query(StoreRef store, String language, String query)
          Search against a store.
query(StoreRef store, String language, String query, QueryParameterDefinition[] queryParameterDefinitions)
          Search against a store.
selectNodes(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks)
          Select nodes using an xpath expression.
selectNodes(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks, String language)
          Select nodes using an xpath expression.
selectProperties(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks)
          Select properties using an xpath expression
selectProperties(NodeRef contextNodeRef, String xpath, QueryParameterDefinition[] parameters, NamespacePrefixResolver namespacePrefixResolver, boolean followAllParentLinks, String language)
          Select properties using an xpath expression
Field Detail
LANGUAGE_CMIS_ALFRESCO
public static final String LANGUAGE_CMIS_ALFRESCO
See Also:
Constant Field Values

LANGUAGE_CMIS_STRICT
public static final String LANGUAGE_CMIS_STRICT
See Also:
Constant Field Values

LANGUAGE_FTS_ALFRESCO
public static final String LANGUAGE_FTS_ALFRESCO
See Also:
Constant Field Values

LANGUAGE_LUCENE
public static final String LANGUAGE_LUCENE
See Also:
Constant Field Values

LANGUAGE_SOLR_ALFRESCO
public static final String LANGUAGE_SOLR_ALFRESCO
See Also:
Constant Field Values

LANGUAGE_SOLR_CMIS
public static final String LANGUAGE_SOLR_CMIS
See Also:
Constant Field Values

LANGUAGE_SOLR_FTS_ALFRESCO
public static final String LANGUAGE_SOLR_FTS_ALFRESCO
See Also:
Constant Field Values

LANGUAGE_XPATH
public static final String LANGUAGE_XPATH
See Also:
Constant Field Values
Method Detail
query
@Auditable(parameters={
  "store",
  "language",
  "query"
})
ResultSet query(StoreRef store,
                String language,
                String query)
Search against a store. Pulls back all attributes on each node. Does not allow parameterisation.
Parameters:
store - - the store against which to search
language - - the query language
query - - the query string - which may include parameters
Returns:
Returns the query results

query
@Auditable(parameters={
  "store",
  "language",
  "query",
  "queryParameterDefinitions"
})
ResultSet query(StoreRef store,
                String language,
                String query,
                QueryParameterDefinition[] queryParameterDefinitions)
Search against a store.
Parameters:
store - - the store against which to search
language - - the query language
query - - the query string - which may include parameters
queryParameterDefinitions - - query parameter definitions - the default value is used for the value.
Returns:
Returns the query results

query
@Auditable(parameters={
  "store",
  "queryId",
  "queryParameters"
})
ResultSet query(StoreRef store,
                QName queryId,
                QueryParameter[] queryParameters)
Execute a canned query
Parameters:
store - - the store against which to search
queryId - - the query identifier
queryParameters - - parameterisation for the canned query
Returns:
Returns the query results

query
@Auditable(parameters="searchParameters")
ResultSet query(SearchParameters searchParameters)
Search using the given SearchParameters

selectNodes
@Auditable(parameters={
  "contextNodeRef",
  "xpath",
  "parameters",
  "namespacePrefixResolver",
  "followAllParentLinks"
},
           recordable={
  true,
  true,
  true,
  false,
  true
})
List<NodeRefselectNodes(NodeRef contextNodeRef,
                          String xpath,
                          QueryParameterDefinition[] parameters,
                          NamespacePrefixResolver namespacePrefixResolver,
                          boolean followAllParentLinks)
                   throws InvalidNodeRefException,
                          org.alfresco.service.cmr.repository.XPathException
Select nodes using an xpath expression.
Parameters:
contextNodeRef - - the context node for relative expressions etc
xpath - - the xpath string to evaluate
parameters - - parameters to bind in to the xpath expression, may be null for no parameters
namespacePrefixResolver - - prefix to namespace mappings
followAllParentLinks - - if false ".." follows only the primary parent links, if true it follows all
Returns:
a list of the node refs of the selected nodes
Throws:
InvalidNodeRefException
org.alfresco.service.cmr.repository.XPathException

selectNodes
@Auditable(parameters={
  "contextNodeRef",
  "xpath",
  "parameters",
  "namespacePrefixResolver",
  "followAllParentLinks",
  "language"
},
           recordable={
  true,
  true,
  true,
  false,
  true,
  true
})
List<NodeRefselectNodes(NodeRef contextNodeRef,
                          String xpath,
                          QueryParameterDefinition[] parameters,
                          NamespacePrefixResolver namespacePrefixResolver,
                          boolean followAllParentLinks,
                          String language)
                   throws InvalidNodeRefException,
                          org.alfresco.service.cmr.repository.XPathException
Select nodes using an xpath expression.
Parameters:
contextNodeRef - - the context node for relative expressions etc
xpath - - the xpath string to evaluate
parameters - - parameters to bind in to the xpath expression, may be null for no parameters
namespacePrefixResolver - - prefix to namespace mappings
followAllParentLinks - - if false ".." follows only the primary parent links, if true it follows all
language - - the xpath variant
Returns:
a list of all the node refs of the selected nodes
Throws:
InvalidNodeRefException
org.alfresco.service.cmr.repository.XPathException

selectProperties
@Auditable(parameters={
  "contextNodeRef",
  "xpath",
  "parameters",
  "namespacePrefixResolver",
  "followAllParentLinks"
},
           recordable={
  true,
  true,
  true,
  false,
  true
})
List<SerializableselectProperties(NodeRef contextNodeRef,
                                    String xpath,
                                    QueryParameterDefinition[] parameters,
                                    NamespacePrefixResolver namespacePrefixResolver,
                                    boolean followAllParentLinks)
                             throws InvalidNodeRefException,
                                    org.alfresco.service.cmr.repository.XPathException
Select properties using an xpath expression
Parameters:
contextNodeRef - - the context node for relative expressions etc
xpath - - the xpath string to evaluate
parameters - - parameters to bind in to the xpath expression
namespacePrefixResolver - - prefix to namespace mappings
followAllParentLinks - - if false ".." follows only the primary parent links, if true it follows all
Returns:
a list of property values
Throws:
InvalidNodeRefException
org.alfresco.service.cmr.repository.XPathException

selectProperties
@Auditable(parameters={
  "contextNodeRef",
  "xpath",
  "parameters",
  "namespacePrefixResolver",
  "followAllParentLinks",
  "language"
},
           recordable={
  true,
  true,
  true,
  false,
  true,
  true
})
List<SerializableselectProperties(NodeRef contextNodeRef,
                                    String xpath,
                                    QueryParameterDefinition[] parameters,
                                    NamespacePrefixResolver namespacePrefixResolver,
                                    boolean followAllParentLinks,
                                    String language)
                             throws InvalidNodeRefException,
                                    org.alfresco.service.cmr.repository.XPathException
Select properties using an xpath expression
Parameters:
contextNodeRef - - the context node for relative expressions etc
xpath - - the xpath string to evaluate
parameters - - parameters to bind in to the xpath expression
namespacePrefixResolver - - prefix to namespace mappings
followAllParentLinks - - if false ".." follows only the primary parent links, if true it follows all
language - - the xpath variant
Returns:
a list of property values
Throws:
InvalidNodeRefException
org.alfresco.service.cmr.repository.XPathException

contains
@Auditable(parameters={
  "nodeRef",
  "propertyQName",
  "googleLikePattern"
})
boolean contains(NodeRef nodeRef,
                 QName propertyQName,
                 String googleLikePattern)
          throws InvalidNodeRefException
Search for string pattern in both the node text (if present) and node properties
Parameters:
nodeRef - the node to get
propertyQName - the name of the property
googleLikePattern - a Google-like pattern to search for in the property value
Returns:
Returns true if the pattern could be found - uses the default OR operator
Throws:
InvalidNodeRefException

contains
@Auditable(parameters={
  "nodeRef",
  "propertyQName",
  "googleLikePattern",
  "defaultOperator"
})
boolean contains(NodeRef nodeRef,
                 QName propertyQName,
                 String googleLikePattern,
                 org.alfresco.service.cmr.search.SearchParameters.Operator defaultOperator)
          throws InvalidNodeRefException
Search for string pattern in both the node text (if present) and node properties
Parameters:
nodeRef - the node to get
propertyQName - the name of the property
googleLikePattern - a Google-like pattern to search for in the property value
Returns:
Returns true if the pattern could be found
Throws:
InvalidNodeRefException

like
@Auditable(parameters={
  "nodeRef",
  "propertyQName",
  "sqlLikePattern",
  "includeFTS"
})
boolean like(NodeRef nodeRef,
             QName propertyQName,
             String sqlLikePattern,
             boolean includeFTS)
      throws InvalidNodeRefException
Search for string pattern in both the node text (if present) and node properties
Parameters:
nodeRef - the node to get
propertyQName - the name of the property (mandatory)
sqlLikePattern - a SQL-like pattern to search for
includeFTS - - include full text search matches in the like test
Returns:
Returns true if the pattern could be found
Throws:
InvalidNodeRefException

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.