planetj.magic
Interface IMagicRequest

All Superinterfaces:
IFeature
All Known Subinterfaces:
IAssociationRequest
All Known Implementing Classes:
AbstractMagicRequest, AbstractParameterRequest, AbstractSQLParameterRequest, MagicRequest

public interface IMagicRequest
extends IFeature

Interface for PlanetJ Magic Request. A magic request is a Servlet call that can be serviced/handled automatically (magically) by the PlanetJ DataEngineServlet with no programmer code. Examples are column sorting, refresh data. Creation date: (12/6/2001 8:22:24 PM)


Nested Class Summary
 
Nested classes inherited from class planetj.dataengine.IFeature
IFeature.OperationCountFeature
 
Field Summary
static java.lang.String IS_COMPLETE
           
static java.lang.String MAGIC_REQUEST
           
static java.lang.String MAGIC_REQUEST_CLASS
           
static java.lang.String MAGIC_REQUEST_PARAM1
           
static java.lang.String MAGIC_REQUEST_RC
           
static java.lang.String SAME_URI
           
static java.lang.String TYPE
           
static java.lang.String TYPE_PAGE
           
static java.lang.String TYPE_SESSION
           
static java.lang.String TYPE_STATIC
           
static java.lang.String USER_REQUEST_ATTRIBUTES_STORED
           
 
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
 
Method Summary
 void addLinkedRequestAfter(IMagicRequest pMagicRequest)
          Adds the given MagicRequest to the list of requests to be executed after this MagicRequest
 void addLinkedRequestBefore(IMagicRequest pMagicRequest)
          Adds the given MagicRequest to the list of requests to be executed before this MagicRequest
 IMagicRequest execute(HttpServletRequest request, HttpServletResponse response, DataEngineServlet servlet)
           
 IMagicRequest executeAll(HttpServletRequest pRequest, HttpServletResponse pResponse, DataEngineServlet pServlet)
           
 Field getBaseField()
          Return the Base Field of this Request.
 Row getBaseRow()
          Get the based on Row for this Request.
 java.lang.String getCurrentURI()
          Get the URI of the page the MagicRequest was created from.
 IMagicRequest getFirstRequest()
          Gets the first magic request that will be executed when executeAll() is invoked on this magic request.
 java.lang.String getId()
          Return the id used to store this magic request in the session.
 java.lang.String getKey()
          Return the id used to store this magic request in the session.
 IMagicRequest getLastRequest()
          Gets the last magic request that will be executed when executeAll() is invoked on this magic request.
 java.lang.String getMagicRequestParameter(HttpServletRequest request)
          Get a magic requests parameter
 java.lang.String getMagicURI()
          Get the URI to use to call the Magic Servlet for this request
 java.lang.String getNextURI(LayoutDisplayPropertyGroup layout)
          Get the URI of the page to call after executing the request.
 java.lang.String getType()
          Get the type of magic request.
 boolean isCompleted(HttpServletRequest req)
          Returns whether or not the magic request needs to be returned to the requester.
 boolean isEndNavigationGroup()
          Tests whether or not this magic request needs to end the current navigation group and go back to the previous state of the last page of the last group.
 boolean isOverridePrimaryNavigation()
          Tests if the navigation from this magic request should override the navigation in the primary magic request.
 boolean isRepeatable()
          Whether or not this magic request can be repeated.
 boolean isReturnToRequester()
          Returns whether or not the magic request needs to be returned to the requester.
 boolean isSaveResults()
          Deprecated. - from code prior to navigation and layouts - wasn't referenced or used any where !!N WK (4/22/2003 8:27:47 AM)
 boolean isStartNewNavigationGroup()
          Tests whether or not this magic request needs to start a new navigation group.
 void postExecute(HttpServletRequest request, HttpServletResponse response, DataEngineServlet servlet)
          Called after the execute method runs.
 void preExecute(HttpServletRequest request, HttpServletResponse response, DataEngineServlet servlet)
          Called before the execute method runs.
 void setBaseField(Field field)
          Set the based on Row for this Request.
 void setBaseRow(Row row)
          Set the based on Row for this Request.
 void setBaseRowCollection(RowCollection pBaseRowCollection)
          Set the based on RowCollection for this Request.
 void setEndNavigationGroup(boolean endGroup)
           
 void setNextURI(java.lang.String section, java.lang.String uri)
           
 void setOverridePrimaryNavigation(boolean override)
          Sets if the navigation from this magic request should override the navigation in the primary magic request.
 void setRepeatable(boolean repeatable)
          Set whether or not this magic request can be repeated.
 void setRowEventListener(IRowEventListener pListener)
           
 void setStartNewNavigationGroup(boolean startNew)
           
 
Methods inherited from interface planetj.dataengine.IFeature
appendUnsupportedHTMLMessage, getFeatureLevel, isApplicable
 

Field Detail

MAGIC_REQUEST

public static final java.lang.String MAGIC_REQUEST
See Also:
Constant Field Values

MAGIC_REQUEST_CLASS

public static final java.lang.String MAGIC_REQUEST_CLASS
See Also:
Constant Field Values

MAGIC_REQUEST_RC

public static final java.lang.String MAGIC_REQUEST_RC
See Also:
Constant Field Values

MAGIC_REQUEST_PARAM1

public static final java.lang.String MAGIC_REQUEST_PARAM1
See Also:
Constant Field Values

USER_REQUEST_ATTRIBUTES_STORED

public static final java.lang.String USER_REQUEST_ATTRIBUTES_STORED
See Also:
Constant Field Values

IS_COMPLETE

public static final java.lang.String IS_COMPLETE
See Also:
Constant Field Values

SAME_URI

public static final java.lang.String SAME_URI
See Also:
Constant Field Values

