@Name(value="contentViewActions") @Scope(value=CONVERSATION) public class ContentViewActions extends Object implements Serializable
Constructor and Description |
---|
ContentViewActions() |
Modifier and Type | Method and Description |
---|---|
ContentView |
getContentView(String name) |
ContentView |
getContentView(String name,
DocumentModel searchDocumentModel)
Returns content view with given name, or null if no content view with
this name is found.
|
ContentView |
getContentViewWithProvider(String name) |
ContentView |
getContentViewWithProvider(String name,
DocumentModel searchDocumentModel) |
ContentView |
getContentViewWithProvider(String name,
DocumentModel searchDocumentModel,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage) |
ContentView |
getContentViewWithProvider(String name,
DocumentModel searchDocumentModel,
List<SortInfo> sortInfos,
Long defaultPageSize,
Long pageSize,
Long currentPage) |
ContentView |
getContentViewWithProvider(String name,
DocumentModel searchDocumentModel,
List<SortInfo> sortInfos,
Long pageSize,
Long currentPage,
Object... params) |
ContentView |
getCurrentContentView()
Returns the current global content view.
|
Long |
getCurrentGlobalPageSize()
Returns the global page size, or returns the page size on current
content view if set.
|
Long |
getGlobalPageSize()
Returns the global page size
|
List<SelectItem> |
getPageSizeOptions(ContentView cv)
Returns the list of available options for page size selections, for
given content view.
|
void |
refresh(String contentViewName) |
void |
refreshAll() |
void |
refreshAndRewind(String contentViewName) |
void |
refreshAndRewindAll() |
void |
refreshOnSeamEvent(String seamEventName)
Refreshes all content views that have declared the given seam event name
as a refresh event in their XML configuration.
|
void |
reset(String contentViewName) |
void |
resetAll() |
void |
resetAllContent() |
void |
resetPageProvider(String contentViewName) |
void |
resetPageProviderOnSeamEvent(String seamEventName)
Resets all content views page providers that have declared the given
seam event name as a reset event in their XML configuration.
|
ContentView |
restoreContentView(String contentViewName,
Long currentPage,
Long pageSize,
List<SortInfo> sortInfos,
String jsonContentViewState)
Restore a content view from the given parameters.
|
void |
setCurrentContentView(ContentView cv)
Sets the current global content view.
|
void |
setCurrentGlobalPageSize(Long pageSize)
Sets the global page size, useful to set the value having the
appropriate selection set, see
getCurrentContentView() |
void |
setGlobalPageSize(Long pageSize)
Sets the global page size
|
public ContentView getCurrentContentView()
Current content view is usually the last one displayed on the page, but
this may change depending on calls to
setCurrentContentView(ContentView)
.
public void setCurrentContentView(ContentView cv)
getCurrentGlobalPageSize()
public Long getCurrentGlobalPageSize()
public void setCurrentGlobalPageSize(Long pageSize)
getCurrentContentView()
public Long getGlobalPageSize()
public List<SelectItem> getPageSizeOptions(ContentView cv)
This method relies on a hard-coded set of available values, and adapts it to the current content view page size and max page size information to present more or less items from this list.
public void setGlobalPageSize(Long pageSize)
public ContentView getContentView(String name) throws ClientException
ClientException
public ContentView getContentView(String name, DocumentModel searchDocumentModel) throws ClientException
If parameter searchDocumentModel is not null, it will be set on the content view. If it is null and the content is using a provider that needs it, a new document model is created and attached to it. This document model is resolved from the binding put in the content view XML definition, or from the document type in this definition if no binding is set.
If not null, this content view is set as the current content view so
that subsequent calls to other methods can take information from it,
like getCurrentGlobalPageSize()
The content view is put in a cache map so that it's not rebuilt at each call. It is rebuilt when its cache key changes (if defined).
ClientException
public ContentView getContentViewWithProvider(String name) throws ClientException
ClientException
public ContentView getContentViewWithProvider(String name, DocumentModel searchDocumentModel) throws ClientException
ClientException
public ContentView getContentViewWithProvider(String name, DocumentModel searchDocumentModel, List<SortInfo> sortInfos, Long pageSize, Long currentPage) throws ClientException
ClientException
public ContentView getContentViewWithProvider(String name, DocumentModel searchDocumentModel, List<SortInfo> sortInfos, Long defaultPageSize, Long pageSize, Long currentPage) throws ClientException
ClientException
public ContentView getContentViewWithProvider(String name, DocumentModel searchDocumentModel, List<SortInfo> sortInfos, Long pageSize, Long currentPage, Object... params) throws ClientException
ClientException
public ContentView restoreContentView(String contentViewName, Long currentPage, Long pageSize, List<SortInfo> sortInfos, String jsonContentViewState) throws UnsupportedEncodingException, ClientException
The content view is put in a cache map so that it's not rebuilt at each call. It is rebuilt when its cache key changes (if defined).
UnsupportedEncodingException
ClientException
@BypassInterceptors public void refreshOnSeamEvent(String seamEventName)
@BypassInterceptors public void resetPageProviderOnSeamEvent(String seamEventName)
@BypassInterceptors public void refresh(String contentViewName)
@BypassInterceptors public void refreshAndRewind(String contentViewName)
@BypassInterceptors public void resetPageProvider(String contentViewName)
@BypassInterceptors public void reset(String contentViewName)
@BypassInterceptors public void resetAllContent()
@BypassInterceptors public void resetAll()
@BypassInterceptors public void refreshAll()
@BypassInterceptors public void refreshAndRewindAll()
Copyright © 2013 Nuxeo SA. All Rights Reserved.