Package org.ametys.web.content
Class ContentExtractor
java.lang.Object
org.ametys.cms.content.ContentExtractor
org.ametys.web.content.ContentExtractor
- All Implemented Interfaces:
Component,Serviceable
- Direct Known Subclasses:
ContentExtractor
Component responsible to extract a
WebContent from an XML document, including tags.-
Field Summary
FieldsFields inherited from class org.ametys.cms.content.ContentExtractor
CMS_CONTENT_EXTACTOR_ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfillContent(ModifiableContent content, Node contentNode, XMLValuesExtractorAdditionalDataGetter additionalDataGetter) Fills the given content with the values from the providedNode.protected voidfillSiteName(ModifiableWebContent content, Node contentNode) Fills the given content with the site name from the providedNodeprotected voidfillTags(TaggableAmetysObject taggable, Node contentNode) Fills the givenTaggableAmetysObjectwith the tags from the providedNodeMethods inherited from class org.ametys.cms.content.ContentExtractor
booleanValue, dateValue, fillAttributes, fillComment, fillContentComments, fillDublinCore, fillReactions, fillReports, service, setIfNotNull, values
-
Field Details
-
WEB_CONTENT_EXTACTOR_ROLE
Avalon role.
-
-
Constructor Details
-
ContentExtractor
public ContentExtractor()
-
-
Method Details
-
fillContent
public void fillContent(ModifiableContent content, Node contentNode, XMLValuesExtractorAdditionalDataGetter additionalDataGetter) throws Exception Description copied from class:ContentExtractorFills 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:
fillContentin classContentExtractor- Parameters:
content- The content to fillcontentNode- 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
-
fillSiteName
protected void fillSiteName(ModifiableWebContent content, Node contentNode) throws TransformerException Fills the given content with the site name from the providedNode- Parameters:
content- The content to fillcontentNode- the node to read to get the site name- Throws:
TransformerException- if an error occurs
-
fillTags
protected void fillTags(TaggableAmetysObject taggable, Node contentNode) throws TransformerException Fills the givenTaggableAmetysObjectwith the tags from the providedNode- Parameters:
taggable- TheTaggableAmetysObjectto fillcontentNode- the node to read to get the tags- Throws:
TransformerException- if an error occurs
-