Package org.ametys.web.content
Class ContentSaxer
java.lang.Object
org.ametys.cms.content.ContentSaxer
org.ametys.web.content.ContentSaxer
- All Implemented Interfaces:
Component
,Contextualizable
,Serviceable
- Direct Known Subclasses:
ContentSaxer
Generates SAX events for Content, including tags for
WebContent
.-
Field Summary
Fields inherited from class org.ametys.cms.content.ContentSaxer
CMS_CONTENT_SAXER_ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) getContextualParameters
(Content content) Get the contextual parametersprotected void
saxBody
(Content content, ContentHandler contentHandler, Locale locale, View view, String tagName, boolean saxWorkflowStep, boolean saxWorkflowInfo, boolean saxLanguageInfo, String attributesTagName, boolean isEdition, boolean renderDisableValues) Generates SAX events for the content data.protected void
saxSiteName
(WebContent content, ContentHandler contentHandler) Generates SAX events for the site name.protected void
saxTags
(WebContent content, ContentHandler contentHandler) Generates SAX events for tags.void
service
(ServiceManager manager) Methods inherited from class org.ametys.cms.content.ContentSaxer
addAttributeIfNotNull, getCurrentStep, getEditionRevision, saxAttributes, saxComments, saxContent, saxContent, saxContentComments, saxContentContributorComments, saxContentTypes, saxDublinCoreMetadata, saxIfNotNull, saxIfNotNull, saxIfNotNull, saxLanguage, saxRootTag, saxWorkflowStep
-
Field Details
-
WEB_CONTENT_SAXER_ROLE
Avalon role.
-
-
Constructor Details
-
ContentSaxer
public ContentSaxer()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classContentSaxer
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
saxBody
protected void saxBody(Content content, ContentHandler contentHandler, Locale locale, View view, String tagName, boolean saxWorkflowStep, boolean saxWorkflowInfo, boolean saxLanguageInfo, String attributesTagName, boolean isEdition, boolean renderDisableValues) throws SAXException Description copied from class:ContentSaxer
Generates SAX events for the content data.- Overrides:
saxBody
in classContentSaxer
- Parameters:
content
- theContent
.contentHandler
- the ContentHandler receving SAX events.locale
- theLocale
to use for eg. multilingual attributes.view
- the View or null to select all attributes.tagName
- the surrounding tag name or null to SAX events without root tag.saxWorkflowStep
- if true, also produces SAX events for the current workflow step.saxWorkflowInfo
- if true, also produces SAX events for detailed information about the current workflow step.saxLanguageInfo
- if true, also produces SAX events for detailed information about the content language.attributesTagName
- the name of the tag surrounding attributes. Used for legacy purposes.isEdition
-true
if SAX events are generated in edition mode,false
otherwiserenderDisableValues
-true
to render disabled values,false
otherwise- Throws:
SAXException
- if an error occurs during the SAX events generation.
-
saxSiteName
Generates SAX events for the site name.- Parameters:
content
- theWebContent
.contentHandler
- the ContentHandler receving SAX events.- Throws:
SAXException
- if an error occurs during the SAX events generation.
-
saxTags
Generates SAX events for tags.- Parameters:
content
- theWebContent
.contentHandler
- the ContentHandler receving SAX events.- Throws:
SAXException
- if an error occurs during the SAX events generation.
-
getContextualParameters
Description copied from class:ContentSaxer
Get the contextual parameters- Overrides:
getContextualParameters
in classContentSaxer
- Parameters:
content
- the content being saxed- Returns:
- the contextual parameters
-