Package org.ametys.plugins.forms
Class FormDocbookUpdateHandler
- java.lang.Object
-
- org.apache.avalon.framework.logger.AbstractLogEnabled
-
- org.ametys.cms.contenttype.DockbookUpdateHandler
-
- org.ametys.plugins.forms.FormDocbookUpdateHandler
-
- All Implemented Interfaces:
LogEnabled
,ContentHandler
,LexicalHandler
public class FormDocbookUpdateHandler extends DockbookUpdateHandler
This handler look for CMS forms 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
Constructors Constructor Description FormDocbookUpdateHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
_copyAttributes(Attributes attrs, AttributesImpl newAttrs)
Copy attributesprotected String
_generateFormId()
Generate a new form idprotected Attributes
_getAttributesForForm(Attributes attrs)
Get attributes for media objects such as image, flashvoid
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
-
-
-
-
Constructor Detail
-
FormDocbookUpdateHandler
public FormDocbookUpdateHandler()
-
-
Method Detail
-
startElement
public void startElement(String uri, String loc, String raw, Attributes attrs) throws SAXException
- Specified by:
startElement
in interfaceContentHandler
- Overrides:
startElement
in classDockbookUpdateHandler
- Throws:
SAXException
-
_getAttributesForForm
protected Attributes _getAttributesForForm(Attributes attrs)
Get attributes for media objects such as image, flash- Parameters:
attrs
- the attributes- Returns:
- the new attributes
-
_copyAttributes
protected void _copyAttributes(Attributes attrs, AttributesImpl newAttrs)
Copy attributes- Parameters:
attrs
- the attributes to copynewAttrs
- the new attributes
-
_generateFormId
protected String _generateFormId()
Generate a new form id- Returns:
- a form id
-
-