|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.nuxeo.ecm.platform.contentview.jsf.ContentViewImpl
public class ContentViewImpl
Default implementation for the content view object.
Provides simple getters for attributes defined in the XMap descriptor,
except cache key which is computed from currrent FacesContext
instance if cache key is an EL expression.
The page provider is initialized calling
ContentViewService.getPageProvider(java.lang.String, java.util.List
.
Constructor Summary | |
---|---|
ContentViewImpl(java.lang.String name,
java.lang.String title,
boolean translateTitle,
java.lang.String iconPath,
java.lang.String selectionList,
java.lang.String pagination,
java.util.List<java.lang.String> actionCategories,
ContentViewLayout searchLayout,
java.util.List<ContentViewLayout> resultLayouts,
java.util.List<java.lang.String> flags,
java.lang.String cacheKey,
java.lang.Integer cacheSize,
java.util.List<java.lang.String> refreshEventNames,
java.util.List<java.lang.String> resetEventNames,
boolean useGlobalPageSize,
java.lang.String[] queryParameters,
java.lang.String searchDocumentModelBinding,
java.lang.String searchDocumentModelType,
java.lang.String resultColumnsBinding,
java.lang.String sortInfosBinding,
java.lang.String pageSizeBinding)
|
Method Summary | |
---|---|
java.util.List<java.lang.String> |
getActionsCategories()
Returns the list of action categories to display buttons available on selection of items. |
java.lang.String |
getCacheKey()
Returns the cache key for this content view provider, resolving from the current FacesContext instance if it's an EL expression. |
java.lang.Integer |
getCacheSize()
Returns the cache size for this content view. |
PageProvider<?> |
getCurrentPageProvider()
Returns the current page provider, or null if methods ContentView.getPageProvider() ,
ContentView.getPageProvider(DocumentModel, List, Long, Long, Object...) or
ContentView.getPageProviderWithParams(Object...) were never called before. |
java.lang.Long |
getCurrentPageSize()
Returns the current page size, as set using ContentView.setCurrentPageSize(Long) , or the page size set on current page
provider if not null. |
ContentViewLayout |
getCurrentResultLayout()
Returns the current result layout, as set using ContentView.setCurrentResultLayout(ContentViewLayout) , or the first of
defined result layouts when not set. |
java.util.List<java.lang.String> |
getFlags()
Returns the list of flags set on this content view, useful to group them, see ContentViewService.getContentViewNames(String) |
java.lang.String |
getIconPath()
Returns the icon relative path for this content view. |
java.lang.String |
getName()
Returns the name of this content view |
PageProvider<?> |
getPageProvider()
Gets page provider according to given parameters |
PageProvider<?> |
getPageProvider(DocumentModel searchDocument,
java.util.List<SortInfo> sortInfos,
java.lang.Long pageSize,
java.lang.Long currentPage,
java.lang.Object... params)
Returns cached page provider if it exists or build a new one if parameters have changed. |
PageProvider<?> |
getPageProviderWithParams(java.lang.Object... params)
Gets page provider according to given parameters |
java.lang.String |
getPagination()
Returns the pagination type to be used in pagination rendering |
java.lang.Object[] |
getQueryParameters()
Returns the query parameters for this content view provider provider, resolving from the current FacesContext instance if they are EL
expressions. |
java.util.List<java.lang.String> |
getRefreshEventNames()
Returns the list of event names that should trigger a refresh of this content view page provider. |
java.util.List<java.lang.String> |
getResetEventNames()
Returns the list of event names that should trigger a reset of this content view page provider. |
java.util.List<java.lang.String> |
getResultLayoutColumns()
Returns the list of selected result layout columns, resolving the bound EL expression set in the content view definition. |
java.util.List<ContentViewLayout> |
getResultLayouts()
Returns the result layouts, used to display results. |
DocumentModel |
getSearchDocumentModel()
Returns the search document model as set on the content view. |
java.lang.String |
getSearchDocumentModelType()
Returns the search document model type as defined in the XML configuration. |
ContentViewLayout |
getSearchLayout()
Returns the search layout, used to filter results. |
java.lang.String |
getSelectionListName()
Returns the selection list name |
java.lang.String |
getTitle()
Returns a title for this content view |
boolean |
getTranslateTitle()
Returns a boolean stating if title has to be translated |
boolean |
getUseGlobalPageSize()
Returns true is this content view can use the global page size set on the application. |
void |
refreshAndRewindPageProvider()
Refreshes the current page provider if not null, see PageProvider.refresh() , and resets the current page to the
first one. |
void |
refreshPageProvider()
Refreshes the current page provider if not null, see PageProvider.refresh() . |
void |
resetPageProvider()
Resets the page provider. |
void |
resetSearchDocumentModel()
Resets the search document model, setting it to null so that it's recomputed when calling ContentView.getSearchDocumentModel() |
void |
setCurrentPageSize(java.lang.Long pageSize)
Sets the current page size. |
void |
setCurrentResultLayout(ContentViewLayout layout)
Sets the current result layout. |
void |
setSearchDocumentModel(DocumentModel searchDocumentModel)
Sets the search document model to be passed on the page provider, and set it also on the current page provider if not null. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ContentViewImpl(java.lang.String name, java.lang.String title, boolean translateTitle, java.lang.String iconPath, java.lang.String selectionList, java.lang.String pagination, java.util.List<java.lang.String> actionCategories, ContentViewLayout searchLayout, java.util.List<ContentViewLayout> resultLayouts, java.util.List<java.lang.String> flags, java.lang.String cacheKey, java.lang.Integer cacheSize, java.util.List<java.lang.String> refreshEventNames, java.util.List<java.lang.String> resetEventNames, boolean useGlobalPageSize, java.lang.String[] queryParameters, java.lang.String searchDocumentModelBinding, java.lang.String searchDocumentModelType, java.lang.String resultColumnsBinding, java.lang.String sortInfosBinding, java.lang.String pageSizeBinding)
Method Detail |
---|
public java.lang.String getName()
ContentView
getName
in interface ContentView
public java.lang.String getTitle()
ContentView
getTitle
in interface ContentView
public boolean getTranslateTitle()
ContentView
getTranslateTitle
in interface ContentView
public java.lang.String getIconPath()
ContentView
getIconPath
in interface ContentView
public java.lang.String getSelectionListName()
ContentView
getSelectionListName
in interface ContentView
public java.lang.String getPagination()
ContentView
getPagination
in interface ContentView
public java.util.List<java.lang.String> getActionsCategories()
ContentView
getActionsCategories
in interface ContentView
public ContentViewLayout getSearchLayout()
ContentView
getSearchLayout
in interface ContentView
public java.util.List<ContentViewLayout> getResultLayouts()
ContentView
getResultLayouts
in interface ContentView
public ContentViewLayout getCurrentResultLayout()
ContentView
ContentView.setCurrentResultLayout(ContentViewLayout)
, or the first of
defined result layouts when not set.
getCurrentResultLayout
in interface ContentView
public void setCurrentResultLayout(ContentViewLayout layout)
ContentView
setCurrentResultLayout
in interface ContentView
public PageProvider<?> getPageProvider(DocumentModel searchDocument, java.util.List<SortInfo> sortInfos, java.lang.Long pageSize, java.lang.Long currentPage, java.lang.Object... params) throws ClientException
The search document, current page and page size are set on the page provider anyway. Sort infos are not set again if page provider was not built again (e.g if parameters did not change) to avoid erasing sort infos already held by it.
getPageProvider
in interface ContentView
searchDocument
- document that will be set on the page provider. If
this document is null, we try to retrieve the content view
document model calling ContentView.getSearchDocumentModel()
. If
it is not null, it is set on the page provider.sortInfos
- if not null, will override default sort info put in the
page provider XML descriptionpageSize
- if not null, will override default page size put in the
page provider XML descriptioncurrentPage
- if not null, will set the current page to given oneparams
- if not null, will set the parameters on provider. If null,
will take parameters as resolved on the content view from the
XML configuration, see ContentView.getQueryParameters()
ClientException
public PageProvider<?> getPageProviderWithParams(java.lang.Object... params) throws ClientException
ContentView
getPageProviderWithParams
in interface ContentView
ClientException
using
null as every argument except params
public PageProvider<?> getPageProvider() throws ClientException
ContentView
getPageProvider
in interface ContentView
ClientException
#getPageProvider(DocumentModel, List, Long, Long, Object...), using
null as every argument
public PageProvider<?> getCurrentPageProvider()
ContentView
ContentView.getPageProvider()
,
ContentView.getPageProvider(DocumentModel, List, Long, Long, Object...)
or
ContentView.getPageProviderWithParams(Object...)
were never called before.
getCurrentPageProvider
in interface ContentView
public void resetPageProvider()
ContentView
A new page provider will be computed next time
ContentView.getPageProviderWithParams(Object...)
is called. Sort
information and query parameters will have to be re-generated.
resetPageProvider
in interface ContentView
public void refreshPageProvider()
ContentView
PageProvider.refresh()
.
Sort information and query parameters and current page are kept.
refreshPageProvider
in interface ContentView
public void refreshAndRewindPageProvider()
ContentView
PageProvider.refresh()
, and resets the current page to the
first one.
Sort information and query parameters are kept.
refreshAndRewindPageProvider
in interface ContentView
public java.lang.String getCacheKey()
ContentView
FacesContext
instance if it's an EL expression.
getCacheKey
in interface ContentView
public java.lang.Integer getCacheSize()
ContentView
getCacheSize
in interface ContentView
public java.lang.Object[] getQueryParameters()
ContentView
FacesContext
instance if they are EL
expressions.
getQueryParameters
in interface ContentView
public java.util.List<java.lang.String> getRefreshEventNames()
ContentView
getRefreshEventNames
in interface ContentView
public java.util.List<java.lang.String> getResetEventNames()
ContentView
getResetEventNames
in interface ContentView
public boolean getUseGlobalPageSize()
ContentView
getUseGlobalPageSize
in interface ContentView
public java.lang.Long getCurrentPageSize()
ContentView
ContentView.setCurrentPageSize(Long)
, or the page size set on current page
provider if not null.
getCurrentPageSize
in interface ContentView
public void setCurrentPageSize(java.lang.Long pageSize)
ContentView
setCurrentPageSize
in interface ContentView
public DocumentModel getSearchDocumentModel()
ContentView
If this document is null and a EL binding has been set on the content view description, the document model will be resolved from this binding, and set as the search document model.
getSearchDocumentModel
in interface ContentView
public void setSearchDocumentModel(DocumentModel searchDocumentModel)
ContentView
setSearchDocumentModel
in interface ContentView
public void resetSearchDocumentModel()
ContentView
ContentView.getSearchDocumentModel()
resetSearchDocumentModel
in interface ContentView
public java.lang.String getSearchDocumentModelType()
ContentView
getSearchDocumentModelType
in interface ContentView
public java.util.List<java.lang.String> getFlags()
ContentView
ContentViewService.getContentViewNames(String)
getFlags
in interface ContentView
public java.util.List<java.lang.String> getResultLayoutColumns()
ContentView
getResultLayoutColumns
in interface ContentView
public java.lang.String toString()
toString
in class java.lang.Object
|
Nuxeo Enterprise Platform 5.4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |