Nuxeo ECM Projects 5.4.3-SNAPSHOT

org.nuxeo.ecm.platform.query.core
Class PageProviderServiceImpl

java.lang.Object
  extended by org.nuxeo.runtime.model.DefaultComponent
      extended by org.nuxeo.ecm.platform.query.core.PageProviderServiceImpl
All Implemented Interfaces:
Serializable, PageProviderService, Adaptable, Component, Extensible

public class PageProviderServiceImpl
extends DefaultComponent
implements PageProviderService

Since:
5.4
Author:
Anahide Tchertchian
See Also:
Serialized Form

Field Summary
static String PROVIDER_EP
           
 
Constructor Summary
PageProviderServiceImpl()
           
 
Method Summary
 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, 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.
 void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
           
 void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
           
 
Methods inherited from class org.nuxeo.runtime.model.DefaultComponent
activate, applicationStarted, deactivate, getAdapter, registerExtension, unregisterExtension
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROVIDER_EP

public static final String PROVIDER_EP
See Also:
Constant Field Values
Constructor Detail

PageProviderServiceImpl

public PageProviderServiceImpl()
Method Detail

getPageProviderDefinition

public PageProviderDefinition getPageProviderDefinition(String name)
Description copied from interface: PageProviderService
Returns 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:
getPageProviderDefinition in interface PageProviderService
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,
                                       List<SortInfo> sortInfos,
                                       Long pageSize,
                                       Long currentPage,
                                       Map<String,Serializable> properties,
                                       Object... parameters)
                                throws ClientException
Description copied from interface: PageProviderService
Returns 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:
getPageProvider in interface PageProviderService
Parameters:
name - the name that will be set on the provider.
desc - the definition used to build the provider instance.
sortInfos - sort information to set on the provider instance.
pageSize - the provider page size.
currentPage - the provider current page index.
properties - the provider properties
parameters - the provider parameters.
Returns:
the page provider instance.
Throws:
ClientException - if the page provider instantiation fails.

getPageProvider

public PageProvider<?> getPageProvider(String name,
                                       List<SortInfo> sortInfos,
                                       Long pageSize,
                                       Long currentPage,
                                       Map<String,Serializable> properties,
                                       Object... parameters)
                                throws ClientException
Description copied from interface: PageProviderService
Returns an instance of page provider with given name.

Specified by:
getPageProvider in interface PageProviderService
Throws:
ClientException
See Also:
PageProviderService.getPageProvider(String, PageProviderDefinition, List, Long, Long, Map, Object...)

registerContribution

public void registerContribution(Object contribution,
                                 String extensionPoint,
                                 ComponentInstance contributor)
                          throws Exception
Overrides:
registerContribution in class DefaultComponent
Throws:
Exception

unregisterContribution

public void unregisterContribution(Object contribution,
                                   String extensionPoint,
                                   ComponentInstance contributor)
                            throws Exception
Overrides:
unregisterContribution in class DefaultComponent
Throws:
Exception

Nuxeo ECM Projects 5.4.3-SNAPSHOT

Copyright © 2011 Nuxeo SAS. All Rights Reserved.