org.openprivacy.reptile.extensions
Class LinkProducer

java.lang.Object
  |
  +--org.openprivacy.reptile.extensions.LinkProducer

public class LinkProducer
extends java.lang.Object

Builds URLs using from params and values. This take the compexity away from building complex URLs with HTTP params. This can work as a Xalan extension or right from the Servlet API.

Version:
$Id: LinkProducer.java,v 1.13 2002/02/09 22:39:57 burton Exp $
Author:
Kevin A. Burton

Constructor Summary
LinkProducer()
          Noop contructor for use with Xalan as an Extension.
LinkProducer(ParameterPasser params, javax.servlet.http.HttpSession session, java.lang.String sequenceName)
           
 
Method Summary
 java.lang.String getLink()
          Get the value of this computed link.
 void include(ParameterPasser params)
          Include all params in the hashtable into this link.
 void include(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
          Include all existing parameters in this new URL.
 void newLink(ParameterPasser params)
           
 void newLink(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
          Create a new link.
 void param(java.lang.String name, javax.servlet.ServletRequest request)
          Get a param from the HTTP Servlet layer.
 void param(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
          Add the given param to the link.
 java.lang.String toString()
          Same as getLink()
 void value(java.lang.String name, java.lang.String value)
           
 void value(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall elem)
          Similar to the param function but is given a value instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LinkProducer

public LinkProducer()
Noop contructor for use with Xalan as an Extension.


LinkProducer

public LinkProducer(ParameterPasser params,
                    javax.servlet.http.HttpSession session,
                    java.lang.String sequenceName)
Method Detail

newLink

public void newLink(org.apache.xalan.extensions.XSLProcessorContext context,
                    org.apache.xalan.templates.ElemExtensionCall elem)
Create a new link.


newLink

public void newLink(ParameterPasser params)
See Also:
newLink(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall)

param

public void param(org.apache.xalan.extensions.XSLProcessorContext context,
                  org.apache.xalan.templates.ElemExtensionCall elem)
Add the given param to the link. Two attributes can be given. "name" is a required parameter name and "value" is an optional value which can override the XSLT parameter's value.


param

public void param(java.lang.String name,
                  javax.servlet.ServletRequest request)
Get a param from the HTTP Servlet layer.

See Also:
param#

value

public void value(org.apache.xalan.extensions.XSLProcessorContext context,
                  org.apache.xalan.templates.ElemExtensionCall elem)
Similar to the param function but is given a value instead.

See Also:
param(org.apache.xalan.extensions.XSLProcessorContext, org.apache.xalan.templates.ElemExtensionCall)

value

public void value(java.lang.String name,
                  java.lang.String value)

getLink

public java.lang.String getLink()
Get the value of this computed link.


toString

public java.lang.String toString()
Same as getLink()

Overrides:
toString in class java.lang.Object

include

public void include(ParameterPasser params)
Include all params in the hashtable into this link.


include

public void include(org.apache.xalan.extensions.XSLProcessorContext context,
                    org.apache.xalan.templates.ElemExtensionCall elem)
Include all existing parameters in this new URL. This can be use if you want to add additional params to an existing URL or replace certain ones.