|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.tigris.scarab.util.EmailLink
| Field Summary | |
static java.lang.String |
HTTP
HTTP protocol. |
static java.lang.String |
HTTPS
HTTPS protocol. |
| Constructor Summary | |
EmailLink()
Constructor to allow factory instantiation of EmailLinks. setCurrentModule must be called before first use. |
|
EmailLink(Module currentModule)
Constructor. |
|
| Method Summary | |
protected void |
addPair(java.util.List list,
java.lang.String name,
java.lang.String value)
Add a key value pair (in the form of a 2 object array) to the provided list |
EmailLink |
addPathInfo(java.lang.String name,
boolean value)
Adds a name=value pair to the path_info string. |
EmailLink |
addPathInfo(java.lang.String name,
double value)
Adds a name=value pair to the path_info string. |
EmailLink |
addPathInfo(java.lang.String name,
int value)
Adds a name=value pair to the path_info string. |
EmailLink |
addPathInfo(java.lang.String name,
long value)
Adds a name=value pair to the path_info string. |
EmailLink |
addPathInfo(java.lang.String name,
java.lang.Object value)
Adds a name=value pair to the path_info string. |
EmailLink |
addPathInfo(java.lang.String name,
java.lang.String value)
Adds a name=value pair to the path_info string. |
void |
dispose()
Disposes the object by setting its disposed flag. |
Module |
getCurrentModule()
|
EmailLink |
getIssueIdLink(Issue issue)
Returns a short link for viewing a single issue |
java.lang.String |
getScriptName()
Gets the server scriptName (/scarab/issues). |
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). |
boolean |
hasPathInfo()
Does this URI have path info. |
void |
init(java.lang.Object obj)
|
boolean |
isDisposed()
Checks whether the object is disposed. |
EmailLink |
omitModule()
Causes the link to not include the module id. |
void |
recycle()
Recycles the object by removing its disposed flag. |
void |
refresh()
|
protected void |
removePairByName(java.util.List pairs,
java.lang.String name)
Helper method to remove one or more pairs by its name (ie key). |
void |
removePathInfo()
Removes all the path info elements. |
void |
removePathInfo(java.lang.String name)
Removes a name=value pair from the path info. |
protected java.lang.String |
renderPairs(java.util.List pairs,
char pairSep,
char keyValSep)
This method takes a List of key/value arrays and converts it into a URL encoded key/value pair format with the appropriate separator. |
protected java.lang.String |
renderPathInfo(java.util.List pairs)
This method takes a Vector of key/value arrays and writes it to the supplied StringBuffer as encoded path info. |
EmailLink |
setAction(java.lang.String action)
Sets the action= value for this URL. |
void |
setCurrentModule(Module cM)
|
EmailLink |
setPage(java.lang.String t)
Sets the template variable used by the Template Service. |
EmailLink |
setPathInfo(java.lang.String key,
java.lang.String value)
|
java.lang.String |
toString()
Builds the URL with all of the data URL-encoded as well as encoded using HttpServletResponse.encodeUrl(). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String HTTP
public static final java.lang.String HTTPS
| Constructor Detail |
public EmailLink()
public EmailLink(Module currentModule)
| Method Detail |
public void init(java.lang.Object obj)
init in interface org.apache.fulcrum.pool.InitableRecyclablepublic Module getCurrentModule()
public void setCurrentModule(Module cM)
public void refresh()
protected void addPair(java.util.List list,
java.lang.String name,
java.lang.String value)
list - List to add to.name - A String with the name to add.value - A String with the value to add.
public EmailLink addPathInfo(java.lang.String name,
java.lang.String value)
name - A String with the name to add.value - A String with the value to add.
public EmailLink addPathInfo(java.lang.String name,
java.lang.Object value)
name - A String with the name to add.value - An Object with the value to add.
public EmailLink addPathInfo(java.lang.String name,
double value)
name - A String with the name to add.value - A double with the value to add.
public EmailLink addPathInfo(java.lang.String name,
int value)
name - A String with the name to add.value - An int with the value to add.
public EmailLink addPathInfo(java.lang.String name,
long value)
name - A String with the name to add.value - A long with the value to add.
public EmailLink addPathInfo(java.lang.String name,
boolean value)
name - A String with the name to add.value - A double with the value to add.
public EmailLink setPathInfo(java.lang.String key,
java.lang.String value)
protected void removePairByName(java.util.List pairs,
java.lang.String name)
pairs - the list of pairs to look over for removal.name - the name of the pair(s) to remove.public void removePathInfo()
public void removePathInfo(java.lang.String name)
name - A String with the name to be removed.public java.lang.String getServerName()
public int getServerPort()
-1 if unknown.public java.lang.String getServerScheme()
public java.lang.String getScriptName()
public boolean hasPathInfo()
protected java.lang.String renderPathInfo(java.util.List pairs)
pairs - A Vector of key/value arrays.
protected java.lang.String renderPairs(java.util.List pairs,
char pairSep,
char keyValSep)
pairs - A List of key/value arrays.pairSep - the character to use as a separator between pairs.
For example for a query-like rendering it would be '&'.keyValSep - the character to use as a separator between
key and value. For example for a query-like rendering, it would be '='.
public java.lang.String toString()
The above call to toString() would return the String:
DynamicURI dui = new DynamicURI (data, "UserScreen" );
dui.addPathInfo("user","jon");
dui.toString();
http://www.server.com/servlets/Turbine/screen/UserScreen/user/jon
toString in interface SkipFilteringpublic EmailLink omitModule()
EmailLink valuepublic EmailLink setPage(java.lang.String t)
t - A String with the template name.
public EmailLink setAction(java.lang.String action)
By default it adds the information to the path_info instead of the query data.
action - A String with the action value.
public EmailLink getIssueIdLink(Issue issue)
throws java.lang.Exception
issue - an Issue value
String value
java.lang.Exception - if an error occurspublic 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 | ||||||||||