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
Modifier and TypeFieldDescriptionprotected ContentHandler
The content handler where to writeprotected Context
The avalon contextprotected LexicalHandler
The lexical handler where to writeprotected ServiceManager
The avalon service manager -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
characters
(char[] ch, int start, int length) void
comment
(char[] ch, int start, int length) void
contextualize
(Context context) void
endCDATA()
void
void
endDTD()
void
endElement
(String uri, String localName, String qName) void
void
endPrefixMapping
(String prefix) void
ignorableWhitespace
(char[] ch, int start, int length) void
processingInstruction
(String target, String data) void
service
(ServiceManager manager) void
setContentHandler
(ContentHandler contentHandler) Set the target content handlervoid
setDocumentLocator
(Locator locator) void
setLexicalHandler
(LexicalHandler lexicalHandler) Set the target lexical handlervoid
skippedEntity
(String name) void
void
void
void
startElement
(String uri, String localName, String qName, Attributes atts) void
startEntity
(String name) void
startPrefixMapping
(String prefix, String uri) Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
service
- Specified by:
service
in 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:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
- Specified by:
endDocument
in interfaceContentHandler
- Throws:
SAXException
-
startElement
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException - Specified by:
startElement
in interfaceContentHandler
- Throws:
SAXException
-
endElement
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
characters
- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
ignorableWhitespace
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
processingInstruction
- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
setDocumentLocator
- Specified by:
setDocumentLocator
in interfaceContentHandler
-
skippedEntity
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
startEntity
- Specified by:
startEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
endEntity
- Specified by:
endEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
startCDATA
- Specified by:
startCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
endCDATA
- Specified by:
endCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
startDTD
- Specified by:
startDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
endDTD
- Specified by:
endDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
comment
- Specified by:
comment
in interfaceLexicalHandler
- Throws:
SAXException
-