Package org.opencms.xml.content
Interface I_CmsXmlContentAugmentation.Context
- Enclosing interface:
I_CmsXmlContentAugmentation
public static interface I_CmsXmlContentAugmentation.Context
Context provided to the content augmentation class.
Used to access the original content, the currently edited locale, the current CmsObject, etc., and to send the new content back to the editor at the end.
-
Method Summary
Modifier and TypeMethodDescriptionvoidHelper method for calling the JSP at the given path.The ADE configuration that's currently being used.Gets the current CMS context.Gets a copy of the currently edited XML content.Gets the currently edited locale of the content.getParameter(String param) booleanvoidvoidsetHtmlMessage(String message) Sets the HTML to display to the user after the augmentation.voidsetNextLocale(Locale locale) Sets the locale to switch to.voidsetResult(CmsXmlContent result) Sends the augmented content back to the content editor.
-
Method Details
-
getParameter
-
callJsp
Helper method for calling the JSP at the given path.The context will be made available as the request attribute 'context' in the called JSP.
This method can not be used reentrantly (i.e. from a JSP which has already been called via callJsp).
- Parameters:
path- the path of the JSP to call- Throws:
Exception- if something goes wrong
-
getADEConfig
The ADE configuration that's currently being used.- Returns:
- the ADE configuration
-
getCmsObject
Gets the current CMS context.- Returns:
- the current CMS context
-
getContent
Gets a copy of the currently edited XML content.Modifying this object by itself does not do anything for the content editor, you have to send either the modified object or another modified copy back to the content editor via setResult().
- Returns:
- a copy of the currently edited XML content
-
getLocale
Gets the currently edited locale of the content.- Returns:
- the currently edited locale of the content
-
isAborted
boolean isAborted() -
progress
-
setHtmlMessage
Sets the HTML to display to the user after the augmentation.- Parameters:
message-
-
setNextLocale
Sets the locale to switch to.If not called, the current locale will be used if possible.
- Parameters:
locale- the locale to switch to
-
setResult
Sends the augmented content back to the content editor.- Parameters:
result- the augmented content
-