Package com.xpn.xwiki.web.sx
Class AbstractSxAction
- java.lang.Object
-
- com.xpn.xwiki.web.XWikiAction
-
- com.xpn.xwiki.web.sx.AbstractSxAction
-
- All Implemented Interfaces:
com.xpn.xwiki.internal.web.LegacyAction
public abstract class AbstractSxAction extends XWikiAction
Abstract Skin Extension action. Contains the logic to generate the response based on a extension source and a type of extension that implementing classes must provide.- Since:
- 1.7M2
- Version:
- $Id: 4ad0f02b9e6c7ab2ce1c870f5d933c3cd30f1bd7 $
-
-
Field Summary
-
Fields inherited from class com.xpn.xwiki.web.XWikiAction
ACTION_PROGRESS, componentDescriptor, container, execution, observation, waitForXWikiInitialization
-
-
Constructor Summary
Constructors Constructor Description AbstractSxAction()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected String
compress(String source, SxCompressor compressor, XWikiContext context)
protected com.xpn.xwiki.internal.debug.DebugConfiguration
getDebugConfiguration()
abstract Extension
getExtensionType()
Get the type of extension, depends on the type of action.protected abstract org.slf4j.Logger
getLogger()
String
render(XWikiContext context)
void
renderExtension(SxSource sxSource, Extension sxType, XWikiContext context)
This method must be called by render(XWikiContext).-
Methods inherited from class com.xpn.xwiki.web.XWikiAction
action, answerJSON, cleanupComponents, csrfTokenCheck, csrfTokenCheck, execute, execute, getContextualAuthorizationManager, getCurrentMixedDocumentReferenceResolver, getCurrentScriptContext, getEntityNameValidationConfiguration, getEntityNameValidationManager, getFormClass, getLocalization, getLocalSerializer, getName, getProgress, getRealPath, getTranslatedDocument, handleRevision, initializeContainerComponent, initializeXWikiContext, initializeXWikiContext, isEntityReferenceNameValid, localizePlainOrKey, readFromTemplate, resolveTemplate, sendGlobalRedirect, sendRedirect, setContentLength, supportRedirections, writeAjaxErrorResponse
-
-
-
-
Method Detail
-
getLogger
protected abstract org.slf4j.Logger getLogger()
- Returns:
- the logging object of the concrete subclass.
-
renderExtension
public void renderExtension(SxSource sxSource, Extension sxType, XWikiContext context) throws XWikiException
This method must be called by render(XWikiContext). Render is in charge of creating the proper source and extension type, and pass it as an argument to this method which will forge the proper response using those.- Parameters:
sxSource
- the source of the extension.sxType
- the type of extensioncontext
- the XWiki context when rendering the skin extension.- Throws:
XWikiException
- when an error occurs when building the response.
-
compress
protected String compress(String source, SxCompressor compressor, XWikiContext context)
-
render
public String render(XWikiContext context) throws XWikiException
- Overrides:
render
in classXWikiAction
- Throws:
XWikiException
-
getDebugConfiguration
protected com.xpn.xwiki.internal.debug.DebugConfiguration getDebugConfiguration()
-
getExtensionType
public abstract Extension getExtensionType()
Get the type of extension, depends on the type of action.- Returns:
- a new object which extends Extension.
-
-