public class ScarabLink extends TemplateLink implements InitableRecyclable,SkipFiltering(Code)
This class adds a ModuleManager.CURRENT_PROJECT to every link. This class is added
into the context to replace the $link that Turbine adds.
author: Jon S. Stevens author: John McNally author: Maarten Coene version: $Id: ScarabLink.java 9476 2005-03-16 22:56:11Z dabbous $
public DynamicURI addPathInfo(String name, boolean value)(Code)
Adds a name=value pair to the path_info string. This method is missing
in DynamicURI, but should be there.
Parameters: name - A String with the name to add. Parameters: value - A double with the value to add.
Returns a short link for viewing a single issue that will not
include session info and will be absolute. It is meant to
be suitable for embedding in an email that points to the issue.
Parameters: issue - an Issue value a String value exception: Exception - if an error occurs
This will initialise a TemplateLink object that was
constructed with the default constructor (ApplicationTool
method).
Parameters: data - assumed to be a RunData object
Check if the user has the permission to see the link. If the user
has the permission(s), true is returned. if the
user does NOT have the proper permissions, this method has the
side effect of reseting the link, so that it is ready for use
in building the next link.
Check if the user has the permission to see the template t. If the user
has the permission(s), true is returned. If template t is
null, this method returns false.
Shuts off permission checking. Use case: a user saves a query with
module scope, so an email is sent to the project owner to approve it.
The email is sent from the user who does not have permission to
use the Approval.vm template. But it is known that the recipient(s)
does, because that is how they are chosen to receive the email.
We probably need a different link tool for emails that is not
request based. but for now use this sparingly and with forethought.
this
Text that will be returned from toString if the user did not have
permission to see the link. The default is the empty string
Parameters: alternateText - a String value a ScarabLink value
Allows for setting attributes such as class on an anchor tag
label. Note the complete anchor
tag is only returned from toString, if the lable has been set
so this setter will have no effect unless setLabel is called.
Parameters: attributeText - a String value a ScarabLink value
Setting the label will cause the link tool to print out the
the text for the anchor tag. This is useful in that if the link
should not be active for security reasons it can be completely
eliminated.
Parameters: label - a String value a ScarabLink value
Sets the template variable used by the Template Service. The
module id of the new selected module is given.
Parameters: t - A String with the template name. Parameters: moduleid - The id of the new selected module. A TemplateLink.