public abstract class MTask
extends java.lang.Object
| Constructor and Description |
|---|
MTask() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
execute(MContext context)
The purpose of this method is to do or dispatch all buisness work required.
|
MContext |
getContext()
Get the current MContext, may return a context that does not have a valid request.
|
javax.servlet.http.HttpServletRequest |
getRequest()
Get the current request.
|
javax.servlet.http.HttpSession |
getSession()
Get the session corresponding to this instance
|
boolean |
getTaskComplete()
Returns whether the task is complete or not.
|
java.lang.String |
getTaskId()
Returns the ID of this task (must be the ID used to register the task in the
XML descriptor).
|
java.lang.String |
getTaskInstanceId()
Returns the instance specific ID of this task (may be different than the ID used to register the task in the
XML descriptor).
|
java.lang.String |
getUIPage()
Returns the name of the current JSP file used by this task.
|
void |
init(com.novell.emframe.fw.servlet.FwSession session)
Method allows the framework to initialize the MTask instance.
|
void |
init(MContext context,
org.jdom.Document doc)
Initialize the task to be ready for first execute method.
|
void |
release()
Called by the framework when the iManTask been released and should
be garbage collected in the future.
|
void |
render(MContext context,
javax.servlet.http.HttpServletResponse response)
The purpose of this method is to render the data into markup to be sent to the client.
|
void |
setTaskComplete(boolean complete)
Call this method to inform the framework that you have completed and it is time to move on.
|
void |
setUIPage(java.lang.String jspPage)
This should be called from the execute method to tell the framework which JSP to should be used to render
the data into HTML (or other markup).
|
static void |
shouldRun(javax.servlet.http.HttpServletRequest req,
java.lang.String taskId)
This function is called to see if the iManTask should be run based upon conditions known to the task.
|
public final void init(com.novell.emframe.fw.servlet.FwSession session)
public abstract void execute(MContext context)
context - TaskContext provides access to framework and session data (ex. locale)public void render(MContext context, javax.servlet.http.HttpServletResponse response)
context - TaskContext provides access to framework and session data (ex. locale)response - HttpServletResponse to render datapublic void init(MContext context, org.jdom.Document doc)
context - TaskContext provides access to framework and session data (ex. locale)doc - XML Document used to register task with iManagerpublic void setUIPage(java.lang.String jspPage)
jspPage - String containing the JSP file to use in the form of moduleid/filename (ex. "dirxml/MyTask.jsp"
where dirxml is the moduleid and MyTask.jsp is the file name)getUIPage()public java.lang.String getUIPage()
setUIPage(java.lang.String)public static void shouldRun(javax.servlet.http.HttpServletRequest req,
java.lang.String taskId)
throws java.lang.Exception
req - The current HttpServletRequesttaskId - String containing the task id as registered in the XML descriptorjava.lang.Exception - with a descriptive string describing why the gadget cannot runpublic void release()
public final java.lang.String getTaskInstanceId()
public final java.lang.String getTaskId()
public void setTaskComplete(boolean complete)
complete - public boolean getTaskComplete()
public javax.servlet.http.HttpSession getSession()
public javax.servlet.http.HttpServletRequest getRequest()
public MContext getContext()
API Documentation Copyright © 1998-2004 Novell, Inc. All rights reserved.
NDS is a registered trademark of Novell, Inc. in the United States and other countries.
Generated ${TODAY} ${TSTAMP}.