public class PageProviderServiceImpl extends DefaultComponent implements PageProviderService
Modifier and Type | Field and Description |
---|---|
static String |
NAMED_PARAMETERS
Deprecated.
since 6.0, use
PageProviderService.NAMED_PARAMETERS instead. |
static String |
PROVIDER_EP |
protected PageProviderRegistry |
providerReg |
static String |
REPLACER_EP |
protected PageProviderClassReplacerRegistry |
replacersReg |
lastModified
Constructor and Description |
---|
PageProviderServiceImpl() |
Modifier and Type | Method and Description |
---|---|
PageProvider<?> |
getPageProvider(String name,
DocumentModel searchDocument,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
Long currentOffset,
Map<String,Serializable> properties,
List<String> highlights,
List<QuickFilter> quickFilters,
Object... parameters)
Returns an instance of page provider with given name.
|
PageProvider<?> |
getPageProvider(String name,
DocumentModel searchDocument,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
Map<String,Serializable> properties,
List<QuickFilter> quickFilters,
Object... parameters)
Returns an instance of page provider with given name.
|
PageProvider<?> |
getPageProvider(String name,
DocumentModel searchDocument,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
Map<String,Serializable> properties,
List<String> highlights,
List<QuickFilter> quickFilters,
Object... parameters)
Returns an instance of page provider with given name.
|
PageProvider<?> |
getPageProvider(String name,
DocumentModel searchDocument,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
Map<String,Serializable> properties,
Object... parameters)
Returns an instance of page provider with given name.
|
PageProvider<?> |
getPageProvider(String name,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
Map<String,Serializable> properties,
List<String> highlights,
List<QuickFilter> quickFilters,
Object... parameters)
Returns an instance of page provider with given name.
|
PageProvider<?> |
getPageProvider(String name,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
Map<String,Serializable> properties,
Object... parameters)
Returns an instance of page provider with given name.
|
PageProvider<?> |
getPageProvider(String name,
PageProviderDefinition desc,
DocumentModel searchDocument,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
Long currentOffset,
Map<String,Serializable> properties,
List<String> highlights,
List<QuickFilter> quickFilters,
Object... parameters)
Returns an instance of page provider with given name and definition.
|
PageProvider<?> |
getPageProvider(String name,
PageProviderDefinition desc,
DocumentModel searchDocument,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
Map<String,Serializable> properties,
List<QuickFilter> quickFilters,
Object... parameters)
Returns an instance of page provider with given name.
|
PageProvider<?> |
getPageProvider(String name,
PageProviderDefinition desc,
DocumentModel searchDocument,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
Map<String,Serializable> properties,
List<String> highlights,
List<QuickFilter> quickFilters,
Object... parameters)
Returns an instance of page provider with given name.
|
PageProvider<?> |
getPageProvider(String name,
PageProviderDefinition desc,
DocumentModel searchDocument,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
Map<String,Serializable> properties,
Object... parameters)
Returns an instance of page provider with given name and definition.
|
PageProviderDefinition |
getPageProviderDefinition(String name)
Returns a named page provider definition.
|
Set<String> |
getPageProviderDefinitionNames()
Returns all the registered page provider names, or an empty set if no page provider is registered.
|
protected PageProvider<?> |
newCoreQueryPageProviderInstance(String name) |
protected PageProvider<?> |
newPageProviderInstance(String name,
Class<? extends PageProvider<?>> klass) |
protected PageProvider<?> |
newPageProviderInstance(String name,
PageProviderDefinition desc) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
registerPageProviderDefinition(PageProviderDefinition desc) |
void |
start(ComponentContext context)
Start the component.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
void |
unregisterPageProviderDefinition(PageProviderDefinition desc) |
activate, deactivate, getAdapter, getLastModified, registerExtension, setLastModified, setModifiedNow, stop, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
public static final String PROVIDER_EP
public static final String REPLACER_EP
@Deprecated public static final String NAMED_PARAMETERS
PageProviderService.NAMED_PARAMETERS
instead.protected PageProviderRegistry providerReg
protected PageProviderClassReplacerRegistry replacersReg
public PageProviderServiceImpl()
public PageProviderDefinition getPageProviderDefinition(String name)
PageProviderService
Useful to share the definition between the page provider service, and the content view service (as content views can reference a named page provider that is already registered instead of redefining it).
getPageProviderDefinition
in interface PageProviderService
name
- the page provider namepublic PageProvider<?> getPageProvider(String name, PageProviderDefinition desc, DocumentModel searchDocument, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String,Serializable> properties, List<String> highlights, List<QuickFilter> quickFilters, Object... parameters)
PageProviderService
getPageProvider
in interface PageProviderService
PageProviderService.getPageProvider(String, PageProviderDefinition, DocumentModel, List, Long, Long, Map, Object...)
public PageProvider<?> getPageProvider(String name, PageProviderDefinition desc, DocumentModel searchDocument, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Long currentOffset, Map<String,Serializable> properties, List<String> highlights, List<QuickFilter> quickFilters, Object... parameters)
PageProviderService
If not null, parameters sortInfos and pageSize will override information computed in the XML file. If not null, currentPage will override default current page (0).
getPageProvider
in interface PageProviderService
name
- the name that will be set on the provider.desc
- the definition used to build the provider instance.searchDocument
- the search document to be used by the provider.sortInfos
- sort information to set on the provider instance.pageSize
- the provider page size.currentPage
- the provider current page index. Ignored if currentOffset set.currentOffset
- the provider current page offset.properties
- the provider properties.highlights
- list of the fields to be highlighted.quickFilters
- list of the quickFilters to be applied.parameters
- the provider parameters.public PageProvider<?> getPageProvider(String name, PageProviderDefinition desc, DocumentModel searchDocument, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String,Serializable> properties, List<QuickFilter> quickFilters, Object... parameters)
PageProviderService
getPageProvider
in interface PageProviderService
PageProviderService.getPageProvider(String, PageProviderDefinition, DocumentModel, List, Long, Long, Map, Object...)
public PageProvider<?> getPageProvider(String name, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String,Serializable> properties, List<String> highlights, List<QuickFilter> quickFilters, Object... parameters)
PageProviderService
getPageProvider
in interface PageProviderService
PageProviderService.getPageProvider(String, List, Long, Long, Map, Object...)
public PageProvider<?> getPageProvider(String name, PageProviderDefinition desc, DocumentModel searchDocument, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String,Serializable> properties, Object... parameters)
PageProviderService
Useful to share the definition between the page provider service, and the content view service (as content views can reference a named page provider that is already registered instead of redefining it).
If not null, parameters sortInfos and pageSize will override information computed in the XML file. If not null, currentPage will override default current page (0).
getPageProvider
in interface PageProviderService
name
- the name that will be set on the provider.desc
- the definition used to build the provider instance.searchDocument
- the search document to be used by the provider.sortInfos
- sort information to set on the provider instance.pageSize
- the provider page size.currentPage
- the provider current page index.properties
- the provider propertiesparameters
- the provider parameters.protected PageProvider<?> newPageProviderInstance(String name, PageProviderDefinition desc)
protected PageProvider<?> newCoreQueryPageProviderInstance(String name)
protected PageProvider<?> newPageProviderInstance(String name, Class<? extends PageProvider<?>> klass)
public PageProvider<?> getPageProvider(String name, DocumentModel searchDocument, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String,Serializable> properties, Object... parameters)
PageProviderService
getPageProvider
in interface PageProviderService
PageProviderService.getPageProvider(String, PageProviderDefinition, DocumentModel, List, Long, Long, Map, Object...)
public PageProvider<?> getPageProvider(String name, DocumentModel searchDocument, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String,Serializable> properties, List<String> highlights, List<QuickFilter> quickFilters, Object... parameters)
PageProviderService
getPageProvider
in interface PageProviderService
PageProviderService.getPageProvider(String, DocumentModel, List, Long, Long, Map, Object...)
public PageProvider<?> getPageProvider(String name, DocumentModel searchDocument, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Long currentOffset, Map<String,Serializable> properties, List<String> highlights, List<QuickFilter> quickFilters, Object... parameters)
PageProviderService
getPageProvider
in interface PageProviderService
name
- the name that will be set on the provider.searchDocument
- the search document to be used by the provider.sortInfos
- sort information to set on the provider instance.pageSize
- the provider page size.currentPage
- the provider current page index. Ignored if currentOffset set.currentOffset
- the provider current offset.properties
- the provider properties.highlights
- list of the fields to be highlighted.quickFilters
- list of the quickFilters to be applied.parameters
- the provider parameters.public PageProvider<?> getPageProvider(String name, DocumentModel searchDocument, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String,Serializable> properties, List<QuickFilter> quickFilters, Object... parameters)
PageProviderService
getPageProvider
in interface PageProviderService
PageProviderService.getPageProvider(String, DocumentModel, List, Long, Long, Map, Object...)
public PageProvider<?> getPageProvider(String name, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String,Serializable> properties, Object... parameters)
PageProviderService
getPageProvider
in interface PageProviderService
name
- the page provider namesortInfos
- sort information to set on the provider instance.pageSize
- the provider page size.currentPage
- the provider current page index.properties
- the provider propertiesparameters
- the provider parameters.public void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
public void start(ComponentContext context)
Component
start
in interface Component
start
in class DefaultComponent
public void registerPageProviderDefinition(PageProviderDefinition desc)
registerPageProviderDefinition
in interface PageProviderService
public void unregisterPageProviderDefinition(PageProviderDefinition desc)
unregisterPageProviderDefinition
in interface PageProviderService
public Set<String> getPageProviderDefinitionNames()
PageProviderService
getPageProviderDefinitionNames
in interface PageProviderService
Copyright © 2018 Nuxeo. All rights reserved.