com.cc.framework.http
Class Hyperlink

java.lang.Object
  extended bycom.cc.framework.http.Hyperlink

public class Hyperlink
extends java.lang.Object

Creates a Hyperlink

Since:
1.0
Version:
$Revision: 1.16 $
Author:
Harald Schulz

Field Summary
private  java.lang.String anchor
          The Anchor
private  TupleArray params
          The query parameters
private  java.lang.String uri
          The URI
 
Constructor Summary
Hyperlink()
          Constructor for Hyperlink
Hyperlink(java.lang.String uri)
          Constructor for Hyperlink
Hyperlink(java.lang.String uri, java.lang.String queryString)
          Constructor for Hyperlink
Hyperlink(java.lang.String uri, java.lang.String queryString, java.lang.String anchor)
          Constructor for Hyperlink
 
Method Summary
 void addQueryParameter(java.lang.String key, java.lang.Object value)
          Adds a new Query parameter to the query parameter list
 void addQueryParameters(java.lang.String queryString)
          Extracts all query parameters from the given query string
static Hyperlink createFromRequest(javax.servlet.http.HttpServletRequest request)
          Creates a Hyperlink Object from the HttpServletRequest
 java.lang.String encodeURL(javax.servlet.ServletResponse response)
          Performs a URL encoding of the Hyperlink
 java.lang.String getAnchor()
          Returns the Anchor
 int getParamCount()
           
 java.lang.String getUri()
          Returns the URI
static Hyperlink parse(java.lang.String link)
          Creates a Hyperlink Object from the HttpServletRequest
 void setAnchor(java.lang.String newAnchor)
          Sets the Anchor
 void setUri(java.lang.String newUri)
          Sets the URI
 java.lang.String toString()
          Creates a single URL String from the Hyperlink
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

uri

private java.lang.String uri
The URI


anchor

private java.lang.String anchor
The Anchor


params

private TupleArray params
The query parameters

Constructor Detail

Hyperlink

public Hyperlink()
Constructor for Hyperlink


Hyperlink

public Hyperlink(java.lang.String uri)
Constructor for Hyperlink

Parameters:
uri - the URI

Hyperlink

public Hyperlink(java.lang.String uri,
                 java.lang.String queryString)
Constructor for Hyperlink

Parameters:
uri - the URI
queryString - the query string

Hyperlink

public Hyperlink(java.lang.String uri,
                 java.lang.String queryString,
                 java.lang.String anchor)
Constructor for Hyperlink

Parameters:
uri - the URI
queryString - the query string
anchor - the anchor
Method Detail

parse

public static Hyperlink parse(java.lang.String link)
Creates a Hyperlink Object from the HttpServletRequest

Parameters:
link - Hyperlink as a String
Returns:
Hyperlink

createFromRequest

public static Hyperlink createFromRequest(javax.servlet.http.HttpServletRequest request)
Creates a Hyperlink Object from the HttpServletRequest

Parameters:
request - HttpServletRequest
Returns:
Hyperlink

getParamCount

public int getParamCount()
Returns:
Returns the number of Query parameters

addQueryParameters

public void addQueryParameters(java.lang.String queryString)
Extracts all query parameters from the given query string

Parameters:
queryString - The query string

addQueryParameter

public void addQueryParameter(java.lang.String key,
                              java.lang.Object value)
Adds a new Query parameter to the query parameter list

Parameters:
key - Parameter key
value - Parameter value

getUri

public java.lang.String getUri()
Returns the URI

Returns:
String

setUri

public void setUri(java.lang.String newUri)
Sets the URI

Parameters:
newUri - the URI

getAnchor

public java.lang.String getAnchor()
Returns the Anchor

Returns:
String

setAnchor

public void setAnchor(java.lang.String newAnchor)
Sets the Anchor

Parameters:
newAnchor - the Anchor

encodeURL

public java.lang.String encodeURL(javax.servlet.ServletResponse response)
Performs a URL encoding of the Hyperlink

Parameters:
response - ServletResponse
Returns:
encoded Hyperlink

toString

public java.lang.String toString()
Creates a single URL String from the Hyperlink

Returns:
URL String
See Also:
Object.toString()


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.