Class ContentSaxer
- java.lang.Object
-
- org.ametys.cms.content.ContentSaxer
-
- org.ametys.web.content.ContentSaxer
-
- org.ametys.plugins.newsletter.content.ContentSaxer
-
- All Implemented Interfaces:
Component
,Serviceable
public class ContentSaxer extends ContentSaxer
Generates SAX events for Content, including category, automatic and sent for Newsletters. TODO NEWATTRIBUTEAPI_CONTENT: do not use type implementation but the ModelAwareDataHolder#getInternalValue when this API exist
-
-
Field Summary
Fields Modifier and Type Field Description private static String
__AUTOMATIC_METADATA_NAME
private static String
__AUTOMATIC_TAG_NAME
private static String
__CATEGORY_METADATA_NAME
private static String
__CATEGORY_TAG_NAME
private static String
__SENT_METADATA_NAME
private static String
__SENT_TAG_NAME
private ContentAttributeTypeExtensionPoint
_contentAttributeTypeExtensionPoint
static String
NEWSLETTER_CONTENT_SAXER_ROLE
Avalon role.-
Fields inherited from class org.ametys.web.content.ContentSaxer
WEB_CONTENT_SAXER_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 void
saxAutomatic(Content content, ContentHandler contentHandler)
Generates SAX events for the newsletter's automatic status.protected void
saxBody(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 void
saxCategory(Content content, ContentHandler contentHandler)
Generates SAX events for the newsletter's category.protected void
saxSent(Content content, ContentHandler contentHandler)
Generates SAX events for the newsletter's sent status.void
service(ServiceManager manager)
-
Methods inherited from class org.ametys.web.content.ContentSaxer
saxSiteName, saxTags
-
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
-
NEWSLETTER_CONTENT_SAXER_ROLE
public static final String NEWSLETTER_CONTENT_SAXER_ROLE
Avalon role.
-
__CATEGORY_METADATA_NAME
private static final String __CATEGORY_METADATA_NAME
- See Also:
- Constant Field Values
-
__CATEGORY_TAG_NAME
private static final String __CATEGORY_TAG_NAME
- See Also:
- Constant Field Values
-
__AUTOMATIC_METADATA_NAME
private static final String __AUTOMATIC_METADATA_NAME
- See Also:
- Constant Field Values
-
__AUTOMATIC_TAG_NAME
private static final String __AUTOMATIC_TAG_NAME
- See Also:
- Constant Field Values
-
__SENT_METADATA_NAME
private static final String __SENT_METADATA_NAME
- See Also:
- Constant Field Values
-
__SENT_TAG_NAME
private static final String __SENT_TAG_NAME
- See Also:
- Constant Field Values
-
_contentAttributeTypeExtensionPoint
private ContentAttributeTypeExtensionPoint _contentAttributeTypeExtensionPoint
-
-
Constructor Detail
-
ContentSaxer
public ContentSaxer()
-
-
Method Detail
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in 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: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
otherwise- Throws:
SAXException
- if an error occurs during the SAX events generation.
-
saxCategory
protected void saxCategory(Content content, ContentHandler contentHandler) throws SAXException
Generates SAX events for the newsletter's category.- Parameters:
content
- the newslettercontentHandler
- the ContentHandler receiving SAX events.- Throws:
SAXException
- if an error occurs during the SAX events generation.
-
saxAutomatic
protected void saxAutomatic(Content content, ContentHandler contentHandler) throws SAXException
Generates SAX events for the newsletter's automatic status.- Parameters:
content
- the newslettercontentHandler
- the ContentHandler receiving SAX events.- Throws:
SAXException
- if an error occurs during the SAX events generation.
-
saxSent
protected void saxSent(Content content, ContentHandler contentHandler) throws SAXException
Generates SAX events for the newsletter's sent status.- Parameters:
content
- the newslettercontentHandler
- the ContentHandler receiving SAX events.- Throws:
SAXException
- if an error occurs during the SAX events generation.
-
-