Package org.ametys.web.contenttype
Class SkinContentViewHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.contenttype.SkinContentViewHelper
- All Implemented Interfaces:
LogEnabled
,Initializable
,Component
,Contextualizable
,Serviceable
,ThreadSafe
public class SkinContentViewHelper
extends AbstractLogEnabled
implements Component, Serviceable, ThreadSafe, Initializable, Contextualizable
Helper to get content type's views brought by the skin, linked to a model view
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final record
Rendering view of a content brought by a skin -
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) getContentViewFromSkin
(String name, String contentTypeId) Get the HTML content view brought by the current skin for a given content typegetContentViewFromSkin
(String name, String contentTypeId, String format) Get the content view brought by the current skin for a given content typegetContentViewFromSkin
(String name, Content content) Get the HTML content view brought by the current skin for the given contentgetContentViewFromSkin
(String name, Content content, String format) Get the content view brought by the current skin for the given contentgetContentViewsFromSkin
(String contentTypeId) Get the HTML content views brought by the current skin for a given content typegetContentViewsFromSkin
(String contentTypeId, String format) Get all the content views brought by the current skin for a given content typegetContentViewsFromSkin
(String skinName, ContentType contentType) Get the HTML content views brought by a given skin for a given content typegetContentViewsFromSkin
(String skinName, ContentType contentType, String format) Get the content views brought by the a skin for a given content type and output formatgetContentViewsFromSkin
(ContentType contentType) Get the HTML content views brought by the current skin for a given content typevoid
void
service
(ServiceManager smanager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
The avalon role -
REQUEST_PARAM_RENDERING_VIEW_NAME
The name of request parameter for skin content view- See Also:
-
-
Constructor Details
-
SkinContentViewHelper
public SkinContentViewHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
initialize
- Specified by:
initialize
in interfaceInitializable
- Throws:
Exception
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
getContentViewFromSkin
Get the HTML content view brought by the current skin for the given content- Parameters:
name
- the name of the viewcontent
- the content- Returns:
- the skin content view or null if view does not exists in skin
-
getContentViewFromSkin
public SkinContentViewHelper.SkinContentView getContentViewFromSkin(String name, Content content, String format) Get the content view brought by the current skin for the given content- Parameters:
name
- the name of the viewcontent
- the contentformat
- the output format (html, pdf, doc, ...)- Returns:
- the skin content view or null if view does not exists in skin
-
getContentViewFromSkin
public SkinContentViewHelper.SkinContentView getContentViewFromSkin(String name, String contentTypeId) Get the HTML content view brought by the current skin for a given content type- Parameters:
name
- the name of the viewcontentTypeId
- the content type id- Returns:
- the skin content view or null if view does not exists in skin
-
getContentViewFromSkin
public SkinContentViewHelper.SkinContentView getContentViewFromSkin(String name, String contentTypeId, String format) Get the content view brought by the current skin for a given content type- Parameters:
name
- the name of the viewcontentTypeId
- the content type idformat
- the output format (html, pdf, doc, ...)- Returns:
- the skin content view or null if view does not exists in skin
-
getContentViewsFromSkin
Get the HTML content views brought by the current skin for a given content type- Parameters:
contentTypeId
- the content type id- Returns:
- the skin content view
-
getContentViewsFromSkin
public Set<SkinContentViewHelper.SkinContentView> getContentViewsFromSkin(String contentTypeId, String format) Get all the content views brought by the current skin for a given content type- Parameters:
contentTypeId
- the content type idformat
- the output format (html, pdf, doc, ...)- Returns:
- the skin content view
-
getContentViewsFromSkin
Get the HTML content views brought by the current skin for a given content type- Parameters:
contentType
- the content type- Returns:
- the skin content view
-
getContentViewsFromSkin
public Set<SkinContentViewHelper.SkinContentView> getContentViewsFromSkin(String skinName, ContentType contentType) Get the HTML content views brought by a given skin for a given content type- Parameters:
skinName
- the skin namecontentType
- the content type- Returns:
- the skin content view
-
getContentViewsFromSkin
public Set<SkinContentViewHelper.SkinContentView> getContentViewsFromSkin(String skinName, ContentType contentType, String format) Get the content views brought by the a skin for a given content type and output format- Parameters:
skinName
- the skin namecontentType
- the content typeformat
- the output format (html, pdf, doc, ...)- Returns:
- the skin content view
-