Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Attribute

Value

ToolServlet.HELPER_ID + <panel argument>

<helperID argument>

Tool.HELPER_DONE_URL

<context path>/<servlet path>[/<path info>]?<ToolServlet.HELPER_ID + <panel argument>>=done&ActionURL.PARAM_PANEL=<panel argument>

Next any parameters that need to be passed to the Helper tool can be added to the SessionState via SessionState.setAttribute(String name, String value). Other tool packages often contain an interface that defines static final Strings for each of the parameters the tool expects to find in the SessionState. For example, the Sakai authorization API contains a PermissionHelper that defines the following:

Code Block
borderStylenone

	/** Set this tool state attribute with the prefix for the permission functions to consider for editing (i.e. "content.") */
	static final String PREFIX = "sakaiproject.permissions.prefix";

	/** Set this tool state attribute with descriptive text for the editor. */
	static final String DESCRIPTION = "sakaiproject.permissions.description";

	/** Set this tool state attribute to the entity reference of the entity whose AuthzGroup is to be edited. */
	static final String TARGET_REF = "sakaiproject.permissions.targetRef";

	/** Set this tool state attribute to the entity reference of the entity which controls the role definitions, if different than the target_ref (leave it unset if target_ref has the roles needed). */
	static final String ROLES_REF = "sakaiproject.permissions.rolesRef";

These are set in the SessionState by SiteAction immediately after startHelper is called.

Processing Helper Actions

Every request that is processed by a ToolServlet undergoes two helper-related checks. First, a check is made for the <ToolServlet.HELPER_ID + <panel>> CGI parameter. If it is present it is assumed that the helper is finished (no check is made to see if the parameter is set to 'done'). If so the helper ID attribute is removed from ToolSession

Ending a Helper