|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.apache.turbine.DynamicURI
org.apache.turbine.tool.TemplateLink
org.tigris.scarab.util.ScarabLink
This class adds a ModuleManager.CURRENT_PROJECT to every link. This class is added into the context to replace the $link that Turbine adds.
| Field Summary |
| Fields inherited from class org.apache.turbine.tool.TemplateLink |
TEMPLATE_KEY |
| Fields inherited from class org.apache.turbine.DynamicURI |
ANCHOR_STATIC_PART_LENGTH, HTTP, HTTPS, PATH_INFO, pathInfo, QUERY_DATA, queryData, redirect, res |
| Constructor Summary | |
ScarabLink()
Constructor. |
|
| Method Summary | |
org.apache.turbine.DynamicURI |
addPathInfo(java.lang.String name,
boolean value)
Adds a name=value pair to the path_info string. |
ScarabLink |
addPathInfo(java.lang.String key,
org.apache.fulcrum.parser.ParameterParser pp)
|
ScarabLink |
addPathInfo(org.apache.fulcrum.parser.ValueParser pp)
Adds all the parameters in a ValueParser to the pathinfo except the action, screen, or template keys as defined by Turbine |
void |
dispose()
Disposes the object by setting its disposed flag. |
java.lang.String |
getCurrentView()
Returns the name of the template that is being being processed |
ScarabLink |
getIssueIdAbsoluteLink(Issue issue)
Returns a short link for viewing a single issue that will not include session info and will be absolute. |
ScarabLink |
getIssueIdLink(Issue issue)
Returns a short link for viewing a single issue |
protected org.apache.turbine.RunData |
getRunData()
Give subclasses access to the RunData, so they do not have to reimplement the pooling code, just to get at it. |
java.lang.String |
getScriptName()
Gets the server scriptName (/s). |
java.lang.String |
getServerName()
Gets the server name. |
int |
getServerPort()
Gets the server port. |
java.lang.String |
getServerScheme()
Gets the server scheme (HTTP or HTTPS). |
void |
init(java.lang.Object data)
This will initialise a TemplateLink object that was constructed with the default constructor (ApplicationTool method). |
boolean |
isAllowed()
Check if the user has the permission to see the link. |
boolean |
isAllowed(java.lang.String t)
Check if the user has the permission to see the template t. |
boolean |
isDisposed()
Checks whether the object is disposed. |
ScarabLink |
omitModule()
Causes the link to not include the module id. |
ScarabLink |
overrideSecurity()
Shuts off permission checking. |
void |
recycle()
Recycles the object by removing its disposed flag. |
void |
refresh()
|
ScarabLink |
setAlternateText(java.lang.String alternateText)
Text that will be returned from toString if the user did not have permission to see the link. |
ScarabLink |
setAttributeText(java.lang.String attributeText)
Allows for setting attributes such as class on an anchor tag label. |
ScarabLink |
setLabel(java.lang.String label)
Setting the label will cause the link tool to print out the the text for the anchor tag. |
org.apache.turbine.tool.TemplateLink |
setPage(java.lang.String t)
Sets the template variable used by the Template Service. |
protected org.apache.turbine.tool.TemplateLink |
setPage(java.lang.String t,
java.lang.String moduleid)
Sets the template variable used by the Template Service. |
ScarabLink |
setPathInfo(java.lang.String key,
java.lang.String value)
|
java.lang.String |
toString()
Prints out the url and resets the relative flag to true. |
| Methods inherited from class org.apache.turbine.tool.TemplateLink |
getPage, getURI, setAbsolute, setEncodeURLOff |
| Methods inherited from class org.apache.turbine.DynamicURI |
add, add, add, addPair, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addPathInfo, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, addQueryData, getA, hasPathInfo, hasQueryData, init, init, isEncodeUrl, isRelative, remove, removePairByName, removePathInfo, removePathInfo, removeQueryData, removeQueryData, renderPairs, renderPathInfo, renderPathInfo, renderQueryString, renderQueryString, setAction, setEncodeUrl, setRedirect, setRelative, setScreen, setSecure, setSecure, setTemplate, toString, toString, writeEncoded, writeFastEncoded |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ScarabLink()
| Method Detail |
public void init(java.lang.Object data)
init in interface org.apache.fulcrum.pool.InitableRecyclabledata - assumed to be a RunData objectpublic void refresh()
refresh in interface org.apache.turbine.services.pull.ApplicationToolpublic java.lang.String getServerName()
public int getServerPort()
public java.lang.String getServerScheme()
public java.lang.String getScriptName()
public org.apache.turbine.tool.TemplateLink setPage(java.lang.String t)
t - A String with the template name.
public ScarabLink omitModule()
ScarabLink valuepublic ScarabLink overrideSecurity()
protected org.apache.turbine.tool.TemplateLink setPage(java.lang.String t,
java.lang.String moduleid)
t - A String with the template name.moduleid - The id of the new selected module.
public java.lang.String getCurrentView()
public ScarabLink setPathInfo(java.lang.String key,
java.lang.String value)
public ScarabLink addPathInfo(java.lang.String key,
org.apache.fulcrum.parser.ParameterParser pp)
public org.apache.turbine.DynamicURI addPathInfo(java.lang.String name,
boolean value)
name - A String with the name to add.value - A double with the value to add.public ScarabLink addPathInfo(org.apache.fulcrum.parser.ValueParser pp)
public ScarabLink setLabel(java.lang.String label)
label - a String value
ScarabLink valuepublic ScarabLink setAttributeText(java.lang.String attributeText)
attributeText - a String value
ScarabLink valuepublic ScarabLink setAlternateText(java.lang.String alternateText)
alternateText - a String value
ScarabLink valuepublic java.lang.String toString()
toString in interface SkipFilteringString url
public ScarabLink getIssueIdLink(Issue issue)
throws java.lang.Exception
issue - an Issue value
String value
java.lang.Exception - if an error occurs
public ScarabLink getIssueIdAbsoluteLink(Issue issue)
throws java.lang.Exception
issue - an Issue value
String value
java.lang.Exception - if an error occurspublic boolean isAllowed()
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.
public boolean isAllowed(java.lang.String t)
true is returned. If template t is
null, this method returns false.
protected org.apache.turbine.RunData getRunData()
public void recycle()
recycle in interface org.apache.fulcrum.pool.Recyclablepublic void dispose()
dispose in interface org.apache.fulcrum.pool.Recyclablepublic boolean isDisposed()
isDisposed in interface org.apache.fulcrum.pool.Recyclable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||