Package org.ametys.cms.content
Class DefaultContentViewProvider
java.lang.Object
org.ametys.cms.content.DefaultContentViewProvider
- All Implemented Interfaces:
ContentViewProvider,Component,Serviceable
- Direct Known Subclasses:
WebContentViewProvider
public class DefaultContentViewProvider
extends Object
implements ContentViewProvider, Component, Serviceable
Default implementation of a
ContentViewProvider-
Field Summary
FieldsFields inherited from interface org.ametys.cms.content.ContentViewProvider
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the view for view resulting of the concatenation of views of the given content.getViewWithFallback(String viewName, String fallbackViewName, String[] contentTypeIds, String[] mixinIds) Get the view for view resulting for a given contentvoidservice(ServiceManager manager) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.cms.content.ContentViewProvider
getView, getViewWithFallback
-
Field Details
-
_contentTypesHelper
The content types helper
-
-
Constructor Details
-
DefaultContentViewProvider
public DefaultContentViewProvider()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
getView
Description copied from interface:ContentViewProviderGet the view for view resulting of the concatenation of views of the given content.- Specified by:
getViewin interfaceContentViewProvider- Parameters:
viewName- the name of the view to retrievecontentTypeIds- the identifiers of the content typesmixinIds- the identifiers of the mixins- Returns:
- The view or null if none matches.
-
getViewWithFallback
public View getViewWithFallback(String viewName, String fallbackViewName, String[] contentTypeIds, String[] mixinIds) Description copied from interface:ContentViewProviderGet the view for view resulting for a given content- Specified by:
getViewWithFallbackin interfaceContentViewProvider- Parameters:
viewName- the name of the view to retrieve. If null or empty, fallback view will be used.fallbackViewName- the name of the view to retrieve if the initial was not found. If null or empty, "main" view view will be used as fallback view.contentTypeIds- the identifiers of the content typesmixinIds- the identifiers of the mixins- Returns:
- The view or null if none matches.
-