org.sakaiproject.component.kernel.tool
Class ActiveToolComponent.MyActiveTool

java.lang.Object
  extended byorg.sakaiproject.util.Tool
      extended byorg.sakaiproject.component.kernel.tool.ActiveToolComponent.MyActiveTool
All Implemented Interfaces:
ActiveTool, Comparable, Tool
Enclosing class:
ActiveToolComponent

public class ActiveToolComponent.MyActiveTool
extends Tool
implements ActiveTool

Entity: ActiveTool


Nested Class Summary
 class ActiveToolComponent.MyActiveTool.WrappedRequest
          Wraps a request object so we can override some standard behavior.
 class ActiveToolComponent.MyActiveTool.WrappedResponse
          Wraps a response object so we can override some standard behavior.
 
Nested classes inherited from class org.sakaiproject.api.kernel.tool.Tool
Tool.AccessSecurity
 
Field Summary
protected  ServletContext m_servletContext
           
 
Fields inherited from class org.sakaiproject.util.Tool
m_accessSecurity, m_categories, m_description, m_finalConfig, m_id, m_keywords, m_mutableConfig, m_title
 
Fields inherited from interface org.sakaiproject.api.kernel.tool.Tool
FRAGMENT, HELPER_DONE_URL, HELPER_MESSAGE, NATIVE_URL, PLACEMENT, PLACEMENT_ID, PORTLET, TOOL, TOOL_SESSION
 
Constructor Summary
ActiveToolComponent.MyActiveTool()
          Construct
ActiveToolComponent.MyActiveTool(Tool t)
          Construct from a Tool
 
Method Summary
 void forward(HttpServletRequest req, HttpServletResponse res, Placement placement, String toolContext, String toolPath)
          Invoke the tool to handle the complete request
protected  RequestDispatcher getDispatcher()
          Return a RequestDispatcher that can be used to dispatch to this tool - RequestDispatcher is NOT THREAD-SAFE FOR REUSE, so this method must be called each and every time a request is forwarded.
 void help(HttpServletRequest req, HttpServletResponse res, String toolContext, String toolPath)
          Invoke the tool to handle the complete request as a helper.
 void include(HttpServletRequest req, HttpServletResponse res, Placement placement, String toolContext, String toolPath)
          Invoke the tool to handle the request by producing a fragment
 void setServletContext(ServletContext context)
           
 
Methods inherited from class org.sakaiproject.util.Tool
compareTo, equals, getAccessSecurity, getCategories, getDescription, getFinalConfig, getId, getKeywords, getMutableConfig, getRegisteredConfig, getTitle, hashCode, setAccessSecurity, setCategories, setDescription, setId, setKeywords, setRegisteredConfig, setTitle
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.sakaiproject.api.kernel.tool.Tool
getAccessSecurity, getCategories, getDescription, getFinalConfig, getId, getKeywords, getMutableConfig, getRegisteredConfig, getTitle
 

Field Detail

m_servletContext

protected ServletContext m_servletContext
Constructor Detail

ActiveToolComponent.MyActiveTool

public ActiveToolComponent.MyActiveTool()
Construct


ActiveToolComponent.MyActiveTool

public ActiveToolComponent.MyActiveTool(Tool t)
Construct from a Tool

Method Detail

setServletContext

public void setServletContext(ServletContext context)

getDispatcher

protected RequestDispatcher getDispatcher()
Return a RequestDispatcher that can be used to dispatch to this tool - RequestDispatcher is NOT THREAD-SAFE FOR REUSE, so this method must be called each and every time a request is forwarded.


forward

public void forward(HttpServletRequest req,
                    HttpServletResponse res,
                    Placement placement,
                    String toolContext,
                    String toolPath)
             throws ToolException
Description copied from interface: ActiveTool
Invoke the tool to handle the complete request

Specified by:
forward in interface ActiveTool
Parameters:
req - The request.
res - The response.
placement - The tool placement for this request.
toolContext - The (optional) servlet context path that is given to the tool.
toolPath - The (optional) servlet pathInfo that is given to the tool.
Throws:
ToolException - if there's any trouble running the tool.

include

public void include(HttpServletRequest req,
                    HttpServletResponse res,
                    Placement placement,
                    String toolContext,
                    String toolPath)
             throws ToolException
Description copied from interface: ActiveTool
Invoke the tool to handle the request by producing a fragment

Specified by:
include in interface ActiveTool
Parameters:
req - The request.
res - The response.
placement - The tool placement for this request.
toolContext - The (optional) servlet context path that is given to the tool.
toolPath - The (optional) servlet pathInfo that is given to the tool.
Throws:
ToolException - if there's any trouble running the tool.

help

public void help(HttpServletRequest req,
                 HttpServletResponse res,
                 String toolContext,
                 String toolPath)
          throws ToolException
Description copied from interface: ActiveTool
Invoke the tool to handle the complete request as a helper. Note, the placement is shared between invoker and invoked.

Specified by:
help in interface ActiveTool
Parameters:
req - The request.
res - The response.
toolContext - The (optional) servlet context path that is given to the tool.
toolPath - The (optional) servlet pathInfo that is given to the tool.
Throws:
ToolException - if there's any trouble running the tool.