public interface SocialResourceProvider extends ResourceProvider, ModifyingResourceProvider, QueriableResourceProvider
Modifier and Type | Field and Description |
---|---|
static String |
SOLRQUERY
Used in factory.
|
LANGUAGES
OWNS_ROOTS, RESOURCE_TYPE_SYNTHETIC, ROOTS, SERVICE_NAME, USE_RESOURCE_ACCESS_SECURITY
Modifier and Type | Method and Description |
---|---|
long |
countChildren(Resource parent)
return count of all children (one level).
|
long |
countChildren(Resource parent,
boolean visibleOnly)
return count of all children or filtered (visible) children (not hidden due to denied/flagged as hidden).
|
long |
countChildren(Resource parent,
String baseType)
return count of all children of specific type (one level).
|
long |
countChildren(Resource parent,
String baseType,
boolean visibleOnly)
return count of all children or filtered (visible) children (not hidden due to denied/flagged as hidden).
|
void |
decrement(Resource resource,
String property)
Subtract one from the specified counter property.
|
SocialResourceSearchResult<Resource> |
find(ResourceResolver resolver,
String component,
String query,
List<SearchSortField> sortFields,
int offset,
int limit,
boolean requiresTotal)
Return a result list of resources given a component and a query.
|
Map<String,Map<String,Integer>> |
findFacetRanges(ResourceResolver resolver,
List<FacetRangeField> facetRanges,
String resourceTypeFilter,
String componentFilter,
int count)
Search Collections findFacets for cloud storage resources.
|
FacetSearchResult |
findFacets(ResourceResolver resolver,
List<String> fieldNames,
List<FacetRangeField> facetRanges,
String resourceTypeFilter,
String componentFilter,
int count)
Search Collections findFacets for cloud storage resources.
|
Map<String,Map<String,Integer>> |
findFacets(ResourceResolver resolver,
List<String> fieldNames,
String resourceTypeFilter,
String componentFilter,
int count)
Search Collections findFacets for cloud storage resources.
|
String |
getASIPath()
Get the ASI path (provider root).
|
String |
getContentType()
Return the content type for pulling.
|
long |
getCount(Resource resource,
String property)
Return the value of the counter.
|
List<String> |
getLanguages()
Return a list of the languages that this provider can use to query resources.
|
ProviderMetaData |
getMetaData()
Gets details about the provider.
|
Iterator<Resource> |
getMLTResults(ResourceResolver resolver,
String query,
String statusFilter,
String resourceTypeFilter,
String componentFilter,
String[] mltFields,
int maxResults,
int minTermFreq,
int minDocFreq)
Deprecated.
Solr and Lucene only use the first mltField when using a stream as the document (our use case) See:
https://issues.apache.org/jira/browse/SOLR-5351?
|
Iterator<Resource> |
getMLTResults(ResourceResolver resolver,
String query,
String statusFilter,
String resourceTypeFilter,
String componentFilter,
String mltField,
int maxResults,
int minTermFreq,
int minDocFreq)
Return a list of related posts, given a query.
|
Map<String,Resource> |
getResources(ResourceResolver resolver,
List<String> resources)
Fetch a group of resources all managed by this resource provider
|
void |
increment(Resource resource,
String property)
Add one to the specified counter property.
|
void |
incrementBy(Resource resource,
Map<String,Long> incrementMap)
Add an arbitrary increment to the specified properties.
|
void |
incrementBy(Resource resource,
String property,
Long increment)
Add an arbitrary increment to the specified counter property.
|
Iterator<Resource> |
listChildren(String path,
ResourceResolver resourceResolver,
int offset,
int size,
List<Map.Entry<String,Boolean>> sortBy)
Get a list of the children of the resource at the path.
|
Iterator<Resource> |
listChildren(String path,
String baseType,
ResourceResolver resourceResolver,
int offset,
int size,
List<Map.Entry<String,Boolean>> sortBy)
Get a list of the children of the resource at the path.
|
void |
setConfig(SocialResourceConfiguration config)
Set the configuration for the provider.
|
commit, create, delete, hasChanges, revert
findResources, queryResources
getResource, getResource, listChildren
static final String SOLRQUERY
Iterator<Resource> listChildren(String path, ResourceResolver resourceResolver, int offset, int size, List<Map.Entry<String,Boolean>> sortBy)
path
- path to parentresourceResolver
- resolver to useoffset
- offset to start atsize
- number to returnsortBy
- order to return children inIterator<Resource> listChildren(String path, String baseType, ResourceResolver resourceResolver, int offset, int size, List<Map.Entry<String,Boolean>> sortBy)
path
- path to parentbaseType
- base type of children to return (SocialUtils.PN_BASETYPE value) can be null/emptyresourceResolver
- resolver to useoffset
- offset to start atsize
- number to returnsortBy
- order to return children inlong countChildren(Resource parent)
parent
- the parent resourcelong countChildren(Resource parent, String baseType)
parent
- the parent resourcebaseType
- The social base type (SocialUtils.PN_BASETYPE value) of children to count (can be null/empty)long countChildren(Resource parent, boolean visibleOnly)
parent
- the parent resourcevisibleOnly
- if true, count only the 'visible' childrenlong countChildren(Resource parent, String baseType, boolean visibleOnly)
parent
- the parent resourcebaseType
- The social base type (SocialUtils.PN_BASETYPE value) of children to count (can be null/empty)visibleOnly
- if true, count only the 'visible' childrenvoid setConfig(SocialResourceConfiguration config)
config
- The configurationString getASIPath()
@Deprecated Iterator<Resource> getMLTResults(ResourceResolver resolver, String query, String statusFilter, String resourceTypeFilter, String componentFilter, String[] mltFields, int maxResults, int minTermFreq, int minDocFreq)
resolver
- The resource resolver.query
- The string to search for.statusFilter
- The filter on the status.resourceTypeFilter
- The resource type to filter on.componentFilter
- The path of the component we want to search on.mltFields
- Resource properties to search on. NOTE: Only first one is usedmaxResults
- The maximum results returned.minTermFreq
- The frequency which terms will be ignored in the source docminDocFreq
- The frequency at which words will be ignored which do not occur in at least this many docs.Iterator<Resource> getMLTResults(ResourceResolver resolver, String query, String statusFilter, String resourceTypeFilter, String componentFilter, String mltField, int maxResults, int minTermFreq, int minDocFreq)
resolver
- The resource resolver.query
- The string to search for.statusFilter
- The filter on the status.resourceTypeFilter
- The resource type to filter on.componentFilter
- The path of the component we want to search on.mltField
- Resource property to search on.maxResults
- The maximum results returned.minTermFreq
- The frequency which terms will be ignored in the source docminDocFreq
- The frequency at which words will be ignored which do not occur in at least this many docs.SocialResourceSearchResult<Resource> find(ResourceResolver resolver, String component, String query, List<SearchSortField> sortFields, int offset, int limit, boolean requiresTotal)
resolver
- The resource resolver.component
- The component for filtering onquery
- The lucene querysortFields
- fields to use in sort and sort directionoffset
- starting offset to return results atlimit
- maximum number of results to returnrequiresTotal
- true iff the total number of matches needs to be returned in the
SocialResourceSearchResultMap<String,Map<String,Integer>> findFacets(ResourceResolver resolver, List<String> fieldNames, String resourceTypeFilter, String componentFilter, int count)
resolver
- ResourceResolver for current search permissionsfieldNames
- Fields for which facet counts wantedresourceTypeFilter
- Resource type filtercomponentFilter
- Component filtercount
- maximum results to returnFacetSearchResult findFacets(ResourceResolver resolver, List<String> fieldNames, List<FacetRangeField> facetRanges, String resourceTypeFilter, String componentFilter, int count)
resolver
- ResourceResolver for current search permissionsfieldNames
- Fields for which facet counts wantedfacetRanges
- Fields for which facet range counts wantedresourceTypeFilter
- Resource type filtercomponentFilter
- Component filtercount
- maximum results to returnMap<String,Map<String,Integer>> findFacetRanges(ResourceResolver resolver, List<FacetRangeField> facetRanges, String resourceTypeFilter, String componentFilter, int count)
resolver
- ResourceResolver for current search permissionsfacetRanges
- Fields for which facet range counts wantedresourceTypeFilter
- Resource type filtercomponentFilter
- Component filtercount
- maximum results to returnList<String> getLanguages()
String getContentType()
void increment(Resource resource, String property) throws PersistenceException
resource
- - the resource to update.property
- - the name of the counter.PersistenceException
- on errorvoid decrement(Resource resource, String property) throws PersistenceException
resource
- - the resource to update.property
- - the name of the counter.PersistenceException
- on errorvoid incrementBy(Resource resource, String property, Long increment) throws PersistenceException
resource
- - the resource to update.property
- - the name of the counter.increment
- - the amount to increase or decrease the counter.PersistenceException
- on errorvoid incrementBy(Resource resource, Map<String,Long> incrementMap) throws PersistenceException
resource
- the resource.incrementMap
- map with properties and their increment/decrement values.PersistenceException
- on errorlong getCount(Resource resource, String property)
resource
- - the resource to query.property
- - the name of the counter.ProviderMetaData getMetaData()
ProviderMetaData
Map<String,Resource> getResources(ResourceResolver resolver, List<String> resources)
resolver
- the resolver to useresources
- the list of resources"Copyright © 2006 - 2015 Adobe Systems Incorporated. All Rights Reserved"