Package org.ametys.web.content
Class ContentHelper
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.cms.content.ContentHelper
org.ametys.web.content.ContentHelper
- All Implemented Interfaces:
LogEnabled
,Initializable
,Component
,Contextualizable
,Serviceable
Helper for
Content
-
Field Summary
Fields inherited from class org.ametys.cms.content.ContentHelper
_baseURL, ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetContentBOUrl
(String contentId, Map<String, Object> contextualParameters) Get the content URL in back officegetContentViewUrlParameters
(Content content, String viewName, String format, Map<String, String> additionalParams) Get the needed url parameters for a content viewvoid
service
(ServiceManager smanager) Methods inherited from class org.ametys.cms.content.ContentHelper
addContentType, addMixinType, contextualize, getContentAttributeDefinitionsAsJSON, getContentAttributeDefinitionsAsJSON, getContentEditionInformation, getContentHtmlViewUrl, getContentHtmlViewUrl, getContentTypes, getContentTypes, getContentViewAsJSON, getContentViewUrl, getContentViewUrl, getContentViewUrlParameters, getDefaultWorkflowName, getReferencingContents, getTargetContent, getTargetContents, getTitle, getTitleVariants, getUnknownContentTypeIds, getUnknownContentTypeIds, getValue, hasIndexingReferences, hasReferencingContents, initialize, isArchivedContent, isMultilingual, isReferenceTable, isSimple, removeContentType, removeMixinType, validateContent
Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Constructor Details
-
ContentHelper
public ContentHelper()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classContentHelper
- Throws:
ServiceException
-
getContentViewUrlParameters
public Map<String,String> getContentViewUrlParameters(Content content, String viewName, String format, Map<String, String> additionalParams) Description copied from class:ContentHelper
Get the needed url parameters for a content view- Overrides:
getContentViewUrlParameters
in classContentHelper
- Parameters:
content
- the contentviewName
- the view nameformat
- the output format (html, xml, doc, pdf, ...)additionalParams
- the additional parameters. Can be empty- Returns:
- the uri parameters
-
getContentBOUrl
Description copied from class:ContentHelper
Get the content URL in back office- Overrides:
getContentBOUrl
in classContentHelper
- Parameters:
contentId
- the content idcontextualParameters
- the contextual parameters- Returns:
- the content URL
-