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:
DocbookLocalMediaObjectEditionHandler,HTMLLocalMediaObjectEditionHandler,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
FieldsModifier and TypeFieldDescriptionprotected ContentHandlerThe content handler where to writeprotected ContextThe avalon contextprotected LexicalHandlerThe lexical handler where to writeprotected ServiceManagerThe avalon service manager -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcharacters(char[] ch, int start, int length) voidcomment(char[] ch, int start, int length) voidcontextualize(Context context) voidendCDATA()voidvoidendDTD()voidendElement(String uri, String localName, String qName) voidvoidendPrefixMapping(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) voidvoidvoidvoidstartElement(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, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.xml.sax.ContentHandler
declaration
-
Field Details
-
_contentHandler
The content handler where to write -
_lexicalHandler
The lexical handler where to write -
_manager
The avalon service manager -
_context
The avalon context
-
-
Constructor Details
-
AbstractHTMLEditionHandler
public AbstractHTMLEditionHandler()
-
-
Method Details
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
setContentHandler
Set the target content handler- Parameters:
contentHandler- the target content handler
-
setLexicalHandler
Set the target lexical handler- Parameters:
lexicalHandler- the target lexical handler
-
startDocument
- Specified by:
startDocumentin interfaceContentHandler- Throws:
SAXException
-
endDocument
- 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
- Specified by:
endElementin interfaceContentHandler- Throws:
SAXException
-
characters
- Specified by:
charactersin interfaceContentHandler- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespacein interfaceContentHandler- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstructionin interfaceContentHandler- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocatorin interfaceContentHandler
-
skippedEntity
- Specified by:
skippedEntityin interfaceContentHandler- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMappingin interfaceContentHandler- Throws:
SAXException
-
startEntity
- Specified by:
startEntityin interfaceLexicalHandler- Throws:
SAXException
-
endEntity
- Specified by:
endEntityin interfaceLexicalHandler- Throws:
SAXException
-
startCDATA
- Specified by:
startCDATAin interfaceLexicalHandler- Throws:
SAXException
-
endCDATA
- Specified by:
endCDATAin interfaceLexicalHandler- Throws:
SAXException
-
startDTD
- Specified by:
startDTDin interfaceLexicalHandler- Throws:
SAXException
-
endDTD
- Specified by:
endDTDin interfaceLexicalHandler- Throws:
SAXException
-
comment
- Specified by:
commentin interfaceLexicalHandler- Throws:
SAXException
-