com.filenet.wcm.toolkit.server.util.xml
Class WcmXSLUtil
- java.lang.Object
com.filenet.wcm.toolkit.server.util.xml.WcmXSLUtil
- public class WcmXSLUtil
- extends java.lang.Object
Nested Class Summary
| Modifier and Type | Class and Description |
|---|---|
|
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 |
|---|---|
|
convertToNodeList(java.util.List values)
Converts a List with String objects into a NodeList with text nodes.
|
|
convertToNodeList(java.lang.String[] valuesArray)
Converts String array into a NodeList with text nodes.
|
|
getXML()
Returns the source XML in the format it was orignially set in setXML() method.
|
|
getXSLParameter(java.lang.String key)
Returns previously set XSL Parameter.
|
|
setClientLocale(java.util.Locale clientLocale)
Sets clientLocale parameter
|
|
setRefreshInterval(long value)
Sets the update interval for XSL files
|
|
setXML(org.w3c.dom.Document document)
Sets the source XML as Document.
|
|
setXML(java.io.InputStream inputStream)
Sets the source XML as InputStream
|
|
setXML(java.io.Reader reader)
Sets the source XML as Reader
|
|
setXML(java.lang.String str)
Sets the source XML as String.
|
|
setXSL(java.lang.String xslFile)
Sets the XSL File to use for the transformation.
|
|
setXSLParameter(java.lang.String key,boolean value)
Sets XSL Parameter as boolean.
|
|
setXSLParameter(java.lang.String key,double value)
Sets XSL Parameter as double.
|
|
setXSLParameter(java.lang.String key,org.w3c.dom.Node node)
Sets XSL Parameter as Node.
|
|
setXSLParameter(java.lang.String key,org.w3c.dom.NodeList nodes)
Sets XSL Parameter as NodeList.
|
|
setXSLParameter(java.lang.String key,java.lang.Object value)
Sets XSL Parameter as Object.
|
|
setXSLParameter(java.lang.String key,java.lang.String value)
Sets XSL Parameter as String.
|
|
setXSLRelative(java.lang.String xslFile)
Sets the XSL File to use for the transformation.
|
|
tranform(java.io.Writer w)
Deprecated. Use transform(Writer w)
|
|
transform(java.io.Writer w)
Writes out the results of the transformation.
|
|
transformToDom()
Writes out the results of the transformation to XML DOM.
|
|
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
- public WcmXSLUtil()
WcmXSLUtil
- public WcmXSLUtil(java.util.Locale locale)
Method Detail
setRefreshInterval
- public static void setRefreshInterval( long value)
Sets the update interval for XSL files
Parameters:
value - value in milliseconds getXML
- 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
- public final void setXSL(java.lang.String xslFile)
- 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.ExceptionsetXSLRelative
- public final void setXSLRelative( java.lang.String xslFile)
- 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.ExceptionsetXML
- public final void setXML(java.lang.String str)
Sets the source XML as String.
Parameters:
str - Source XML in a String setXML
- public final void setXML(org.w3c.dom.Document document)
Sets the source XML as Document.
Parameters:
document - Source XML in DOM Document setXML
- public final void setXML(java.io.InputStream inputStream)
Sets the source XML as InputStream
Parameters:
inputStream - InputStream object with the source XML setXML
- public final void setXML(java.io.Reader reader)
Sets the source XML as Reader
Parameters:
reader - Reader object with the source XML tranform
- public void tranform(java.io.Writer w)
- 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
- public void transform(java.io.Writer w)
- 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
- public org.w3c.dom.Document transformToDom( )
- 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
- public java.lang.String transformToString( )
- 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
- public final void setXSLParameter( java.lang.String key,
- boolean value)
Sets XSL Parameter as boolean.
Parameters:
key - Key value - Boolean value setXSLParameter
- public final void setXSLParameter( java.lang.String key,
- double value)
Sets XSL Parameter as double.
Parameters:
key - Key value - Double value setXSLParameter
- public final void setXSLParameter( java.lang.String key,
- org.w3c.dom.NodeList nodes)
Sets XSL Parameter as NodeList.
Parameters:
key - Key nodes - NodeList value setXSLParameter
- public final void setXSLParameter( java.lang.String key,
- org.w3c.dom.Node node)
Sets XSL Parameter as Node.
Parameters:
key - Key node - Node value setXSLParameter
- public final void setXSLParameter( java.lang.String key,
- java.lang.Object value)
Sets XSL Parameter as Object.
Parameters:
key - Key value - Object value setXSLParameter
- public final void setXSLParameter( java.lang.String key,
- java.lang.String value)
Sets XSL Parameter as String.
Parameters:
key - Key value - String value getXSLParameter
- 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
- public final void setClientLocale( java.util.Locale clientLocale)
Sets clientLocale parameter
Parameters:
clientLocale - object convertToNodeList
- 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
- 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