org.jboss.portal.server
Class ServerURL

java.lang.Object
  extended by org.jboss.portal.server.ServerURL
Direct Known Subclasses:
PageURL, WindowURL

public class ServerURL
extends java.lang.Object

Define an URL at the server level with the concept of control parameters. todo : perhaps introduce the generic notion of scope, to allow more different scoping ?


Field Summary
protected  Parameters controlParameters
          Control scoped parameters.
protected static org.apache.log4j.Logger log
          Logger accessible by subclasses.
protected  java.lang.Boolean secure
          Do we requet secure or not.
protected  ServerObjectID target
          The target of this URL.
protected  Parameters targetParameters
          Target scoped parameters.
 
Constructor Summary
ServerURL(ServerObjectID target)
           
 
Method Summary
 Parameters getControlParameters()
          Return the control scoped parameters.
 java.lang.Boolean getSecure()
          Returns wether the URL is secure or not.
 ServerObjectID getTarget()
          Return the target or null if there is no target.
 Parameters getTargetParameters()
          Return the target scoped parameters.
 boolean isIdempotent()
          Return true if the URL is idempotent.
 void setControlParameter(java.lang.String name, java.lang.String value)
          Set the control scoped parameter.
 void setControlParameter(java.lang.String name, java.lang.String[] values)
           
 void setSecure(java.lang.Boolean secure)
          Set the URL secure or not.
 void setTargetParameter(java.lang.String name, java.lang.String value)
          Set the target scoped parameter.
 void setTargetParameter(java.lang.String name, java.lang.String[] values)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static final org.apache.log4j.Logger log
Logger accessible by subclasses.


target

protected final ServerObjectID target
The target of this URL.


controlParameters

protected final Parameters controlParameters
Control scoped parameters.


targetParameters

protected final Parameters targetParameters
Target scoped parameters.


secure

protected java.lang.Boolean secure
Do we requet secure or not.

Constructor Detail

ServerURL

public ServerURL(ServerObjectID target)
Method Detail

getTarget

public ServerObjectID getTarget()
Return the target or null if there is no target.


setSecure

public void setSecure(java.lang.Boolean secure)
Set the URL secure or not.

Parameters:
secure - true if the URL must be secure

getSecure

public java.lang.Boolean getSecure()
Returns wether the URL is secure or not.

Returns:
true if the URL is secure

setControlParameter

public void setControlParameter(java.lang.String name,
                                java.lang.String value)
Set the control scoped parameter. If the value is null it clears the parameter.

Parameters:
name - the parameter name.
value - the parameter value.
Throws:
java.lang.IllegalArgumentException - if the name is null

setControlParameter

public void setControlParameter(java.lang.String name,
                                java.lang.String[] values)
Parameters:
name - the parameter name.
values - the parameter values.
Throws:
java.lang.IllegalArgumentException - if the name is null
See Also:
setControlParameter(String, String)

getControlParameters

public Parameters getControlParameters()
Return the control scoped parameters.


setTargetParameter

public void setTargetParameter(java.lang.String name,
                               java.lang.String value)
Set the target scoped parameter. If the value is null it clears the parameter.

Parameters:
name - the parameter name.
value - the parameter value.
Throws:
java.lang.IllegalArgumentException - if the name is null

setTargetParameter

public void setTargetParameter(java.lang.String name,
                               java.lang.String[] values)
Parameters:
name - the parameter name.
values - the parameter values.
Throws:
java.lang.IllegalArgumentException - if the name is null
See Also:
setTargetParameter(String, String)

getTargetParameters

public Parameters getTargetParameters()
Return the target scoped parameters.


isIdempotent

public boolean isIdempotent()
Return true if the URL is idempotent.