Package org.opencms.xml.content
Interface I_CmsXmlContentEditorChangeHandler
- All Known Implementing Classes:
A_CmsXmlContentEditorChangeHandler
,CmsDelayedDefaultChangeHandler
,CmsEditorChangeHandlerFormatterSelection
,CmsEditorChangeHandlerProperty
public interface I_CmsXmlContentEditorChangeHandler
Handles changes during the xml content editor session.
Allows to modify the content after certain content fields have been edited. The modifications will then be transfered to the editor.
For example, if the user sets a value for the field /link the change handler may set the value of another field /linktitle to the title of the linked resource.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the handler configuration.getScope()
Returns the handler scope.handleChange
(CmsObject cms, CmsXmlContent content, Locale locale, Collection<String> changedPaths) Handles the content change.void
setConfiguration
(String configuration) Sets the configuration.void
Sets the scope to observe for changes.
-
Method Details
-
getConfiguration
Returns the handler configuration.- Returns:
- the handler configuration
-
getScope
Returns the handler scope.- Returns:
- the handler scope
-
handleChange
CmsXmlContent handleChange(CmsObject cms, CmsXmlContent content, Locale locale, Collection<String> changedPaths) Handles the content change.- Parameters:
cms
- the cms contextcontent
- the changed contentlocale
- the edited localechangedPaths
- the changed content value paths- Returns:
- the changed content
-
setConfiguration
Sets the configuration.- Parameters:
configuration
- the configuration
-
setScope
Sets the scope to observe for changes.With a scope set to '/link' all changes below the path /link will be observed.
- Parameters:
scope
- the scope
-