public class ContentViewServiceImpl extends DefaultComponent implements ContentViewService
| Modifier and Type | Field and Description |
|---|---|
static String |
CONTENT_VIEW_EP |
| 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.
|
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.
|
void |
registerContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
Map<String,Serializable> |
resolvePageProviderProperties(Map<String,String> stringProps) |
ContentView |
restoreContentView(ContentViewState contentViewState)
Restores a content view given a state.
|
ContentViewState |
saveContentView(ContentView contentView)
Returns the state of this content view.
|
void |
unregisterContribution(Object contribution,
String extensionPoint,
ComponentInstance contributor) |
activate, applicationStarted, deactivate, getApplicationStartedOrder, getLastModified, registerExtension, setLastModified, unregisterExtensionpublic static final String CONTENT_VIEW_EP
public ContentView getContentView(String name) throws ClientException
ContentViewServicegetContentView in interface ContentViewServiceClientExceptionpublic 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) throws ClientException
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 ContentViewServiceClientExceptionpublic Map<String,Serializable> resolvePageProviderProperties(Map<String,String> stringProps) throws ClientException
ClientExceptionpublic <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) throws Exception
registerContribution in class DefaultComponentExceptionpublic void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution in class DefaultComponentExceptionpublic ContentView restoreContentView(ContentViewState contentViewState) throws ClientException
ContentViewServiceThe core session is only useful when restoring a content view defining a page provider mapped to a document. It is used to initialize this document.
restoreContentView in interface ContentViewServiceClientExceptionContentViewService.saveContentView(ContentView)public ContentViewState saveContentView(ContentView contentView)
ContentViewServiceThis state can be used to restore the content view in another context.
saveContentView in interface ContentViewService#restoreContentView(ContentViewState, CoreSession)Copyright © 2013 Nuxeo SA. All Rights Reserved.