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, applicationStarted, deactivate, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, setModifiedNow, unregisterExtensionpublic static final String CONTENT_VIEW_EP
protected ContentViewRegistry contentViewReg
public ContentViewServiceImpl()
public ContentView getContentView(String name)
ContentViewServicegetContentView in interface ContentViewServiceprotected ContentViewHeader getContentViewHeader(ContentViewDescriptor desc)
public ContentViewHeader getContentViewHeader(String name)
ContentViewServicegetContentViewHeader in interface ContentViewServicepublic Set<String> getContentViewNames()
ContentViewServicegetContentViewNames in interface ContentViewServicepublic Set<ContentViewHeader> getContentViewHeaders()
ContentViewServicegetContentViewHeaders in interface ContentViewServicepublic Set<String> getContentViewNames(String flag)
ContentViewServicegetContentViewNames in interface ContentViewServicepublic Set<ContentViewHeader> getContentViewHeaders(String flag)
ContentViewServicegetContentViewHeaders in interface ContentViewServicepublic PageProvider<?> getPageProvider(String name, List<SortInfo> sortInfos, Long pageSize, Long currentPage, DocumentModel searchDocument, Object... parameters)
ContentViewServiceFacesContext 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 ContentViewServicepublic Map<String,Serializable> resolvePageProviderProperties(Map<String,String> stringProps)
protected Serializable resolveProperty(String elExpression)
public <T> T getAdapter(Class<T> adapter)
Adaptablenull
if no such object can be found.getAdapter in interface AdaptablegetAdapter in class DefaultComponentadapter - 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 DefaultComponentprotected void registerPageProvider(ContentViewDescriptor desc)
protected PageProviderDefinition getPageProviderDefWithName(String name, PageProviderDefinition ppDef)
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor)
unregisterContribution in class DefaultComponentprotected void unregisterPageProvider(ContentViewDescriptor desc)
public ContentView restoreContentView(ContentViewState contentViewState)
ContentViewServicerestoreContentView in interface ContentViewServiceContentViewService.saveContentView(ContentView)public void restoreContentViewState(ContentView contentView, ContentViewState contentViewState)
ContentViewServicerestoreContentViewState in interface ContentViewServicepublic ContentViewState saveContentView(ContentView contentView)
ContentViewServiceThis state can be used to restore the content view in another context.
saveContentView in interface ContentViewServiceContentViewService.restoreContentView(ContentViewState)Copyright © 2016 Nuxeo SA. All rights reserved.