Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.platform.contentview.jsf
Interface ContentView

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
ContentViewImpl

public interface ContentView
extends java.io.Serializable

A content view is a notion to handle lists of objects rendering, as well as query filters to build the list.

It has a name that will be the resulting page provider name too. It handles a page provider and accepts configuration needed to handle rendering, like the search layout (for filtering options), the result layout (for results rendering), actions (for buttons available when selecting result objects), the selection list name...

It also handles refresh or reset of its provider, depending on its cache key and refresh events configuration.

Since:
5.4
Author:
Anahide Tchertchian

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 getPageProvider(), getPageProvider(DocumentModel, List, Long, Long, Object...) or getPageProviderWithParams(Object...) were never called before.
 java.lang.Long getCurrentPageSize()
          Returns the current page size, as set using setCurrentPageSize(Long), or the page size set on current page provider if not null.
 ContentViewLayout getCurrentResultLayout()
          Returns the current result layout, as set using 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)
          Gets page provider according to given parameters
 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 getSearchDocumentModel()
 void setCurrentPageSize(java.lang.Long pageSize)
          Sets the current page size.
 void setCurrentResultLayout(ContentViewLayout layout)
          Sets the current result layout.
 void setSearchDocumentModel(DocumentModel doc)
          Sets the search document model to be passed on the page provider, and set it also on the current page provider if not null.
 

Method Detail

getName

java.lang.String getName()
Returns the name of this content view


getTitle

java.lang.String getTitle()
Returns a title for this content view


getTranslateTitle

boolean getTranslateTitle()
Returns a boolean stating if title has to be translated


getSelectionListName

java.lang.String getSelectionListName()
Returns the selection list name


getPagination

java.lang.String getPagination()
Returns the pagination type to be used in pagination rendering


getActionsCategories

java.util.List<java.lang.String> getActionsCategories()
Returns the list of action categories to display buttons available on selection of items.


getFlags

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)


getSearchLayout

ContentViewLayout getSearchLayout()
Returns the search layout, used to filter results.


getResultLayouts

java.util.List<ContentViewLayout> getResultLayouts()
Returns the result layouts, used to display results.


getCurrentResultLayout

ContentViewLayout getCurrentResultLayout()
Returns the current result layout, as set using setCurrentResultLayout(ContentViewLayout), or the first of defined result layouts when not set.


setCurrentResultLayout

void setCurrentResultLayout(ContentViewLayout layout)
Sets the current result layout.


getCurrentPageSize

java.lang.Long getCurrentPageSize()
Returns the current page size, as set using setCurrentPageSize(Long), or the page size set on current page provider if not null.


setCurrentPageSize

void setCurrentPageSize(java.lang.Long pageSize)
Sets the current page size.


getResultLayoutColumns

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.


getCacheKey

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.


getCacheSize

java.lang.Integer getCacheSize()
Returns the cache size for this content view.


getIconPath

java.lang.String getIconPath()
Returns the icon relative path for this content view.


getQueryParameters

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.


getRefreshEventNames

java.util.List<java.lang.String> getRefreshEventNames()
Returns the list of event names that should trigger a refresh of this content view page provider.


getResetEventNames

java.util.List<java.lang.String> getResetEventNames()
Returns the list of event names that should trigger a reset of this content view page provider.


getPageProvider

PageProvider<?> getPageProvider(DocumentModel searchDocument,
                                java.util.List<SortInfo> sortInfos,
                                java.lang.Long pageSize,
                                java.lang.Long currentPage,
                                java.lang.Object... params)
                                throws ClientException
Gets page provider according to given parameters

Parameters:
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 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 description
pageSize - if not null, will override default page size put in the page provider XML description
currentPage - if not null, will set the current page to given one
params - 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 getQueryParameters()
Throws:
ClientException

getPageProviderWithParams

PageProvider<?> getPageProviderWithParams(java.lang.Object... params)
                                          throws ClientException
Gets page provider according to given parameters

Throws:
ClientException
See Also:
using null as every argument except params

getPageProvider

PageProvider<?> getPageProvider()
                                throws ClientException
Gets page provider according to given parameters

Throws:
ClientException
See Also:
#getPageProvider(DocumentModel, List, Long, Long, Object...), using null as every argument

getCurrentPageProvider

PageProvider<?> getCurrentPageProvider()
Returns the current page provider, or null if methods getPageProvider(), getPageProvider(DocumentModel, List, Long, Long, Object...) or getPageProviderWithParams(Object...) were never called before.


resetPageProvider

void resetPageProvider()
Resets the page provider.

A new page provider will be computed next time getPageProviderWithParams(Object...) is called. Sort information and query parameters will have to be re-generated.


refreshPageProvider

void refreshPageProvider()
Refreshes the current page provider if not null, see PageProvider.refresh().

Sort information and query parameters and current page are kept.


refreshAndRewindPageProvider

void refreshAndRewindPageProvider()
Refreshes the current page provider if not null, see PageProvider.refresh(), and resets the current page to the first one.

Sort information and query parameters are kept.


getUseGlobalPageSize

boolean getUseGlobalPageSize()
Returns true is this content view can use the global page size set on the application.


getSearchDocumentModel

DocumentModel getSearchDocumentModel()
Returns the search document model as set on the content view.

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.


setSearchDocumentModel

void setSearchDocumentModel(DocumentModel doc)
Sets the search document model to be passed on the page provider, and set it also on the current page provider if not null.


resetSearchDocumentModel

void resetSearchDocumentModel()
Resets the search document model, setting it to null so that it's recomputed when calling getSearchDocumentModel()


getSearchDocumentModelType

java.lang.String getSearchDocumentModelType()
Returns the search document model type as defined in the XML configuration.


Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.