Class ContentExtractor
java.lang.Object
org.ametys.cms.content.ContentExtractor
org.ametys.web.content.ContentExtractor
org.ametys.plugins.newsletter.content.ContentExtractor
- All Implemented Interfaces:
Component
,Serviceable
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 inherited from class org.ametys.web.content.ContentExtractor
WEB_CONTENT_EXTACTOR_ROLE
Fields inherited from class org.ametys.cms.content.ContentExtractor
CMS_CONTENT_EXTACTOR_ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
fillContent
(ModifiableContent content, Node node, XMLValuesExtractorAdditionalDataGetter additionalDataGetter) Fills the given content with the values from the providedNode
.protected void
fillMetadata
(ModifiableContent content, Element contentElement, XMLValuesExtractorAdditionalDataGetter additionalDataGetter) Fills the given newsletter with the metadata from the providedElement
void
service
(ServiceManager manager) Methods inherited from class org.ametys.web.content.ContentExtractor
fillSiteName, fillTags
Methods inherited from class org.ametys.cms.content.ContentExtractor
booleanValue, dateValue, fillAttributes, fillComment, fillContentComments, fillDublinCore, fillReactions, fillReports, setIfNotNull, values
-
Field Details
-
NEWSLETTER_CONTENT_EXTACTOR_ROLE
Avalon role.
-
-
Constructor Details
-
ContentExtractor
public ContentExtractor()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classContentExtractor
- Throws:
ServiceException
-
fillContent
public void fillContent(ModifiableContent content, Node node, XMLValuesExtractorAdditionalDataGetter additionalDataGetter) throws Exception Description copied from class:ContentExtractor
Fills the given content with the values from the providedNode
.
This is the anti-operation ofContentSaxer.saxContent(org.ametys.cms.repository.Content, org.xml.sax.ContentHandler, java.util.Locale, org.ametys.runtime.model.View, java.lang.String, boolean, boolean, boolean, java.lang.String)
, as the org.w3c.dom.Node should be a Node previously generated with SAX events from this method.- Overrides:
fillContent
in classContentExtractor
- Parameters:
content
- The content to fillnode
- The node to read for retrieving values to filladditionalDataGetter
- The object that will retrieve potential additional data for the content's attributes- Throws:
Exception
- if an exception occurs
-
fillMetadata
protected void fillMetadata(ModifiableContent content, Element contentElement, XMLValuesExtractorAdditionalDataGetter additionalDataGetter) throws Exception Fills the given newsletter with the metadata from the providedElement
- Parameters:
content
- The newsletter to fillcontentElement
- the element to read to get the metadataadditionalDataGetter
- The object that will retrieve potential additional data for the content's metadata- Throws:
Exception
- if an error occurs
-