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
public class ContentExtractor extends ContentExtractor
Component responsible to extract aWebContentfrom an XML document, including tags.
-
-
Field Summary
Fields Modifier and Type Field Description static StringWEB_CONTENT_EXTACTOR_ROLEAvalon role.-
Fields inherited from class org.ametys.cms.content.ContentExtractor
CMS_CONTENT_EXTACTOR_ROLE
-
-
Constructor Summary
Constructors Constructor Description ContentExtractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfillContent(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 providedNode-
Methods inherited from class org.ametys.cms.content.ContentExtractor
booleanValue, dateValue, fillAttributes, fillComment, fillContentComments, fillDublinCore, fillReactions, fillReports, service, setIfNotNull, values
-
-
-
-
Field Detail
-
WEB_CONTENT_EXTACTOR_ROLE
public static final String WEB_CONTENT_EXTACTOR_ROLE
Avalon role.
-
-
Constructor Detail
-
ContentExtractor
public ContentExtractor()
-
-
Method Detail
-
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
-
-