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, unregisterExtension
public static final String CONTENT_VIEW_EP
public ContentView getContentView(String name) throws ClientException
ContentViewService
getContentView
in interface ContentViewService
ClientException
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) throws ClientException
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
ClientException
public Map<String,Serializable> resolvePageProviderProperties(Map<String,String> stringProps) throws ClientException
ClientException
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) throws Exception
registerContribution
in class DefaultComponent
Exception
public void unregisterContribution(Object contribution, String extensionPoint, ComponentInstance contributor) throws Exception
unregisterContribution
in class DefaultComponent
Exception
public ContentView restoreContentView(ContentViewState contentViewState) throws ClientException
ContentViewService
The 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 ContentViewService
ClientException
ContentViewService.saveContentView(ContentView)
public ContentViewState saveContentView(ContentView contentView)
ContentViewService
This 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.