wt.query.template
Class URLGenerator

java.lang.Object
  extended bywt.query.template.URLGenerator

public class URLGenerator
extends Object

Generates a string that can be used as a URL and serves as an XSLT extension function implementation.


Constructor Summary
URLGenerator()
           
 
Method Summary
private static String genAppDataHref(String objClassname, double objectId)
          Creates an ApplicationData url
private static String genMailToHref(String objClassname, double objectId)
          Creates an email url
private static String genObjectHref(NodeList sourceGateway, NodeList resultNode, String objClassname, int objectId)
          Creates an object url
static String genURL(NodeList sourceGateway, NodeList resultNode)
          Generates url to the resultNode based on what type of object it is.
static String genURL(URLGenerator ug, NodeList sourceGateway, NodeList resultNode)
          At one time Xalan had a bug wherein calls to static extension functions would be made with an extra 1st argument via reflection is such a way that the first argument must be the extension function class, though a null is always passed.
private static String genVersionHref(NodeList sourceGateway, NodeList resultNode, String objClassname, int branchId)
          Creates a version url
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLGenerator

public URLGenerator()
Method Detail

genURL

public static String genURL(NodeList sourceGateway,
                            NodeList resultNode)
Generates url to the resultNode based on what type of object it is.

Returns:
String - Returns the url to the resultNode object. If there were any problems creating the url, it returns the string "null", so the stylesheet knows not to display a bad link.

genURL

public static String genURL(URLGenerator ug,
                            NodeList sourceGateway,
                            NodeList resultNode)
At one time Xalan had a bug wherein calls to static extension functions would be made with an extra 1st argument via reflection is such a way that the first argument must be the extension function class, though a null is always passed. This variation of genURL() exists solely as a workaround to this bug.


genAppDataHref

private static String genAppDataHref(String objClassname,
                                     double objectId)
                              throws Exception
Creates an ApplicationData url

Throws:
Throws - an Exception is there were any problems creating the url
Exception

genMailToHref

private static String genMailToHref(String objClassname,
                                    double objectId)
                             throws Exception
Creates an email url

Throws:
Throws - an Exception if there were any problems creating the url
Exception

genVersionHref

private static String genVersionHref(NodeList sourceGateway,
                                     NodeList resultNode,
                                     String objClassname,
                                     int branchId)
                              throws Exception
Creates a version url

Throws:
Throws - an Exception if there were any problems creating the url
Exception

genObjectHref

private static String genObjectHref(NodeList sourceGateway,
                                    NodeList resultNode,
                                    String objClassname,
                                    int objectId)
                             throws Exception
Creates an object url

Throws:
Throws - an Exception if there were any problems creating the url
Exception