org.sakaiproject.tool.tool_config
Class ConfigTool

java.lang.Object
  extended byorg.sakaiproject.tool.tool_config.ConfigTool

public class ConfigTool
extends Object

OptionsTool is a Sakai Helper tool that presents a tool placement options editor to the end user to edit a tool placement's options for a particular placement.

Version:
$Revision: 632 $
Author:
University of Michigan, Sakai Software Development Team

Nested Class Summary
 class ConfigTool.NameAndValue
          Represents a name value pair.
 
Field Summary
static String ATTR_PLACEMENT
          The tool session attribute suffix (after my tool id) used to pass the Tool object to configure between client and helper
protected  Collection m_edit
          The NameAndValue collection being edited.
protected  SessionManager m_sessionManager
          Session manager (injected dependency)
protected  ToolManager m_toolManager
          Tool manager (injected dependency)
 
Constructor Summary
ConfigTool()
          no-arg constructor.
 
Method Summary
 Collection getOptions()
          Access a collection of name,value options for the current configuration.
protected  void goToDone()
          Cause the redirect to the done place.
 String processActionCancel()
          Process the cancel command from the edit view.
 String processActionSave()
          Process the save command from the edit view.
protected  void saveEdit()
          Save any changed values from the edit.
 void setSessionManager(SessionManager mgr)
          Set the session manager.
 void setToolManager(ToolManager mgr)
          Set the tool manager.
protected  void setupEdit()
          If we have not yet setup our m_config edit buffer, do so.
protected  void validate()
          Check that we are properly configured.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_PLACEMENT

public static final String ATTR_PLACEMENT
The tool session attribute suffix (after my tool id) used to pass the Tool object to configure between client and helper

See Also:
Constant Field Values

m_sessionManager

protected SessionManager m_sessionManager
Session manager (injected dependency)


m_toolManager

protected ToolManager m_toolManager
Tool manager (injected dependency)


m_edit

protected Collection m_edit
The NameAndValue collection being edited.

Constructor Detail

ConfigTool

public ConfigTool()
no-arg constructor.

Method Detail

setSessionManager

public void setSessionManager(SessionManager mgr)
Set the session manager.

Parameters:
mgr - The session manager.

setToolManager

public void setToolManager(ToolManager mgr)
Set the tool manager.

Parameters:
mgr - The tool manager.

processActionSave

public String processActionSave()
Process the save command from the edit view.

Returns:
navigation outcome:

processActionCancel

public String processActionCancel()
Process the cancel command from the edit view.

Returns:
navigation outcome:

getOptions

public Collection getOptions()
Access a collection of name,value options for the current configuration.

Returns:
a collection of name,value options for the current configuration.

validate

protected void validate()
Check that we are properly configured.


goToDone

protected void goToDone()
Cause the redirect to the done place.


setupEdit

protected void setupEdit()
If we have not yet setup our m_config edit buffer, do so.


saveEdit

protected void saveEdit()
Save any changed values from the edit.