Package org.ametys.cms.contenttype
Class HTMLUpdateHandler
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.contenttype.HTMLUpdateHandler
-
- All Implemented Interfaces:
LogEnabled
,ContentHandler
,LexicalHandler
public class HTMLUpdateHandler extends AbstractLogEnabled implements ContentHandler, LexicalHandler
This class represent a handler from HTML RichText
-
-
Field Summary
Fields Modifier and Type Field Description protected ContentHandler
_contentHandler
The content handler where to writeprotected Content
_createdContent
The created content after copyprotected TraversableAmetysObject
_createdObject
The created object which implied the content copyprotected String
_initialAOPath
The path of the initial objectprotected Content
_initialContent
The original contentprotected String
_initialContentPath
The path of the original contentprotected TraversableAmetysObject
_initialObject
The initial object which implied the content copyprotected LexicalHandler
_lexicalHandler
The lexical handler
-
Constructor Summary
Constructors Constructor Description HTMLUpdateHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
characters(char[] ch, int start, int length)
void
comment(char[] ch, int start, int length)
void
endCDATA()
void
endDocument()
void
endDTD()
void
endElement(String uri, String localName, String qName)
void
endEntity(String name)
void
endPrefixMapping(String prefix)
void
ignorableWhitespace(char[] ch, int start, int length)
void
processingInstruction(String target, String data)
void
setContentHandler(ContentHandler contentHandler)
Set the target content handlervoid
setCreatedContent(Content createdContent)
Set the created contentvoid
setCreatedObject(TraversableAmetysObject createdObject)
Set created object after copyvoid
setDocumentLocator(Locator locator)
void
setInitialContent(Content initialContent)
Set the initial content copiedvoid
setInitialObject(TraversableAmetysObject initialObject)
Set the initial object responsible for copyvoid
setLexicalHandler(LexicalHandler lexicalHandler)
Set the target lexical handlervoid
skippedEntity(String name)
void
startCDATA()
void
startDocument()
void
startDTD(String name, String publicId, String systemId)
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
-
-
-
-
Field Detail
-
_lexicalHandler
protected LexicalHandler _lexicalHandler
The lexical handler
-
_contentHandler
protected ContentHandler _contentHandler
The content handler where to write
-
_initialContent
protected Content _initialContent
The original content
-
_createdContent
protected Content _createdContent
The created content after copy
-
_initialContentPath
protected String _initialContentPath
The path of the original content
-
_initialObject
protected TraversableAmetysObject _initialObject
The initial object which implied the content copy
-
_createdObject
protected TraversableAmetysObject _createdObject
The created object which implied the content copy
-
_initialAOPath
protected String _initialAOPath
The path of the initial object
-
-
Constructor Detail
-
HTMLUpdateHandler
public HTMLUpdateHandler()
-
-
Method Detail
-
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
-
setInitialContent
public void setInitialContent(Content initialContent)
Set the initial content copied- Parameters:
initialContent
- the initial content
-
setCreatedContent
public void setCreatedContent(Content createdContent)
Set the created content- Parameters:
createdContent
- the created content after copy
-
setInitialObject
public void setInitialObject(TraversableAmetysObject initialObject)
Set the initial object responsible for copy- Parameters:
initialObject
- the initial object responsible for copy
-
setCreatedObject
public void setCreatedObject(TraversableAmetysObject createdObject)
Set created object after copy- Parameters:
createdObject
- the created object after copy
-
startDocument
public void startDocument() throws SAXException
- Specified by:
startDocument
in interfaceContentHandler
- Throws:
SAXException
-
endDocument
public void endDocument() throws SAXException
- 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
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
endElement
in interfaceContentHandler
- Throws:
SAXException
-
characters
public void characters(char[] ch, int start, int length) throws SAXException
- Specified by:
characters
in interfaceContentHandler
- Throws:
SAXException
-
ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException
- Specified by:
ignorableWhitespace
in interfaceContentHandler
- Throws:
SAXException
-
processingInstruction
public void processingInstruction(String target, String data) throws SAXException
- Specified by:
processingInstruction
in interfaceContentHandler
- Throws:
SAXException
-
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interfaceContentHandler
-
skippedEntity
public void skippedEntity(String name) throws SAXException
- Specified by:
skippedEntity
in interfaceContentHandler
- Throws:
SAXException
-
startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException
- Specified by:
startPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException
- Specified by:
endPrefixMapping
in interfaceContentHandler
- Throws:
SAXException
-
startEntity
public void startEntity(String name) throws SAXException
- Specified by:
startEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
endEntity
public void endEntity(String name) throws SAXException
- Specified by:
endEntity
in interfaceLexicalHandler
- Throws:
SAXException
-
startCDATA
public void startCDATA() throws SAXException
- Specified by:
startCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
endCDATA
public void endCDATA() throws SAXException
- Specified by:
endCDATA
in interfaceLexicalHandler
- Throws:
SAXException
-
startDTD
public void startDTD(String name, String publicId, String systemId) throws SAXException
- Specified by:
startDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
endDTD
public void endDTD() throws SAXException
- Specified by:
endDTD
in interfaceLexicalHandler
- Throws:
SAXException
-
comment
public void comment(char[] ch, int start, int length) throws SAXException
- Specified by:
comment
in interfaceLexicalHandler
- Throws:
SAXException
-
-