com.xpn.xwiki.web.sx
Class AbstractSxAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by com.xpn.xwiki.web.XWikiAction
          extended by com.xpn.xwiki.web.sx.AbstractSxAction
Direct Known Subclasses:
JsxAction, SsxAction

public abstract class AbstractSxAction
extends com.xpn.xwiki.web.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$

Field Summary
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
AbstractSxAction()
           
 
Method Summary
abstract  Extension getExtensionType()
          Get the type of extension, depends on the type of action.
protected abstract  org.slf4j.Logger getLogger()
           
 String render(com.xpn.xwiki.XWikiContext context)
           
 void renderExtension(SxSource sxSource, Extension sxType, com.xpn.xwiki.XWikiContext context)
          This method must be called by render(XWikiContext).
 
Methods inherited from class com.xpn.xwiki.web.XWikiAction
action, cleanupComponents, csrfTokenCheck, execute, execute, getRealPath, getTranslatedDocument, handleRevision, initializeContainerComponent, initializeXWikiContext, sendGlobalRedirect, sendRedirect
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSxAction

public AbstractSxAction()
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,
                            com.xpn.xwiki.XWikiContext context)
                     throws com.xpn.xwiki.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 extension
context - the XWiki context when rendering the skin extension.
Throws:
com.xpn.xwiki.XWikiException - when an error occurs when building the response.

render

public String render(com.xpn.xwiki.XWikiContext context)
              throws com.xpn.xwiki.XWikiException
Overrides:
render in class com.xpn.xwiki.web.XWikiAction
Throws:
com.xpn.xwiki.XWikiException

getExtensionType

public abstract Extension getExtensionType()
Get the type of extension, depends on the type of action.

Returns:
a new object which extends Extension.


Copyright © 2004-2012 XWiki. All Rights Reserved.