planetj.magic
Class XLSRequest

java.lang.Object
  |
  +--planetj.html.AbstractHTMLRenderer
        |
        +--planetj.magic.AbstractMagicRequest
              |
              +--planetj.magic.MagicRequest
                    |
                    +--planetj.magic.XLSRequest
All Implemented Interfaces:
IFeature, IHTMLRenderer, IMagicRequest, IRenderer, Serializable

public class XLSRequest
extends MagicRequest

Request a magic Excel request which send a XLS File and bring it up in an Excel plugin within the browser.

Author:
PlanetJ Corporation
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class planetj.dataengine.IFeature
IFeature.OperationCountFeature
 
Field Summary
 
Fields inherited from class planetj.html.AbstractHTMLRenderer
className
 
Fields inherited from interface planetj.magic.IMagicRequest
IS_COMPLETE, MAGIC_REQUEST, MAGIC_REQUEST_PARAM1, MAGIC_REQUEST_RC, SAME_URI, TYPE, TYPE_PAGE, TYPE_SESSION, TYPE_STATIC, USER_REQUEST_ATTRIBUTES_STORED
 
Fields inherited from interface planetj.html.IHTMLRenderer
HTML
 
Fields inherited from interface planetj.dataengine.IFeature
DEFAULT_MESSAGE_FEATURE, FEATURE_DELETE, FEATURE_INSERT, FEATURE_LEVEL_ENTERPRISE, FEATURE_LEVEL_ENTRY, FEATURE_LEVEL_PROFESSIONAL, FEATURE_LEVEL_STANDARD, FEATURE_UPDATE, MESSAGE_END, MESSAGE_START
 
Constructor Summary
XLSRequest(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, RowCollection rc)
          XLSRequest constructor.
 
Method Summary
 IMagicRequest execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, DataEngineServlet servlet)
          This method will return an .xls file as the response to a MagicRequest to generate Excel output.
 int getFeatureLevel()
          Gets the minimum feature level requried to execute this operation
 boolean isReturnToRequester()
          Returns whether or not the magic request needs to be returned to the requester.
static void populateXlsFile(int sheetIndex, org.apache.poi.hssf.usermodel.HSSFWorkbook wb, RowCollection rc)
           
 
Methods inherited from class planetj.magic.MagicRequest
getType, store
 
Methods inherited from class planetj.magic.AbstractMagicRequest
addLinkedRequestAfter, addLinkedRequestBefore, appendUnsupportedHTMLMessage, clone, clone, equals, executeAll, getAnchorName, getBaseField, getBaseRow, getBaseRowCollection, getCurrentURI, getDefaultEndNavigationGroup, getFailMessage, getFirstRequest, getId, getKey, getLastRequest, getMagicServletURI, getMagicURI, getNextURI, getRequestAttribute, getRequestParameter, getRequestParameterValues, getSessionAttribute, getSharedSessionAttribute, getSuccessMessage, hasLinkedRequestsAfter, hasLinkedRequestsBefore, isApplicable, isCompleted, isEndNavigationGroup, isPopup, isSaveResults, isStartNewNavigationGroup, preexecute, removeRequestAttribute, removeSessionAttribute, removeSharedSessionAttribute, setAnchorName, setBaseField, setBaseRow, setBaseRowCollection, setCompleted, setEndNavigationGroup, setFailMessage, setId, setNextURI, setNextURI, setNextURIs, setPopup, setRequestGroupAttribute, setRequestPageAttribute, setRequestPersistentAttribute, setRequestTransientAttribute, setReturnToRequester, setRowEventListener, setSessionAttribute, setSessionSharedAttribute, setStartNewNavigationGroup, setSuccessMessage
 
Methods inherited from class planetj.html.AbstractHTMLRenderer
append, generate, getDisplayType
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface planetj.magic.IMagicRequest
addLinkedRequestAfter, addLinkedRequestBefore, executeAll, getBaseField, getBaseRow, getCurrentURI, getFirstRequest, getId, getKey, getLastRequest, getMagicURI, getNextURI, isCompleted, isEndNavigationGroup, isSaveResults, isStartNewNavigationGroup, setBaseField, setBaseRow, setRowEventListener
 
Methods inherited from interface planetj.html.IHTMLRenderer
append, generate
 
Methods inherited from interface planetj.dataengine.display.IRenderer
getDisplayType
 
Methods inherited from interface planetj.dataengine.IFeature
appendUnsupportedHTMLMessage, isApplicable
 

Constructor Detail

XLSRequest

public XLSRequest(javax.servlet.http.HttpServletRequest request,
                  javax.servlet.http.HttpServletResponse response,
                  RowCollection rc)
XLSRequest constructor.

Method Detail

execute

public IMagicRequest execute(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response,
                             DataEngineServlet servlet)
                      throws CMException
This method will return an .xls file as the response to a MagicRequest to generate Excel output. ############ This should be based on a more generic FileRequest. ############# There should be a FileRequest that can send the .xls & also an XLSRequest that put the RC in to the .xls file and passes it to a FileRequest.

Specified by:
execute in interface IMagicRequest
Specified by:
execute in class AbstractMagicRequest
Parameters:
request - request from client.
response - response to client.
servlet - servlet that is handling this magic request.
Returns:
this magic request.
CMException

getFeatureLevel

public int getFeatureLevel()
Gets the minimum feature level requried to execute this operation

Specified by:
getFeatureLevel in interface IFeature
Overrides:
getFeatureLevel in class AbstractMagicRequest

isReturnToRequester

public boolean isReturnToRequester()
Returns whether or not the magic request needs to be returned to the requester. Defaults to true. If any "Magic" requests do not require return to the requester, then this method should be overridden.

Specified by:
isReturnToRequester in interface IMagicRequest
Overrides:
isReturnToRequester in class AbstractMagicRequest
Returns:
boolean

populateXlsFile

public static void populateXlsFile(int sheetIndex,
                                   org.apache.poi.hssf.usermodel.HSSFWorkbook wb,
                                   RowCollection rc)
                            throws CMException
CMException