ResourceProvider@Deprecated @ConsumerType public interface QueriableResourceProvider extends ResourceProvider
ResourceProvider interface and ResourceProviders
returned through a ResourceProviderFactory.| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
LANGUAGES
Deprecated.
The name of the service registration property containing the supported
languages of the resource provider (value is "provider.query.languages").
|
OWNS_ROOTS, RESOURCE_TYPE_SYNTHETIC, ROOTS, SERVICE_NAME, USE_RESOURCE_ACCESS_SECURITY| Modifier and Type | Method and Description |
|---|---|
java.util.Iterator<Resource> |
findResources(ResourceResolver resolver,
java.lang.String query,
java.lang.String language)
Deprecated.
Searches for resources using the given query formulated in the given
language.
|
java.util.Iterator<ValueMap> |
queryResources(ResourceResolver resolver,
java.lang.String query,
java.lang.String language)
Deprecated.
Queries the storage using the given query formulated in the given
language.
|
getResource, getResource, listChildrenstatic final java.lang.String LANGUAGES
ResourceProviderFactory
this property should be declared on the factory.java.util.Iterator<Resource> findResources(ResourceResolver resolver, java.lang.String query, java.lang.String language)
The semantic meaning of the query and language depend on the actual
implementation and storage used for the resources. For JCR repository
being used as storage, the query and language parameters are used to
create a JCR Query through the QueryManager.
The result returned is then based on the NodeIterator
provided by the query result.
resolver - The resource resolverquery - The query string to use to find the resources.language - The language in which the query is formulated.Iterator of Resource objects matching the
query. If no resources match, null might be
returned instead of an empty iterator.QuerySyntaxException - If the query is not syntactically correct
according to the query language indicator or if the query
language is not supported as specified in LANGUAGES.SlingException - If an error occurs querying
for the resources.java.lang.IllegalStateException - if this resource provider has already been
closed.java.util.Iterator<ValueMap> queryResources(ResourceResolver resolver, java.lang.String query, java.lang.String language)
The semantic meaning of the query and language depend on the actual
implementation and storage used for the resources. For JCR repository
being used as storage, the query and language parameters are used to
create a JCR Query through the QueryManager.
The result returned is then based on the RowIterator
provided by the query result. The map returned for each row is indexed by
the column name and the column value is the JCR Value object
converted into the respective Java object, such as Boolean
for a value of property type Boolean.
resolver - The resource resolverquery - The query string to use to find the resources.language - The language in which the query is formulated.Iterator of Map instances providing
access to the query result. If no resources match, null
might be returned instead of an empty iterator.QuerySyntaxException - If the query is not syntactically correct
according to the query language indicator or if the query
language is not supported as specified in LANGUAGES.SlingException - If an error occurs querying
for the resources.java.lang.IllegalStateException - if this resource provider has already been
closed.Copyright © 2018 The Apache Software Foundation. All rights reserved.