02/28/2005
 

com.vignette.portal.website.enduser
Interface PortalURI


public interface PortalURI

The PortalURI interface represents a pointer to a resource on the portal. A PortalURI can be created through the PortalContext and additional parameters can be added to it. The PortalURI can be converted to a String which get URL encoded and ready for embedding into markup.


Method Summary
 void addParameter(String name, String value)
          Add a parameter to this URI.
 void addParameter(String name, String[] values)
          Sets a list of parameter values for this URI
 boolean isForward()
          Returns true if PortalURI needs to be forwarded to, false if needs to be redirected to
 boolean isRedirect()
          Returns true if PortalURI needs to be redirected to, false if needs to be forwarded to.
 void setForward(boolean forward)
          Sets the PortalURI to forward mode.
 PortalURI setPageContextParameter(String context, String key, String value)
          Sets page context parameters for this PortalURI.
 String toString()
          The string representation of this object.
 

Method Detail

toString

public String toString()
The string representation of this object.
Overrides:
toString in class Object
Returns:
a full encoded URL representing this object

addParameter

public void addParameter(String name,
                         String value)
Add a parameter to this URI.
Parameters:
name - the name of the parameter to add
value - the value of the parameter to add

addParameter

public void addParameter(String name,
                         String[] values)
Sets a list of parameter values for this URI
Parameters:
name - a String specifying the name of the parameter
values - a String[] of values for the parameter. if this array is null or empty, any existing values for this parameter will be unset

setForward

public void setForward(boolean forward)
Sets the PortalURI to forward mode. This notifies the controller that this URI should be forwarded to, instead of redirected to.
Parameters:
forward - True for forward, false for redirect

isForward

public boolean isForward()
Returns true if PortalURI needs to be forwarded to, false if needs to be redirected to
Returns:
true if this is a forward, false otherwise

isRedirect

public boolean isRedirect()
Returns true if PortalURI needs to be redirected to, false if needs to be forwarded to. Functionally similar to isForward() but useful for semantical reasons.
Returns:
true if this is a redirect, false if this is a forward

setPageContextParameter

public PortalURI setPageContextParameter(String context,
                                         String key,
                                         String value)
Sets page context parameters for this PortalURI. This method will throw an IllegalArgumentException if any of the arguments is omitted.
Parameters:
context - the page context to which the parameters will be associated
key - the key for the specified parameter
value - the value of the specified parameter
Returns:
this PortalURI object containing the new page context parameters

02/28/2005
 

Copyright and Trademark Notices