com.filenet.wcm.toolkit.server.util.xml

Class WcmXSLUtil

  1. java.lang.Object
  2. extended bycom.filenet.wcm.toolkit.server.util.xml.WcmXSLUtil

  1. public class WcmXSLUtil
  2. extends java.lang.Object
Base class for UI Modules that do XSLT transformations.

Nested Class Summary

Modifier and Type Class and Description
  1. static class
WcmXSLUtil.NodeSet
NodeSet is an implementation of the org.w3c.dom.NodeList interface, representing a collection of XML DOM Nodes.

Constructor Summary

Constructor and Description
WcmXSLUtil()
WcmXSLUtil(java.util.Locale locale)

Method Summary

Modifier and Type Method and Description
  1. static
  2. org.w3c.dom.NodeList
convertToNodeList(java.util.List values)
Converts a List with String objects into a NodeList with text nodes.
  1. static
  2. org.w3c.dom.NodeList
convertToNodeList(java.lang.String[] valuesArray)
Converts String array into a NodeList with text nodes.
  1. java.lang.Object
getXML()
Returns the source XML in the format it was orignially set in setXML() method.
  1. java.lang.Object
getXSLParameter(java.lang.String key)
Returns previously set XSL Parameter.
  1. void
setClientLocale(java.util.Locale clientLocale)
Sets clientLocale parameter
  1. static
  2. void
setRefreshInterval(long value)
Sets the update interval for XSL files
  1. void
setXML(org.w3c.dom.Document document)
Sets the source XML as Document.
  1. void
setXML(java.io.InputStream inputStream)
Sets the source XML as InputStream
  1. void
setXML(java.io.Reader reader)
Sets the source XML as Reader
  1. void
setXML(java.lang.String str)
Sets the source XML as String.
  1. void
setXSL(java.lang.String xslFile)
Sets the XSL File to use for the transformation.
  1. void
setXSLParameter(java.lang.String key,boolean value)
Sets XSL Parameter as boolean.
  1. void
setXSLParameter(java.lang.String key,double value)
Sets XSL Parameter as double.
  1. void
setXSLParameter(java.lang.String key,org.w3c.dom.Node node)
Sets XSL Parameter as Node.
  1. void
setXSLParameter(java.lang.String key,org.w3c.dom.NodeList nodes)
Sets XSL Parameter as NodeList.
  1. void
setXSLParameter(java.lang.String key,java.lang.Object value)
Sets XSL Parameter as Object.
  1. void
setXSLParameter(java.lang.String key,java.lang.String value)
Sets XSL Parameter as String.
  1. void
setXSLRelative(java.lang.String xslFile)
Sets the XSL File to use for the transformation.
  1. void
tranform(java.io.Writer w)
Deprecated. Use transform(Writer w)
  1. void
transform(java.io.Writer w)
Writes out the results of the transformation.
  1. org.w3c.dom.Document
transformToDom()
Writes out the results of the transformation to XML DOM.
  1. java.lang.String
transformToString()
Writes out the results of the transformation to a string.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

WcmXSLUtil

  1. public WcmXSLUtil()

WcmXSLUtil

  1. public WcmXSLUtil(java.util.Locale locale)

Method Detail

setRefreshInterval

  1. public static void setRefreshInterval( long value)
Sets the update interval for XSL files
Parameters:
value - value in milliseconds

getXML

  1. public final java.lang.Object getXML( )
Returns the source XML in the format it was orignially set in setXML() method.
Returns:
Object with the source XML

setXSL

  1. public final void setXSL(java.lang.String xslFile)
  2. throws java.lang.Exception
Sets the XSL File to use for the transformation.
Parameters:
xslFile - The fully qualified path to the XSL file.
Throws:
java.lang.Exception

setXSLRelative

  1. public final void setXSLRelative( java.lang.String xslFile)
  2. throws java.lang.Exception
Sets the XSL File to use for the transformation.
Parameters:
xslFile - The path to the XSL file as a resource within the web application (relative to the application root).
Throws:
java.lang.Exception

setXML

  1. public final void setXML(java.lang.String str)
Sets the source XML as String.
Parameters:
str - Source XML in a String

setXML

  1. public final void setXML(org.w3c.dom.Document document)
Sets the source XML as Document.
Parameters:
document - Source XML in DOM Document

setXML

  1. public final void setXML(java.io.InputStream inputStream)
Sets the source XML as InputStream
Parameters:
inputStream - InputStream object with the source XML

setXML

  1. public final void setXML(java.io.Reader reader)
Sets the source XML as Reader
Parameters:
reader - Reader object with the source XML

tranform

  1. public void tranform(java.io.Writer w)
  2. throws java.lang.Exception
Deprecated. Use transform(Writer w)
Writes out the results of the transformation.
Parameters:
w - Writer object where the results will be written
Throws:
java.lang.Exception - If there are any errors in the transformation

transform

  1. public void transform(java.io.Writer w)
  2. throws java.lang.Exception
Writes out the results of the transformation.
Parameters:
w - Writer object where the results will be written
Throws:
java.lang.Exception - If there are any errors in the transformation

transformToDom

  1. public org.w3c.dom.Document transformToDom( )
  2. throws java.lang.Exception
Writes out the results of the transformation to XML DOM.
Returns:
The result XML DOM Document.
Throws:
java.lang.Exception - If there were any errors in the transformation.

transformToString

  1. public java.lang.String transformToString( )
  2. throws java.lang.Exception
Writes out the results of the transformation to a string.
Returns:
The result XML String.
Throws:
java.lang.Exception - If there were any errors in the transformation.

setXSLParameter

  1. public final void setXSLParameter( java.lang.String key,
  2. boolean value)
Sets XSL Parameter as boolean.
Parameters:
key - Key
value - Boolean value

setXSLParameter

  1. public final void setXSLParameter( java.lang.String key,
  2. double value)
Sets XSL Parameter as double.
Parameters:
key - Key
value - Double value

setXSLParameter

  1. public final void setXSLParameter( java.lang.String key,
  2. org.w3c.dom.NodeList nodes)
Sets XSL Parameter as NodeList.
Parameters:
key - Key
nodes - NodeList value

setXSLParameter

  1. public final void setXSLParameter( java.lang.String key,
  2. org.w3c.dom.Node node)
Sets XSL Parameter as Node.
Parameters:
key - Key
node - Node value

setXSLParameter

  1. public final void setXSLParameter( java.lang.String key,
  2. java.lang.Object value)
Sets XSL Parameter as Object.
Parameters:
key - Key
value - Object value

setXSLParameter

  1. public final void setXSLParameter( java.lang.String key,
  2. java.lang.String value)
Sets XSL Parameter as String.
Parameters:
key - Key
value - String value

getXSLParameter

  1. public final java.lang.Object getXSLParameter( java.lang.String key)
Returns previously set XSL Parameter.
Parameters:
key - parameter name
Returns:
XObject with the parameter value

setClientLocale

  1. public final void setClientLocale( java.util.Locale clientLocale)
Sets clientLocale parameter
Parameters:
clientLocale - object

convertToNodeList

  1. public static final org.w3c.dom.NodeList convertToNodeList( java.lang.String[] valuesArray)
Converts String array into a NodeList with text nodes.
Parameters:
valuesArray - A string array to be converted
Returns:
NodeList of text nodes containing the values of the String array

convertToNodeList

  1. public static final org.w3c.dom.NodeList convertToNodeList( java.util.List values)
Converts a List with String objects into a NodeList with text nodes.
Parameters:
values - A List of String objects to be converted
Returns:
NodeList of text nodes containing the values of the List