Class PageProviderServiceImpl
- All Implemented Interfaces:
Serializable,PageProviderService,Adaptable,Component,Extensible,TimestampedService
- Since:
- 5.4
- Author:
- Anahide Tchertchian
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringprotected Map<String, PageProviderDefinition> static final Stringprotected Map<String, Class<? extends PageProvider<?>>> Fields inherited from class org.nuxeo.runtime.model.DefaultComponent
lastModified, nameFields inherited from interface org.nuxeo.ecm.platform.query.api.PageProviderService
NAMED_PARAMETERS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThe component notification order forComponent.start(ComponentContext).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, 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, 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, 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, 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, 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, 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<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, List<QuickFilter> quickFilters, Object... parameters) Returns an instance of page provider with given name.Returns a named page provider definition.Returns all the registered page provider names, or an empty set if no page provider is registered.protected PageProvider<?> protected PageProvider<?> newPageProviderInstance(String name, Class<? extends PageProvider<?>> klass) protected PageProvider<?> newPageProviderInstance(String name, PageProviderDefinition desc) voidstart(ComponentContext context) Start the component.voidstop(ComponentContext context) Stop the component.Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, addRuntimeMessage, addRuntimeMessage, deactivate, getAdapter, getDescriptor, getDescriptors, getLastModified, getRegistry, register, registerContribution, registerExtension, setLastModified, setModifiedNow, setName, unregister, unregisterContribution, unregisterExtension
-
Field Details
-
PROVIDER_EP
- See Also:
-
REPLACER_EP
- See Also:
-
providers
-
replacers
-
-
Constructor Details
-
PageProviderServiceImpl
public PageProviderServiceImpl()
-
-
Method Details
-
getPageProviderDefinition
Description copied from interface:PageProviderServiceReturns a named page provider definition.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).
- Specified by:
getPageProviderDefinitionin interfacePageProviderService- Parameters:
name- the page provider name- Returns:
- the page provider definition or null, if no page provider with this name was found.
-
getPageProvider
public 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) Description copied from interface:PageProviderServiceReturns an instance of page provider with given name.- Specified by:
getPageProviderin interfacePageProviderService- See Also:
-
getPageProvider
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) Description copied from interface:PageProviderServiceReturns an instance of page provider with given name and definition.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).
- Specified by:
getPageProviderin interfacePageProviderService- Parameters:
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.- Returns:
- the page provider instance.
-
getPageProvider
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) Description copied from interface:PageProviderServiceReturns an instance of page provider with given name.- Specified by:
getPageProviderin interfacePageProviderService- See Also:
-
getPageProvider
public PageProvider<?> getPageProvider(String name, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String, Serializable> properties, List<String> highlights, List<QuickFilter> quickFilters, Object... parameters) Description copied from interface:PageProviderServiceReturns an instance of page provider with given name.- Specified by:
getPageProviderin interfacePageProviderService- See Also:
-
getPageProvider
public PageProvider<?> getPageProvider(String name, PageProviderDefinition desc, DocumentModel searchDocument, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String, Serializable> properties, Object... parameters) Description copied from interface:PageProviderServiceReturns an instance of page provider with given name and definition.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).
- Specified by:
getPageProviderin interfacePageProviderService- Parameters:
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.- Returns:
- the page provider instance.
-
newPageProviderInstance
-
newCoreQueryPageProviderInstance
-
newPageProviderInstance
protected PageProvider<?> newPageProviderInstance(String name, Class<? extends PageProvider<?>> klass) -
getPageProvider
public PageProvider<?> getPageProvider(String name, DocumentModel searchDocument, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String, Serializable> properties, Object... parameters) Description copied from interface:PageProviderServiceReturns an instance of page provider with given name.- Specified by:
getPageProviderin interfacePageProviderService- See Also:
-
getPageProvider
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) Description copied from interface:PageProviderServiceReturns an instance of page provider with given name.- Specified by:
getPageProviderin interfacePageProviderService- See Also:
-
getPageProvider
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) Description copied from interface:PageProviderServiceReturns an instance of page provider with given name.- Specified by:
getPageProviderin interfacePageProviderService- Parameters:
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.- Returns:
- the page provider instance.
-
getPageProvider
public PageProvider<?> getPageProvider(String name, DocumentModel searchDocument, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String, Serializable> properties, List<QuickFilter> quickFilters, Object... parameters) Description copied from interface:PageProviderServiceReturns an instance of page provider with given name.- Specified by:
getPageProviderin interfacePageProviderService- See Also:
-
getPageProvider
public PageProvider<?> getPageProvider(String name, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Map<String, Serializable> properties, Object... parameters) Description copied from interface:PageProviderServiceReturns an instance of page provider with given name.- Specified by:
getPageProviderin interfacePageProviderService- Parameters:
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.- Returns:
- the page provider instance.
-
getApplicationStartedOrder
public int getApplicationStartedOrder()Description copied from interface:ComponentThe component notification order forComponent.start(ComponentContext).Components are notified in increasing order. Order 1000 is the default order for components that don't care. Order 100 is the repository initialization.
- Specified by:
getApplicationStartedOrderin interfaceComponent- Returns:
- the order, 1000 by default
-
start
Description copied from interface:ComponentStart the component. This method is called after all the components were resolved and activated- Specified by:
startin interfaceComponent- Overrides:
startin classDefaultComponent
-
stop
Description copied from interface:ComponentStop the component.- Specified by:
stopin interfaceComponent- Overrides:
stopin classDefaultComponent
-
getPageProviderDefinitionNames
Description copied from interface:PageProviderServiceReturns all the registered page provider names, or an empty set if no page provider is registered.- Specified by:
getPageProviderDefinitionNamesin interfacePageProviderService
-