Package org.ametys.web.content
Class ContentSaxer
- java.lang.Object
-
- org.ametys.cms.content.ContentSaxer
-
- org.ametys.web.content.ContentSaxer
-
- All Implemented Interfaces:
Component,Serviceable
- Direct Known Subclasses:
ContentSaxer
public class ContentSaxer extends ContentSaxer
Generates SAX events for Content, including tags forWebContent.
-
-
Field Summary
Fields Modifier and Type Field Description static StringWEB_CONTENT_SAXER_ROLEAvalon role.-
Fields inherited from class org.ametys.cms.content.ContentSaxer
CMS_CONTENT_SAXER_ROLE
-
-
Constructor Summary
Constructors Constructor Description ContentSaxer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidsaxBody(Content content, ContentHandler contentHandler, Locale locale, View view, String tagName, boolean saxWorkflowStep, boolean saxWorkflowInfo, boolean saxLanguageInfo, String attributesTagName, boolean isEdition)Generates SAX events for the content data.protected voidsaxSiteName(WebContent content, ContentHandler contentHandler)Generates SAX events for the site name.protected voidsaxTags(WebContent content, ContentHandler contentHandler)Generates SAX events for tags.voidservice(ServiceManager manager)-
Methods inherited from class org.ametys.cms.content.ContentSaxer
addAttributeIfNotNull, getCurrentStep, saxAttributes, saxContent, saxContent, saxContentComments, saxContentTypes, saxDublinCoreMetadata, saxIfNotNull, saxIfNotNull, saxIfNotNull, saxLanguage, saxRootTag, saxWorkflowStep
-
-
-
-
Field Detail
-
WEB_CONTENT_SAXER_ROLE
public static final String WEB_CONTENT_SAXER_ROLE
Avalon role.
-
-
Constructor Detail
-
ContentSaxer
public ContentSaxer()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classContentSaxer- Throws:
ServiceException
-
saxBody
protected void saxBody(Content content, ContentHandler contentHandler, Locale locale, View view, String tagName, boolean saxWorkflowStep, boolean saxWorkflowInfo, boolean saxLanguageInfo, String attributesTagName, boolean isEdition) throws SAXException
Description copied from class:ContentSaxerGenerates SAX events for the content data.- Overrides:
saxBodyin classContentSaxer- Parameters:
content- theContent.contentHandler- the ContentHandler receving SAX events.locale- theLocaleto 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-trueif SAX events are generated in edition mode,falseotherwise- Throws:
SAXException- if an error occurs during the SAX events generation.
-
saxSiteName
protected void saxSiteName(WebContent content, ContentHandler contentHandler) throws SAXException
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
protected void saxTags(WebContent content, ContentHandler contentHandler) throws SAXException
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.
-
-