public class ContentViewServiceImpl extends DefaultComponent implements ContentViewService
Modifier and Type | Field and Description |
---|---|
static String |
CONTENT_VIEW_EP |
protected ContentViewRegistry |
contentViewReg |
lastModified
Constructor and Description |
---|
ContentViewServiceImpl() |
Modifier and Type | Method and Description |
---|---|
<T> T |
getAdapter(Class<T> adapter)
Returns an object which is an instance of the given class associated with this object.
|
ContentView |
getContentView(String name)
Returns the content view with given name, or null if not found.
|
protected ContentViewHeader |
getContentViewHeader(ContentViewDescriptor desc) |
ContentViewHeader |
getContentViewHeader(String name)
Returns the content view header, or null if not found.
|
Set<ContentViewHeader> |
getContentViewHeaders()
Returns all the registered content view headers, or an empty set if no content view is registered.
|
Set<ContentViewHeader> |
getContentViewHeaders(String flag)
Returns all the registered content view headers with given flag declared on their definition
|
Set<String> |
getContentViewNames()
Returns all the registered content view names, or an empty set if no content view is registered.
|
Set<String> |
getContentViewNames(String flag)
Returns all the registered content view names with given flag declared on their definition
|
PageProvider<?> |
getPageProvider(String name,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
DocumentModel searchDocument,
Object... parameters)
Returns the page provider computed from the content view with given name.
|
protected PageProviderDefinition |
getPageProviderDefWithName(String name,
PageProviderDefinition ppDef) |
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
protected void |
registerPageProvider(ContentViewDescriptor desc) |
Map<String,Serializable> |
resolvePageProviderProperties(Map<String,String> stringProps) |
protected Serializable |
resolveProperty(String elExpression) |
ContentView |
restoreContentView(ContentViewState contentViewState)
Restores a content view given a state.
|
void |
restoreContentViewState(ContentView contentView,
ContentViewState contentViewState)
Restores a content view to a given state.
|
ContentViewState |
saveContentView(ContentView contentView)
Returns the state of this content view.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
protected void |
unregisterPageProvider(ContentViewDescriptor desc) |
activate, deactivate, getLastModified, registerExtension, setLastModified, setModifiedNow, start, stop, unregisterExtension
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
applicationStarted, getApplicationStartedOrder
public static final String CONTENT_VIEW_EP
protected ContentViewRegistry contentViewReg
public ContentViewServiceImpl()
public ContentView getContentView(String name)
ContentViewService
getContentView
in interface ContentViewService
protected ContentViewHeader getContentViewHeader(ContentViewDescriptor desc)
public ContentViewHeader getContentViewHeader(String name)
ContentViewService
getContentViewHeader
in interface ContentViewService
public Set<String> getContentViewNames()
ContentViewService
getContentViewNames
in interface ContentViewService
public Set<ContentViewHeader> getContentViewHeaders()
ContentViewService
getContentViewHeaders
in interface ContentViewService
public Set<String> getContentViewNames(String flag)
ContentViewService
getContentViewNames
in interface ContentViewService
public Set<ContentViewHeader> getContentViewHeaders(String flag)
ContentViewService
getContentViewHeaders
in interface ContentViewService
public PageProvider<?> getPageProvider(String name, List<SortInfo> sortInfos, Long pageSize, Long currentPage, DocumentModel searchDocument, Object... parameters)
ContentViewService
FacesContext
instance if they are EL Expressions.
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 ContentViewService
public Map<String,Serializable> resolvePageProviderProperties(Map<String,String> stringProps)
protected Serializable resolveProperty(String elExpression)
public <T> T getAdapter(Class<T> adapter)
Adaptable
null
if no such object can be found.getAdapter
in interface Adaptable
getAdapter
in class DefaultComponent
adapter
- the adapter class to look upnull
if this object does not have an adapter for
the given classpublic void registerContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
registerContribution
in class DefaultComponent
protected void registerPageProvider(ContentViewDescriptor desc)
protected PageProviderDefinition getPageProviderDefWithName(String name, PageProviderDefinition ppDef)
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution
in class DefaultComponent
protected void unregisterPageProvider(ContentViewDescriptor desc)
public ContentView restoreContentView(ContentViewState contentViewState)
ContentViewService
restoreContentView
in interface ContentViewService
ContentViewService.saveContentView(ContentView)
public void restoreContentViewState(ContentView contentView, ContentViewState contentViewState)
ContentViewService
restoreContentViewState
in interface ContentViewService
public ContentViewState saveContentView(ContentView contentView)
ContentViewService
This state can be used to restore the content view in another context.
saveContentView
in interface ContentViewService
ContentViewService.restoreContentView(ContentViewState)
Copyright © 2018 Nuxeo. All rights reserved.