Class AbstractHTMLEditionHandler
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.transformation.htmledition.AbstractHTMLEditionHandler
-
- All Implemented Interfaces:
Contextualizable,LogEnabled,Serviceable,ContentHandler,LexicalHandler
- Direct Known Subclasses:
SemanticAnnotationsEditionHandler,UploadedDataHTMLEditionHandler,UploadedLinksHTMLEditionHandler,WebHTMLEditionHandler
public abstract class AbstractHTMLEditionHandler extends AbstractLogEnabled implements ContentHandler, LexicalHandler, Serviceable, Contextualizable
This abstract class is for component that wants to be in the saving pipeline. As a pipeline you receive events (from the ContentHandler and LexicalHandler interfaces) you may transform it and write it to the given contentHandler (setContentHandler) and given lexicalHandler (setLexicalHandler) You receive the html extracted from a htmleditor and you may operate some changes.
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentHandler_contentHandlerThe content handler where to writeprotected Context_contextThe avalon contextprotected LexicalHandler_lexicalHandlerThe lexical handler where to writeprotected ServiceManager_managerThe avalon service manager
-
Constructor Summary
Constructors Constructor Description AbstractHTMLEditionHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcharacters(char[] ch, int start, int length)voidcomment(char[] ch, int start, int length)voidcontextualize(Context context)voidendCDATA()voidendDocument()voidendDTD()voidendElement(String uri, String localName, String qName)voidendEntity(String name)voidendPrefixMapping(String prefix)voidignorableWhitespace(char[] ch, int start, int length)voidprocessingInstruction(String target, String data)voidservice(ServiceManager manager)voidsetContentHandler(ContentHandler contentHandler)Set the target content handlervoidsetDocumentLocator(Locator locator)voidsetLexicalHandler(LexicalHandler lexicalHandler)Set the target lexical handlervoidskippedEntity(String name)voidstartCDATA()voidstartDocument()voidstartDTD(String name, String publicId, String systemId)voidstartElement(String uri, String localName, String qName, Attributes atts)voidstartEntity(String name)voidstartPrefixMapping(String prefix, String uri)-
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
-
-
-
Field Detail
-
_contentHandler
protected ContentHandler _contentHandler
The content handler where to write
-
_lexicalHandler
protected LexicalHandler _lexicalHandler
The lexical handler where to write
-
_manager
protected ServiceManager _manager
The avalon service manager
-
-
Constructor Detail
-
AbstractHTMLEditionHandler
public AbstractHTMLEditionHandler()
-
-
Method Detail
-
contextualize
public void contextualize(Context context) throws ContextException
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
public void service(ServiceManager manager) throws ServiceException
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
setContentHandler
public void setContentHandler(ContentHandler contentHandler)
Set the target content handler- Parameters:
contentHandler- the target content handler
-
setLexicalHandler
public void setLexicalHandler(LexicalHandler lexicalHandler)
Set the target lexical handler- Parameters:
lexicalHandler- the target lexical handler
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- Specified by:
endDocumentin interfaceContentHandler- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
- Specified by:
startElementin interfaceContentHandler- Throws:
SAXException
-
endElement
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
startEntity
public void startEntity(String name) throws SAXException
- Specified by:
startEntityin interfaceLexicalHandler- Throws:
SAXException
-
endEntity
public void endEntity(String name) throws SAXException
- Specified by:
endEntityin interfaceLexicalHandler- Throws:
SAXException
-
startCDATA
public void startCDATA() throws SAXException
- Specified by:
startCDATAin interfaceLexicalHandler- Throws:
SAXException
-
endCDATA
public void endCDATA() throws SAXException
- Specified by:
endCDATAin interfaceLexicalHandler- Throws:
SAXException
-
startDTD
public void startDTD(String name, String publicId, String systemId) throws SAXException
- Specified by:
startDTDin interfaceLexicalHandler- Throws:
SAXException
-
endDTD
public void endDTD() throws SAXException
- Specified by:
endDTDin interfaceLexicalHandler- Throws:
SAXException
-
comment
public void comment(char[] ch, int start, int length) throws SAXException
- Specified by:
commentin interfaceLexicalHandler- Throws:
SAXException
-
-