TYPE

public static final java.lang.String TYPE
See Also:
Constant Field Values

TYPE_PAGE

public static final java.lang.String TYPE_PAGE
See Also:
Constant Field Values

TYPE_SESSION

public static final java.lang.String TYPE_SESSION
See Also:
Constant Field Values

TYPE_STATIC

public static final java.lang.String TYPE_STATIC
See Also:
Constant Field Values
Method Detail

addLinkedRequestAfter

public void addLinkedRequestAfter(IMagicRequest pMagicRequest)
Adds the given MagicRequest to the list of requests to be executed after this MagicRequest


addLinkedRequestBefore

public void addLinkedRequestBefore(IMagicRequest pMagicRequest)
Adds the given MagicRequest to the list of requests to be executed before this MagicRequest


execute

public IMagicRequest execute(HttpServletRequest request,
                             HttpServletResponse response,
                             DataEngineServlet servlet)
                      throws CMException
Throws:
CMException

executeAll

public IMagicRequest executeAll(HttpServletRequest pRequest,
                                HttpServletResponse pResponse,
                                DataEngineServlet pServlet)
                         throws CMException
Throws:
CMException

getBaseField

public Field getBaseField()
Return the Base Field of this Request.


getBaseRow

public Row getBaseRow()
Get the based on Row for this Request. Used when you have associations.


getCurrentURI

public java.lang.String getCurrentURI()
Get the URI of the page the MagicRequest was created from.


getFirstRequest

public IMagicRequest getFirstRequest()
Gets the first magic request that will be executed when executeAll() is invoked on this magic request. If there are no requests before this one, then this same object will be returned


getId

public java.lang.String getId()
Return the id used to store this magic request in the session.


getKey

public java.lang.String getKey()
Return the id used to store this magic request in the session.


getLastRequest

public IMagicRequest getLastRequest()
Gets the last magic request that will be executed when executeAll() is invoked on this magic request. If there are no requests after this one, then this same object will be returned


getMagicRequestParameter

public java.lang.String getMagicRequestParameter(HttpServletRequest request)
Get a magic requests parameter


getMagicURI

public java.lang.String getMagicURI()
Get the URI to use to call the Magic Servlet for this request


getNextURI

public java.lang.String getNextURI(LayoutDisplayPropertyGroup layout)
Get the URI of the page to call after executing the request. If this is equal to SAME_URI the current URI will be used. If this is null, the magic request will go back to the previous state after executing


getType

public java.lang.String getType()
Get the type of magic request.


isCompleted

public boolean isCompleted(HttpServletRequest req)
Returns whether or not the magic request needs to be returned to the requester.


isEndNavigationGroup

public boolean isEndNavigationGroup()
Tests whether or not this magic request needs to end the current navigation group and go back to the previous state of the last page of the last group.


isOverridePrimaryNavigation

public boolean isOverridePrimaryNavigation()
Tests if the navigation from this magic request should override the navigation in the primary magic request. Normally, any nagivation in a magic request which is linked before or after to the primary magic request is ignored. If this method returns true and if this magic request is linked after (not before) the primary magic request, then the navigation from this magic request will be used instead of the navigation from the primary magic request.


isRepeatable

public boolean isRepeatable()
Whether or not this magic request can be repeated. For example, inserts shouldn't be run twice.


isReturnToRequester

public boolean isReturnToRequester()
Returns whether or not the magic request needs to be returned to the requester.


isSaveResults

public boolean isSaveResults()
Deprecated. - from code prior to navigation and layouts - wasn't referenced or used any where !!N WK (4/22/2003 8:27:47 AM)

Tests if the results of executing this magic request should be saved. This allows the user to go back to this result after viewing another page. If this method returns false, and the user goes back from viewing a later page, the results of this request will be "skipped" and the user will see results from a page "before" this one.


isStartNewNavigationGroup

public boolean isStartNewNavigationGroup()
Tests whether or not this magic request needs to start a new navigation group.


preExecute

public void preExecute(HttpServletRequest request,
                       HttpServletResponse response,
                       DataEngineServlet servlet)
                throws CMException
Called before the execute method runs. If this method is overriden, it must be invoked on the superclass. Creation date: (10/8/2004)

Throws:
CMException

postExecute

public void postExecute(HttpServletRequest request,
                        HttpServletResponse response,
                        DataEngineServlet servlet)
                 throws CMException
Called after the execute method runs. If this method is overriden, it must be invoked on the superclass. Creation date: (10/8/2004)

Throws:
CMException

setBaseField

public void setBaseField(Field field)
Set the based on Row for this Request. Used when you have associations.


setBaseRow

public void setBaseRow(Row row)
Set the based on Row for this Request. Used when you have associations.


setBaseRowCollection

public void setBaseRowCollection(RowCollection pBaseRowCollection)
Set the based on RowCollection for this Request.


setEndNavigationGroup

public void setEndNavigationGroup(boolean endGroup)

setNextURI

public void setNextURI(java.lang.String section,
                       java.lang.String uri)

setOverridePrimaryNavigation

public void setOverridePrimaryNavigation(boolean override)
Sets if the navigation from this magic request should override the navigation in the primary magic request. Normally, any nagivation in a magic request which is linked before or after to the primary magic request is ignored. If this property is true and if this magic request is linked after (not before) the primary magic request, then the navigation from this magic request will be used instead of the navigation from the primary magic request.


setRepeatable

public void setRepeatable(boolean repeatable)
Set whether or not this magic request can be repeated. For example, inserts shouldn't be run twice.


setRowEventListener

public void setRowEventListener(IRowEventListener pListener)

setStartNewNavigationGroup

public void setStartNewNavigationGroup(boolean startNew)