Package org.ametys.cms.contenttype
Class DefaultDocbookUpdateHandler
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.ametys.cms.contenttype.DockbookUpdateHandler
org.ametys.cms.contenttype.DefaultDocbookUpdateHandler
- All Implemented Interfaces:
LogEnabled
,Serviceable
,ContentHandler
,LexicalHandler
- Direct Known Subclasses:
WebDocbookUpdateHandler
This handler look for links, images or video url which make reference to a AmetysObject (content, resources, ...) in a RichText.
It must be used after a copy of a Content to changes theses references if necessary.
-
Field Summary
Fields inherited from class org.ametys.cms.contenttype.DockbookUpdateHandler
_contentHandler, _createdContent, _createdObject, _initialAOPath, _initialContent, _initialContentPath, _initialObject, _lexicalHandler
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_copyAttributes
(Attributes attrs, AttributesImpl newAttrs) Copy attributesprotected Attributes
_getAttributesForLink
(Attributes attrs) Get attributes for link elementsprotected Attributes
Get attributes for media objects such as image, flashprotected String
Return the updated ametys object idvoid
service
(ServiceManager smanager) void
startElement
(String uri, String loc, String raw, Attributes attrs) Methods inherited from class org.ametys.cms.contenttype.DockbookUpdateHandler
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setContentHandler, setCreatedContent, setCreatedObject, setDocumentLocator, setInitialContent, setInitialObject, setLexicalHandler, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping
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
-
_resolver
The ametys object resolver
-
-
Constructor Details
-
DefaultDocbookUpdateHandler
public DefaultDocbookUpdateHandler()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
startElement
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDockbookUpdateHandler
- Throws:
SAXException
-
_getAttributesForLink
Get attributes for link elements- Parameters:
attrs
- the attributes- Returns:
- the new attributes
-
_getAttributesForMediaObject
Get attributes for media objects such as image, flash- Parameters:
attrs
- the attributes- Returns:
- the new attributes
-
_copyAttributes
Copy attributes- Parameters:
attrs
- the attributes to copynewAttrs
- the new attributes
-
_getUpdatedAmetysObjectId
Return the updated ametys object id- Parameters:
id
- the id to update- Returns:
- the updated id
-