wt.query.template
Class ReportTemplateHelper

java.lang.Object
  extended bywt.query.template.ReportTemplateHelper
All Implemented Interfaces:
RemoteAccess

public class ReportTemplateHelper
extends Object
implements RemoteAccess

This is a helper class which contains the implementation for processing XML Source which defines a report.

Supported API: true

Extendable: false


Nested Class Summary
(package private) static class ReportTemplateHelper.ReportApplicationContext
           
 
Field Summary
private static String[] adminAccessGroupNames
           
private static String CLASSNAME
           
private static ReportTemplateHelper.ReportApplicationContext CONTEXT
           
private static String CSV_EXTENSION
           
private static String CSV_MIME_TYPE
           
static String DELEGATE_NAME_KEY
           
private static char DOT
           
private static Hashtable EXTENSION_MAP
           
private static String FC_RESOURCE
           
static String FORMAT_TYPE_CUSTOM
           
static String FORMAT_TYPE_DELEGATE
           
static String FORMAT_TYPE_KEY
           
private static String HTML_EXTENSION
           
private static String HTML_MIME_TYPE
           
static String JAVA_RESOURCE_BUNDLE_KEY
           
private static String NULL_XSL_PATH
           
static String OID_KEY
           
private static Object PARAMETER_LOCALE_KEY
           
static String PARAMETER_NAME_ENCODING_TYPE
           
private static String PARAMETER_TIMESTAMP_FORMAT
           
private static String PARAMETER_TIMESTAMP_TIMEZONE_FORMAT
           
static String POST_PROC_PREF_NODE
           
private static String QUERY_CLASS_NAME_RESOURCE_SERVICE_NAME
           
private static ReferenceFactory REFERENCE_FACTORY
           
static String REPORT_PROCESSOR_ACTION
           
static String REPORT_PROCESSOR_EXECUTE
           
static String REPORT_PROCESSOR_EXECUTE_METHOD_NAME
           
static String REPORT_PROCESSOR_PRODUCE
           
private static String RESOURCE
           
(package private) static boolean SERVER
           
private static char SLASH
           
private static StatementFactory STATEMENT_FACTORY
           
private static String SVG_EXTENSION
           
private static String SVG_MIME_TYPE
           
private static String TSV_EXTENSION
           
private static String TSV_MIME_TYPE
           
private static String URL_PROCESSOR_NAME
           
(package private) static boolean VERBOSE
           
private static String XML_EXTENSION
           
private static String XML_MIME_TYPE
           
static String XSL_1_KEY
           
static String XSL_2_KEY
           
private static String XSL_EXTENSION
           
private static String XSL_RESOURCE_SERVICE_NAME
           
 
Fields inherited from interface wt.method.RemoteAccess
versionID
 
Constructor Summary
ReportTemplateHelper()
           
 
Method Summary
protected static String _buildSQL(String a_qmlSource, Hashtable a_inputs, Locale a_locale)
          This method is used to build the SQL representation for the QML XMLSource.
protected static boolean _checkAdvancedQueryAccess(WTContainerRef a_containerReference)
          Indicates if the current user has access to advanced query capabilities based on the specified container context.
protected static QueryResult _generateResults(String a_qmlSource, Hashtable a_inputs, Locale a_locale, WTContainerRef a_containerRef)
          This method is used to generate a QueryResult from the QML specification and locale.
protected static URL _getExecuteReportURL(Properties a_properties, ReportTemplate a_reportTemplate)
          This method is used to construct the URL to execute the report.
protected static URL _getGenerateFormURL(Properties a_properties, ReportTemplate a_reportTemplate)
          This method is used to construct the URL for the report generation form.
static void bindParameters(XMLSource a_qmlSource, StatementSpec a_statementSpec, Hashtable a_parameterMap)
          This method is used to bind parameters from a name and value Hashtable to a StatementSpec instance.
private static Vector buildColumnDefs(Node a_document, Locale a_locale)
           
static ColumnExpression buildColumnExpression(String a_value, String a_type, Locale a_locale)
           
static Hashtable buildParameterMap(ParameterTemplate[] a_parameterTemplates, Hashtable a_inputs, boolean use_defaults)
          This method is used to build a Hashtable of actual values from ParameterTemplate objects and an input Hashtable.
static ParameterTemplate buildParameterTemplate(Element a_element)
           
static ParameterTemplate[] buildParameterTemplates(XMLSource a_qmlSource)
          This method is used to build a Vector of ParameterTemplate objects from the specified XMLSource.
static String buildSQL(String a_qmlSource, Hashtable a_inputs, Locale a_locale)
          This method is used to build the SQL representation for the QML XMLSource.
static String buildSQL(XMLSource a_qmlSource, Hashtable a_inputs, Locale a_locale)
          This method is used to build the SQL representation for the QML XMLSource.
static StatementSpec buildStatement(XMLSource a_qmlSource)
          Deprecated. as of R7.0, use buildStatement(XMLSource, Locale, Hashtable)
static StatementSpec buildStatement(XMLSource a_qmlSource, Locale a_locale)
          Deprecated. as of R7.0, use buildStatement(XMLSource, Locale, Hashtable)
static StatementSpec buildStatement(XMLSource a_qmlSource, Locale a_locale, Hashtable a_parameterMap)
          This method is used to build the Statement given the QML XMLSource, locale and parameters.
private static TableModel buildTableModel(DOMXMLSource a_qmlSource, QueryResult a_queryResult, Hashtable a_inputs, Locale a_locale)
           
static boolean checkAdvancedQueryAccess(WTContainerRef a_containerReference)
          Indicates if the current user has access to advanced query capabilities based on the specified container context.
static String concatMediaTypeAndEncoding(String mediaType, String encoding)
          Concatenate a MIME type string (without encoding information) and encoding information.
static DOMXMLSource convertToDOM(XMLSource a_qmlSource)
          This method converts the QML XMLSource to a DOM Source.
static ReaderXMLSource convertToReader(String a_qmlSource)
          This method converts the string to a ReaderXMLSource.
static SAXXMLSource convertToSAX(XMLSource a_qmlSource)
          This method converts the QML XMLSource to a SAX Source.
static XMLSource generateReport(ReportTemplate a_reportTemplate, Hashtable params, Locale locale)
          This method generates a standard report in XML format.
static XMLSource generateReport(ReportTemplate a_reportTemplate, Hashtable params, Locale locale, XMLSource resultSource)
          This method generates a standard report in XML format.
private static QueryResult generateResults(DOMXMLSource a_qmlSource, Hashtable a_inputs, boolean a_bypassAccessControl, Locale a_locale)
           
static QueryResult generateResults(ReportTemplate a_reportTemplate, Hashtable a_inputs)
          Deprecated. as of R7.0, use generateResults(ReportTemplate, Hashtable, Locale)
static QueryResult generateResults(ReportTemplate a_reportTemplate, Hashtable a_inputs, Locale a_locale)
          This method is used to generate a QueryResult from the Report Template and locale.
static QueryResult generateResults(String a_qmlSource, Hashtable a_inputs)
          Deprecated. as of 7.0, use generateResults(String, Hashtable, Locale, WTContainerRef)
static QueryResult generateResults(String a_qmlSource, Hashtable a_inputs, Locale a_locale)
          Deprecated. as of R7.0, use generateResults(String, Hashtable, Locale, WTContainerRef)
static QueryResult generateResults(String a_qmlSource, Hashtable a_inputs, Locale a_locale, WTContainerRef a_containerRef)
          This method is used to generate a QueryResult from the QML specification and locale.
static QueryResult generateResults(XMLSource a_qmlSource, Hashtable a_inputs)
          Deprecated. as of R7.0, use generateResults(XMLSource, Hashtable, Locale, WTContainerRef)
static QueryResult generateResults(XMLSource a_qmlSource, Hashtable a_inputs, Locale a_locale)
          Deprecated. Use generateResults(XMLSource, Hashtable, Locale, WTContainerRef)
static QueryResult generateResults(XMLSource a_qmlSource, Hashtable a_inputs, Locale a_locale, WTContainerRef a_containerRef)
          This method is used to generate a QueryResult from the QML specification and locale.
(package private) static QueryResult generateResultsNoCriteriaDrop(ReportTemplate a_reportTemplate, Hashtable a_inputs, Locale a_locale)
           
static TableModel generateTableModel(ReportTemplate a_ReportTemplate, Hashtable a_inputs)
          Deprecated. as of R7.0, use generateTableModel(ReportTemplate, Hashtable, Locale)
static TableModel generateTableModel(ReportTemplate a_ReportTemplate, Hashtable a_inputs, Locale a_locale)
          This method is used to generate a TableModel from a Report Template and parameter input values.
static TableModel generateTableModel(String a_qmlSource, Hashtable a_inputs)
          Deprecated. as of R7.0, use generateTableModel(String, Hashtable, Locale, WTContainerRef)
static TableModel generateTableModel(String a_qmlSource, Hashtable a_inputs, Locale a_locale)
          Deprecated. as of R7.0, use generateTableModel(String, Hashtable, Locale, WTContainerRef)
static TableModel generateTableModel(String a_qmlSource, Hashtable a_inputs, Locale a_locale, WTContainerRef a_containerRef)
          This method is used to generate a TableModel from QML source and parameter input values.
static TableModel generateTableModel(XMLSource a_qmlSource, Hashtable a_inputs)
          Deprecated. as of R7.0, use generateTableModel(XMLSource, Hashtable, Locale, WTContainerRef)
static TableModel generateTableModel(XMLSource a_qmlSource, Hashtable a_inputs, Locale a_locale)
          Deprecated. as of R7.0, use generateTableModel(XMLSource, Hashtable, Locale, WTContainerRef)
static TableModel generateTableModel(XMLSource a_qmlSource, Hashtable a_inputs, Locale a_locale, WTContainerRef a_containerRef)
          This method is used to generate a TableModel from QML source and parameter input values.
static XMLSource generateXML(ReportTemplate a_reportTemplate, Hashtable a_inputs)
          Deprecated. as of R7.0, use generateXML(ReportTemplate, Hashtable, Locale)
static XMLSource generateXML(ReportTemplate a_reportTemplate, Hashtable a_inputs, Locale a_locale)
          This method takes a Report Template as input and is used to execute the report query and return the results as an XMLSource.
static XMLSource generateXML(XMLSource a_qmlSource, Hashtable a_inputs)
          Deprecated. as of R7.0, use generateXML(XMLSource, Hashtable, Locale)
static XMLSource generateXML(XMLSource a_qmlSource, Hashtable a_inputs, Locale a_locale)
          This method takes a Report Template and paramters as input and is used to execute the report query and return the results as an XMLSource.
static Enumeration getAvailableMacros()
          Return an enumeration of available macros that can be used in ParameterTemplate processing.
static Enumeration getAvailableXSLFormats()
          Deprecated. as of 8.0, use getAvailableXSLFormats(Locale)
static List getAvailableXSLFormats(Locale a_locale)
          Return an List of available XSL formats that can be used in report processing.
(package private) static boolean getBypassAccessControl(DOMXMLSource a_qmlSource)
          Determine whether QML either explicitly calls for access control to be by-passed or requires that access control be by-passed for the features used therein.
static String getDataFormatExtension(String a_outputMimeType)
           
static URL getExecuteReportURL()
          Deprecated. as of 7.0, use getExecuteReportURL(Properties, ReportTemplate)
static URL getExecuteReportURL(Properties a_properties)
          Deprecated. as of 7.0, use getExecuteReportURL(Properties, ReportTemplate)
static URL getExecuteReportURL(Properties a_properties, ReportTemplate a_reportTemplate)
          This method is used to construct the URL to execute the report.
static String getFileTypeExtension(String a_outputMimeType)
          This method will set the file extension type for the MIME type.
static URL getGenerateFormURL()
          Deprecated. as of 7.0, use getGenerateFormURL(Properties, ReportTemplate)
static URL getGenerateFormURL(Properties a_properties)
          Deprecated. as of 7.0, use getGenerateFormURL(Properties, ReportTemplate)
static URL getGenerateFormURL(Properties a_properties, ReportTemplate a_reportTemplate)
          This method is used to construct the URL for the report generation form.
static Locale getLocale(Map a_parameterMap)
           
static ColumnExpression getMacroExpression(Element a_element, Object a_macro)
           
static MacroExpressionProcessor getMacroExpressionProcessor(Object a_macroName)
           
private static Object getParameterValue(ParameterTemplate a_parameterTemplate, Hashtable a_inputs, boolean a_useDefault)
           
static ReportPostProcessor getPostProcessor(String originalMimeType)
          Get an instance of a post-processor for a given MIME type if one has been registered, else returns null.
static Enumeration getQueryClassNames()
          Return an enumeration of query class names that should be included in the list of available query classes.
static XSLTransform getTransform(XSLSpec xslSpec, XMLSource reportSource, Properties xslProperties, Locale locale)
          This method derives an XSLTransform object from the specified parameters.
(package private) static URL getURL(String a_processorMethodName, String a_actionValue, Properties a_properties, ReportTemplate a_reportTemplate)
           
static XMLSourceFactory getXMLSourceFactory()
          This method returns a default XML source factory.
static StreamXMLSource getXSLFormatStream(String a_resourceName, Locale a_locale)
          Return an StreamXMLSource for the specified XSL format.
private static String getXSLPath(String a_resourceName, Locale a_locale)
           
static XSLSpec getXSLSpec(ReportTemplate a_reportTemplate, Hashtable params)
          This method derives an XSLSpec object from the specified ReportTemplate and parameters.
private static boolean isBypassAccessControl(DOMXMLSource a_qmlSource)
          Determine whether QML explicitly calls for access control to be by-passed.
private static Date parseDate(String a_value, DateFormat a_dateFormat)
           
private static Object processOperandValue(Element a_operandChildElement, Object a_value, Locale a_locale)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

STATEMENT_FACTORY

private static final StatementFactory STATEMENT_FACTORY

SERVER

static final boolean SERVER

FC_RESOURCE

private static final String FC_RESOURCE
See Also:
Constant Field Values

POST_PROC_PREF_NODE

public static final String POST_PROC_PREF_NODE
See Also:
Constant Field Values

OID_KEY

public static final String OID_KEY
See Also:
Constant Field Values

FORMAT_TYPE_KEY

public static final String FORMAT_TYPE_KEY
See Also:
Constant Field Values

DELEGATE_NAME_KEY

public static final String DELEGATE_NAME_KEY
See Also:
Constant Field Values

XSL_1_KEY

public static final String XSL_1_KEY
See Also:
Constant Field Values

XSL_2_KEY

public static final String XSL_2_KEY
See Also:
Constant Field Values

JAVA_RESOURCE_BUNDLE_KEY

public static final String JAVA_RESOURCE_BUNDLE_KEY
See Also:
Constant Field Values

FORMAT_TYPE_DELEGATE

public static final String FORMAT_TYPE_DELEGATE
See Also:
Constant Field Values

FORMAT_TYPE_CUSTOM

public static final String FORMAT_TYPE_CUSTOM
See Also:
Constant Field Values

REPORT_PROCESSOR_EXECUTE_METHOD_NAME

public static final String REPORT_PROCESSOR_EXECUTE_METHOD_NAME
See Also:
Constant Field Values

REPORT_PROCESSOR_ACTION

public static final String REPORT_PROCESSOR_ACTION
See Also:
Constant Field Values

REPORT_PROCESSOR_EXECUTE

public static final String REPORT_PROCESSOR_EXECUTE
See Also:
Constant Field Values

REPORT_PROCESSOR_PRODUCE

public static final String REPORT_PROCESSOR_PRODUCE
See Also:
Constant Field Values

PARAMETER_NAME_ENCODING_TYPE

public static final String PARAMETER_NAME_ENCODING_TYPE
See Also:
Constant Field Values

VERBOSE

static boolean VERBOSE

adminAccessGroupNames

private static String[] adminAccessGroupNames

XSL_RESOURCE_SERVICE_NAME

private static final String XSL_RESOURCE_SERVICE_NAME
See Also:
Constant Field Values

QUERY_CLASS_NAME_RESOURCE_SERVICE_NAME

private static final String QUERY_CLASS_NAME_RESOURCE_SERVICE_NAME
See Also:
Constant Field Values

URL_PROCESSOR_NAME

private static final String URL_PROCESSOR_NAME

DOT

private static final char DOT
See Also:
Constant Field Values

SLASH

private static final char SLASH
See Also:
Constant Field Values

XSL_EXTENSION

private static final String XSL_EXTENSION
See Also:
Constant Field Values

NULL_XSL_PATH

private static final String NULL_XSL_PATH
See Also:
Constant Field Values

EXTENSION_MAP

private static final Hashtable EXTENSION_MAP

XML_EXTENSION

private static final String XML_EXTENSION
See Also:
Constant Field Values

CSV_EXTENSION

private static final String CSV_EXTENSION
See Also:
Constant Field Values

TSV_EXTENSION

private static final String TSV_EXTENSION
See Also:
Constant Field Values

HTML_EXTENSION

private static final String HTML_EXTENSION
See Also:
Constant Field Values

SVG_EXTENSION

private static final String SVG_EXTENSION
See Also:
Constant Field Values

SVG_MIME_TYPE

private static final String SVG_MIME_TYPE
See Also:
Constant Field Values

XML_MIME_TYPE

private static final String XML_MIME_TYPE
See Also:
Constant Field Values

CSV_MIME_TYPE

private static final String CSV_MIME_TYPE
See Also:
Constant Field Values

HTML_MIME_TYPE

private static final String HTML_MIME_TYPE
See Also:
Constant Field Values

TSV_MIME_TYPE

private static final String TSV_MIME_TYPE
See Also:
Constant Field Values

CONTEXT

private static final ReportTemplateHelper.ReportApplicationContext CONTEXT

REFERENCE_FACTORY

private static final ReferenceFactory REFERENCE_FACTORY

PARAMETER_TIMESTAMP_FORMAT

private static final String PARAMETER_TIMESTAMP_FORMAT
See Also:
Constant Field Values

PARAMETER_TIMESTAMP_TIMEZONE_FORMAT

private static final String PARAMETER_TIMESTAMP_TIMEZONE_FORMAT
See Also:
Constant Field Values

PARAMETER_LOCALE_KEY

private static final Object PARAMETER_LOCALE_KEY
Constructor Detail

ReportTemplateHelper

public ReportTemplateHelper()
Method Detail

buildStatement

public static StatementSpec buildStatement(XMLSource a_qmlSource)
                                    throws WTException
Deprecated. as of R7.0, use buildStatement(XMLSource, Locale, Hashtable)

This method is used to build the Statement given the QML XMLSource.

Supported API: true

Parameters:
a_qmlSource - Input QML representation of a query
Returns:
StatementSpec
Throws:
WTException

generateTableModel

public static TableModel generateTableModel(XMLSource a_qmlSource,
                                            Hashtable a_inputs)
                                     throws WTException
Deprecated. as of R7.0, use generateTableModel(XMLSource, Hashtable, Locale, WTContainerRef)

This method is used to generate a TableModel from the QML source and parameter input values. A statement is built and executed using the specified inputs. The results are then returned in the TableModel.

Supported API: true

Parameters:
a_qmlSource - Input QML representation of a query
a_inputs - Parameter input name and value pairs
Returns:
TableModel
Throws:
WTException

generateXML

public static XMLSource generateXML(XMLSource a_qmlSource,
                                    Hashtable a_inputs)
                             throws WTException
Deprecated. as of R7.0, use generateXML(XMLSource, Hashtable, Locale)

This method is used to execute the report query and return the results as an XMLSource.

Supported API: true

Parameters:
a_qmlSource - Input QML representation of a query
a_inputs - Parameter input name and value pairs
Returns:
XMLSource
Throws:
WTException

getGenerateFormURL

public static URL getGenerateFormURL()
                              throws WTException
Deprecated. as of 7.0, use getGenerateFormURL(Properties, ReportTemplate)

This method is used to construct the URL for the report generation form.

Supported API: true

Returns:
URL
Throws:
WTException

getExecuteReportURL

public static URL getExecuteReportURL()
                               throws WTException
Deprecated. as of 7.0, use getExecuteReportURL(Properties, ReportTemplate)

This method is used to construct the URL to execute the report.

Supported API: true

Returns:
URL
Throws:
WTException

buildParameterTemplates

public static ParameterTemplate[] buildParameterTemplates(XMLSource a_qmlSource)
                                                   throws WTException
This method is used to build a Vector of ParameterTemplate objects from the specified XMLSource.

Supported API: true

Parameters:
a_qmlSource - Input QML representation of a query
Returns:
ParameterTemplate[]
Throws:
WTException

buildParameterMap

public static Hashtable buildParameterMap(ParameterTemplate[] a_parameterTemplates,
                                          Hashtable a_inputs,
                                          boolean use_defaults)
                                   throws WTException
This method is used to build a Hashtable of actual values from ParameterTemplate objects and an input Hashtable.

Supported API: true

Parameters:
a_parameterTemplates - Array of ParameterTemplate instances for a report
a_inputs - Parameter input name and value pairs
use_defaults -
Returns:
Hashtable
Throws:
WTException

bindParameters

public static void bindParameters(XMLSource a_qmlSource,
                                  StatementSpec a_statementSpec,
                                  Hashtable a_parameterMap)
                           throws WTException
This method is used to bind parameters from a name and value Hashtable to a StatementSpec instance. The specified QML indicates the bind parameter offests.

Supported API: true

Parameters:
a_qmlSource - Input QML representation of a query
a_statementSpec - Bind parameter values will be bound to this instance.
a_parameterMap - Parameter input name and value pairs
Throws:
WTException

getAvailableMacros

public static Enumeration getAvailableMacros()
Return an enumeration of available macros that can be used in ParameterTemplate processing. These values are specified in a service properties file.

Supported API: true

Returns:
Enumeration

getAvailableXSLFormats

public static Enumeration getAvailableXSLFormats()
Deprecated. as of 8.0, use getAvailableXSLFormats(Locale)

Return an enumeration of available XSL formats that can be used in Report processing. These values are specified in a service properties file.

Supported API: false

Returns:
Enumeration

getXMLSourceFactory

public static XMLSourceFactory getXMLSourceFactory()
This method returns a default XML source factory.

Supported API: false

Returns:
XMLSourceFactory

getXSLFormatStream

public static StreamXMLSource getXSLFormatStream(String a_resourceName,
                                                 Locale a_locale)
Return an StreamXMLSource for the specified XSL format.

Supported API: false

Parameters:
a_resourceName -
a_locale - parameter to get Locale specific XSL
Returns:
StreamXMLSource

convertToSAX

public static SAXXMLSource convertToSAX(XMLSource a_qmlSource)
                                 throws WTException
This method converts the QML XMLSource to a SAX Source.

Supported API: false

Parameters:
a_qmlSource - Input QML representation of a query
Returns:
SAXXMLSource
Throws:
WTException

getGenerateFormURL

public static URL getGenerateFormURL(Properties a_properties)
                              throws WTException
Deprecated. as of 7.0, use getGenerateFormURL(Properties, ReportTemplate)

This method is used to construct the URL for the report generation form.

Supported API: true

Parameters:
a_properties - Additional properties to include in the URL.
Returns:
URL
Throws:
WTException

getExecuteReportURL

public static URL getExecuteReportURL(Properties a_properties)
                               throws WTException
Deprecated. as of 7.0, use getExecuteReportURL(Properties, ReportTemplate)

This method is used to construct the URL to execute the report.

Supported API: true

Parameters:
a_properties - Additional properties to include in the URL.
Returns:
URL
Throws:
WTException

getGenerateFormURL

public static URL getGenerateFormURL(Properties a_properties,
                                     ReportTemplate a_reportTemplate)
                              throws WTException
This method is used to construct the URL for the report generation form.

Supported API: true

Parameters:
a_properties - Additional properties to include in the URL. If null, then no additional properties are added.
a_reportTemplate - Context object for the URL. If null, then the context object is not added.
Returns:
URL
Throws:
WTException

_getGenerateFormURL

protected static URL _getGenerateFormURL(Properties a_properties,
                                         ReportTemplate a_reportTemplate)
                                  throws WTException
This method is used to construct the URL for the report generation form.

Supported API: true

Parameters:
a_properties - Additional properties to include in the URL. If null, then no additional properties are added.
a_reportTemplate - Context object for the URL. If null, then the context object is not added.
Returns:
URL
Throws:
WTException

getExecuteReportURL

public static URL getExecuteReportURL(Properties a_properties,
                                      ReportTemplate a_reportTemplate)
                               throws WTException
This method is used to construct the URL to execute the report.

Supported API: true

Parameters:
a_properties - Additional properties to include in the URL. If null, then no additional properties are added.
a_reportTemplate - Context object for the URL. If null, then the context object is not added.
Returns:
URL
Throws:
WTException

_getExecuteReportURL

protected static URL _getExecuteReportURL(Properties a_properties,
                                          ReportTemplate a_reportTemplate)
                                   throws WTException
This method is used to construct the URL to execute the report.

Supported API: true

Parameters:
a_properties - Additional properties to include in the URL. If null, then no additional properties are added.
a_reportTemplate - Context object for the URL. If null, then the context object is not added.
Returns:
URL
Throws:
WTException

convertToReader

public static ReaderXMLSource convertToReader(String a_qmlSource)
                                       throws WTException
This method converts the string to a ReaderXMLSource.

Supported API: false

Parameters:
a_qmlSource - Input QML representation of a query
Returns:
ReaderXMLSource
Throws:
WTException

convertToDOM

public static DOMXMLSource convertToDOM(XMLSource a_qmlSource)
                                 throws WTException
This method converts the QML XMLSource to a DOM Source.

Supported API: false

Parameters:
a_qmlSource - Input QML representation of a query
Returns:
DOMXMLSource
Throws:
WTException

buildSQL

public static String buildSQL(String a_qmlSource,
                              Hashtable a_inputs,
                              Locale a_locale)
                       throws WTException
This method is used to build the SQL representation for the QML XMLSource.

Supported API: false

Parameters:
a_qmlSource - QML to use to build SQL.
a_inputs - Parameter inputs to use. If null, then empty criteria are not dropped.
a_locale - Locale for display messages.
Returns:
String
Throws:
WTException

_buildSQL

protected static String _buildSQL(String a_qmlSource,
                                  Hashtable a_inputs,
                                  Locale a_locale)
                           throws WTException
This method is used to build the SQL representation for the QML XMLSource.

Supported API: false

Parameters:
a_qmlSource - QML to use to build SQL.
a_inputs - Parameter inputs to use. If null, then empty criteria are not dropped.
a_locale - Locale for display messages.
Returns:
String
Throws:
WTException

generateResults

public static QueryResult generateResults(XMLSource a_qmlSource,
                                          Hashtable a_inputs)
                                   throws WTException
Deprecated. as of R7.0, use generateResults(XMLSource, Hashtable, Locale, WTContainerRef)

This method is used to generate a QueryResult from the QML specification. A statement is built and executed and the QueryResult is returned. This method can be called from the client and will be indirectly executed remotely.

Supported API: true

Parameters:
a_qmlSource - Input QML representation of a query
a_inputs - Parameter input name and value pairs
Returns:
QueryResult
Throws:
WTException

generateTableModel

public static TableModel generateTableModel(String a_qmlSource,
                                            Hashtable a_inputs)
                                     throws WTException
Deprecated. as of R7.0, use generateTableModel(String, Hashtable, Locale, WTContainerRef)

This method is used to generate a TableModel from the QML specification. A statement is built and executed The results are then returned in the TableModel. This method can be called from the client and will be indirectly executed remotely.

Supported API: true

Parameters:
a_qmlSource - Input QML representation of a query
a_inputs - Parameter input name and value pairs
Returns:
TableModel
Throws:
WTException

generateResults

public static QueryResult generateResults(String a_qmlSource,
                                          Hashtable a_inputs)
                                   throws WTException
Deprecated. as of 7.0, use generateResults(String, Hashtable, Locale, WTContainerRef)

This method is used to generate a QueryResult from the QML specification. A statement is built and executed and the QueryResult is returned.

Supported API: true

Parameters:
a_qmlSource - Input QML representation of a query
a_inputs - Parameter input name and value pairs
Returns:
QueryResult
Throws:
WTException

generateResults

public static QueryResult generateResults(ReportTemplate a_reportTemplate,
                                          Hashtable a_inputs)
                                   throws WTException
Deprecated. as of R7.0, use generateResults(ReportTemplate, Hashtable, Locale)

This method is used to generate a QueryResult from the Report Template. A statement is built and executed and the QueryResult is returned. This method can be called from the client and will be indirectly executed remotely.

Supported API: true

Parameters:
a_reportTemplate -
a_inputs - Parameter input name and value pairs
Returns:
QueryResult
Throws:
WTException

generateXML

public static XMLSource generateXML(ReportTemplate a_reportTemplate,
                                    Hashtable a_inputs)
                             throws WTException
Deprecated. as of R7.0, use generateXML(ReportTemplate, Hashtable, Locale)

This method takes a Report Template as input and is used to execute the report query and return the results as an XMLSource.

Supported API: true

Parameters:
a_reportTemplate -
a_inputs -
Returns:
XMLSource
Throws:
WTException

generateTableModel

public static TableModel generateTableModel(ReportTemplate a_ReportTemplate,
                                            Hashtable a_inputs,
                                            Locale a_locale)
                                     throws WTException
This method is used to generate a TableModel from a Report Template and parameter input values. A statement is built and executed using the specified inputs. The results are then returned in the TableModel.

Supported API: true

Parameters:
a_ReportTemplate -
a_inputs -
a_locale -
Returns:
TableModel
Throws:
WTException

generateReport

public static XMLSource generateReport(ReportTemplate a_reportTemplate,
                                       Hashtable params,
                                       Locale locale)
                                throws WTException
This method generates a standard report in XML format.

Supported API: true

Parameters:
a_reportTemplate - ReportTemplate instance to use as the report source
params - Parameter arguments to use as input for the report query.
locale - Locale to use for localized text
Returns:
XMLSource
Throws:
WTException

getXSLSpec

public static XSLSpec getXSLSpec(ReportTemplate a_reportTemplate,
                                 Hashtable params)
                          throws WTException
This method derives an XSLSpec object from the specified ReportTemplate and parameters. The input parameters are used initially. If the format type (key="format") is custom (value="formatCustom"), then the XSL URLs specified by the keys, "xsl1" and "xsl2" are used. If the format type is delegate (value="formatDelegate"), then the delegate name specified by the key, "delegateName", is used to look up an XSL resource using Application Context Services. The resource name is used to reference the XSL file relative to codebase. If these parameters are not specified, then the XSL is obtained from the ReportTemplate. Finally, if this XSL value is null, then a simple HTML XSL specification is returned.

Supported API: true

Parameters:
a_reportTemplate - ReportTemplate object to derive the XSLSpec from.
params - Parameters to use to derive XSLSpec.
Returns:
XSLSpec instance to use as an XSL transform for the report.
Throws:
WTException

getTransform

public static XSLTransform getTransform(XSLSpec xslSpec,
                                        XMLSource reportSource,
                                        Properties xslProperties,
                                        Locale locale)
                                 throws WTException
This method derives an XSLTransform object from the specified parameters. The XSLSpec instance is used to determine the XSL transformations that are applied to the report source. The xslProperties are passed to the factory instance that creates the XSLTransform objects.

Supported API: true

Parameters:
xslSpec - Specifies the XSL transforms that will be applied.
reportSource - Report source that will be transformed.
xslProperties - Properties passed to the factory creating the XSLTransform objects.
locale - Specifies the Locale that will be applied.
Returns:
XSLTransform that will generate the report source transformation.
Throws:
WTException

generateReport

public static XMLSource generateReport(ReportTemplate a_reportTemplate,
                                       Hashtable params,
                                       Locale locale,
                                       XMLSource resultSource)
                                throws WTException
This method generates a standard report in XML format.

Supported API: true

Parameters:
a_reportTemplate - ReportTemplate instance to use as the report source
params - Parameter arguments to use as input for the report query.
locale - Locale to use for localized text
resultSource - Result XML source to use in the report
Returns:
XMLSource
Throws:
WTException

generateXML

public static XMLSource generateXML(ReportTemplate a_reportTemplate,
                                    Hashtable a_inputs,
                                    Locale a_locale)
                             throws WTException
This method takes a Report Template as input and is used to execute the report query and return the results as an XMLSource. In addition, the locale is made available for localization of the data.

Supported API: true

Parameters:
a_reportTemplate -
a_inputs -
a_locale -
Returns:
XMLSource
Throws:
WTException

generateTableModel

public static TableModel generateTableModel(ReportTemplate a_ReportTemplate,
                                            Hashtable a_inputs)
                                     throws WTException
Deprecated. as of R7.0, use generateTableModel(ReportTemplate, Hashtable, Locale)

This method is used to generate a TableModel from a Report Template and parameter input values. A statement is built and executed using the specified inputs. The results are then returned in the TableModel.

Supported API: true

Parameters:
a_ReportTemplate -
a_inputs -
Returns:
TableModel
Throws:
WTException

generateTableModel

public static TableModel generateTableModel(XMLSource a_qmlSource,
                                            Hashtable a_inputs,
                                            Locale a_locale,
                                            WTContainerRef a_containerRef)
                                     throws WTException
This method is used to generate a TableModel from QML source and parameter input values. A statement is built and executed using the specified inputs. The results are then returned in the TableModel.

Supported API: true

Parameters:
a_qmlSource -
a_inputs -
a_locale -
a_containerRef - The container context to execute this query in.
Returns:
TableModel
Throws:
WTException

generateXML

public static XMLSource generateXML(XMLSource a_qmlSource,
                                    Hashtable a_inputs,
                                    Locale a_locale)
                             throws WTException
This method takes a Report Template and paramters as input and is used to execute the report query and return the results as an XMLSource.

Supported API: true

Parameters:
a_qmlSource -
a_inputs -
a_locale -
Returns:
XMLSource
Throws:
WTException

generateTableModel

public static TableModel generateTableModel(String a_qmlSource,
                                            Hashtable a_inputs,
                                            Locale a_locale,
                                            WTContainerRef a_containerRef)
                                     throws WTException
This method is used to generate a TableModel from QML source and parameter input values. A statement is built and executed using the specified inputs. The results are then returned in the TableModel.

Supported API: true

Parameters:
a_qmlSource -
a_inputs -
a_locale -
a_containerRef - The container context to execute this query in.
Returns:
TableModel
Throws:
WTException

generateResults

public static QueryResult generateResults(String a_qmlSource,
                                          Hashtable a_inputs,
                                          Locale a_locale,
                                          WTContainerRef a_containerRef)
                                   throws WTException
This method is used to generate a QueryResult from the QML specification and locale. A statement is built and executed and the QueryResult is returned. This method can be called from the client and will be indirectly executed remotely.

Supported API: true

Parameters:
a_qmlSource -
a_inputs -
a_locale -
a_containerRef - The container context to execute this query in.
Returns:
QueryResult
Throws:
WTException

_generateResults

protected static QueryResult _generateResults(String a_qmlSource,
                                              Hashtable a_inputs,
                                              Locale a_locale,
                                              WTContainerRef a_containerRef)
                                       throws WTException
This method is used to generate a QueryResult from the QML specification and locale. A statement is built and executed and the QueryResult is returned. This method can be called from the client and will be indirectly executed remotely.

Supported API: true

Parameters:
a_qmlSource -
a_inputs -
a_locale -
a_containerRef - The container context to execute this query in.
Returns:
QueryResult
Throws:
WTException

generateResults

public static QueryResult generateResults(ReportTemplate a_reportTemplate,
                                          Hashtable a_inputs,
                                          Locale a_locale)
                                   throws WTException
This method is used to generate a QueryResult from the Report Template and locale. A statement is built and executed and the QueryResult is returned. This method can be called from the client and will be indirectly executed remotely.

Supported API: true

Parameters:
a_reportTemplate -
a_inputs -
a_locale -
Returns:
QueryResult
Throws:
WTException

generateResults

public static QueryResult generateResults(XMLSource a_qmlSource,
                                          Hashtable a_inputs,
                                          Locale a_locale,
                                          WTContainerRef a_containerRef)
                                   throws WTException
This method is used to generate a QueryResult from the QML specification and locale. A statement is built and executed and the QueryResult is returned. This method can be called from the client and will be indirectly executed remotely.

Supported API: true

Parameters:
a_qmlSource -
a_inputs -
a_locale -
a_containerRef - The container context to execute this query in.
Returns:
QueryResult
Throws:
WTException

buildStatement

public static StatementSpec buildStatement(XMLSource a_qmlSource,
                                           Locale a_locale,
                                           Hashtable a_parameterMap)
                                    throws WTException
This method is used to build the Statement given the QML XMLSource, locale and parameters.

Supported API: true

Parameters:
a_qmlSource -
a_locale -
a_parameterMap -
Returns:
StatementSpec
Throws:
WTException

buildStatement

public static StatementSpec buildStatement(XMLSource a_qmlSource,
                                           Locale a_locale)
                                    throws WTException
Deprecated. as of R7.0, use buildStatement(XMLSource, Locale, Hashtable)

This method is used to build the Statement given the QML XMLSource and locale.

Supported API: true

Parameters:
a_qmlSource -
a_locale -
Returns:
StatementSpec
Throws:
WTException

getQueryClassNames

public static Enumeration getQueryClassNames()
Return an enumeration of query class names that should be included in the list of available query classes. The class names are specified as a resource in a service properties file.

Supported API: true

Returns:
Enumeration

getFileTypeExtension

public static String getFileTypeExtension(String a_outputMimeType)
                                   throws WTException
This method will set the file extension type for the MIME type.

Supported API: true

Parameters:
a_outputMimeType -
Returns:
String
Throws:
WTException

buildSQL

public static String buildSQL(XMLSource a_qmlSource,
                              Hashtable a_inputs,
                              Locale a_locale)
                       throws WTException
This method is used to build the SQL representation for the QML XMLSource.

Supported API: false

Parameters:
a_qmlSource - QML to use to build SQL.
a_inputs - Parameter inputs to use. If null, then empty criteria are not dropped.
a_locale - Locale for message display.
Returns:
String
Throws:
WTException

generateResults

public static QueryResult generateResults(XMLSource a_qmlSource,
                                          Hashtable a_inputs,
                                          Locale a_locale)
                                   throws WTException
Deprecated. Use generateResults(XMLSource, Hashtable, Locale, WTContainerRef)

This method is used to generate a QueryResult from the QML specification and locale. A statement is built and executed and the QueryResult is returned. This method can be called from the client and will be indirectly executed remotely.

Supported API: true

Parameters:
a_qmlSource -
a_inputs -
a_locale -
Returns:
QueryResult
Throws:
WTException

generateResults

public static QueryResult generateResults(String a_qmlSource,
                                          Hashtable a_inputs,
                                          Locale a_locale)
                                   throws WTException
Deprecated. as of R7.0, use generateResults(String, Hashtable, Locale, WTContainerRef)

This method is used to generate a QueryResult from the QML specification and locale. A statement is built and executed and the QueryResult is returned.

Supported API: true

Parameters:
a_qmlSource -
a_inputs -
a_locale -
Returns:
QueryResult
Throws:
WTException

generateTableModel

public static TableModel generateTableModel(String a_qmlSource,
                                            Hashtable a_inputs,
                                            Locale a_locale)
                                     throws WTException
Deprecated. as of R7.0, use generateTableModel(String, Hashtable, Locale, WTContainerRef)

This method is used to generate a TableModel from QML source and parameter input values. A statement is built and executed using the specified inputs. The results are then returned in the TableModel.

Supported API: true

Parameters:
a_qmlSource -
a_inputs -
a_locale -
Returns:
TableModel
Throws:
WTException

generateTableModel

public static TableModel generateTableModel(XMLSource a_qmlSource,
                                            Hashtable a_inputs,
                                            Locale a_locale)
                                     throws WTException
Deprecated. as of R7.0, use generateTableModel(XMLSource, Hashtable, Locale, WTContainerRef)

This method is used to generate a TableModel from QML source and parameter input values. A statement is built and executed using the specified inputs. The results are then returned in the TableModel.

Supported API: true

Parameters:
a_qmlSource -
a_inputs -
a_locale -
Returns:
TableModel
Throws:
WTException

checkAdvancedQueryAccess

public static boolean checkAdvancedQueryAccess(WTContainerRef a_containerReference)
                                        throws WTException
Indicates if the current user has access to advanced query capabilities based on the specified container context.

Supported API: false

Parameters:
a_containerReference - Container references to use when checking advanced query enabled groups.
Returns:
boolean
Throws:
WTException

_checkAdvancedQueryAccess

protected static boolean _checkAdvancedQueryAccess(WTContainerRef a_containerReference)
                                            throws WTException
Indicates if the current user has access to advanced query capabilities based on the specified container context.

Supported API: false

Parameters:
a_containerReference - Container references to use when checking advanced query enabled groups.
Returns:
boolean
Throws:
WTException

getAvailableXSLFormats

public static List getAvailableXSLFormats(Locale a_locale)
Return an List of available XSL formats that can be used in report processing. These values are specified in a service properties file and may be overriden with locale specific XSL formats. All specified formats will be available for a given locale unless the service properties entry for the locale specifies a null XSL path ("NULL").

Supported API: true

Parameters:
a_locale - Locale to use to look up XSL formats
Returns:
List of available XSL formats

getDataFormatExtension

public static String getDataFormatExtension(String a_outputMimeType)
                                     throws WTException
Throws:
WTException

getPostProcessor

public static ReportPostProcessor getPostProcessor(String originalMimeType)
Get an instance of a post-processor for a given MIME type if one has been registered, else returns null.

Supported API: true

Parameters:
originalMimeType - original MIME type of report result
Returns:
ReportPostProcessor

concatMediaTypeAndEncoding

public static String concatMediaTypeAndEncoding(String mediaType,
                                                String encoding)
Concatenate a MIME type string (without encoding information) and encoding information.

Supported API: true

Parameters:
mediaType - MIME type string without encoding information
encoding - character encoding name
Returns:
String

buildParameterTemplate

public static ParameterTemplate buildParameterTemplate(Element a_element)
                                                throws WTException
Throws:
WTException

getMacroExpression

public static ColumnExpression getMacroExpression(Element a_element,
                                                  Object a_macro)
                                           throws WTException
Throws:
WTException

getMacroExpressionProcessor

public static MacroExpressionProcessor getMacroExpressionProcessor(Object a_macroName)
                                                            throws WTException
Throws:
WTException

getLocale

public static Locale getLocale(Map a_parameterMap)

buildColumnExpression

public static ColumnExpression buildColumnExpression(String a_value,
                                                     String a_type,
                                                     Locale a_locale)
                                              throws WTException
Throws:
WTException

parseDate

private static Date parseDate(String a_value,
                              DateFormat a_dateFormat)

processOperandValue

private static Object processOperandValue(Element a_operandChildElement,
                                          Object a_value,
                                          Locale a_locale)
                                   throws WTException
Throws:
WTException

generateResults

private static QueryResult generateResults(DOMXMLSource a_qmlSource,
                                           Hashtable a_inputs,
                                           boolean a_bypassAccessControl,
                                           Locale a_locale)
                                    throws WTException
Throws:
WTException

getBypassAccessControl

static boolean getBypassAccessControl(DOMXMLSource a_qmlSource)
                               throws WTException
Determine whether QML either explicitly calls for access control to be by-passed or requires that access control be by-passed for the features used therein.

Throws:
WTException

isBypassAccessControl

private static boolean isBypassAccessControl(DOMXMLSource a_qmlSource)
                                      throws WTException
Determine whether QML explicitly calls for access control to be by-passed.

Throws:
WTException

buildColumnDefs

private static Vector buildColumnDefs(Node a_document,
                                      Locale a_locale)
                               throws WTPropertyVetoException,
                                      WTException
Throws:
WTPropertyVetoException
WTException

buildTableModel

private static TableModel buildTableModel(DOMXMLSource a_qmlSource,
                                          QueryResult a_queryResult,
                                          Hashtable a_inputs,
                                          Locale a_locale)
                                   throws WTException
Throws:
WTException

getURL

static URL getURL(String a_processorMethodName,
                  String a_actionValue,
                  Properties a_properties,
                  ReportTemplate a_reportTemplate)
           throws WTException
Throws:
WTException

getParameterValue

private static Object getParameterValue(ParameterTemplate a_parameterTemplate,
                                        Hashtable a_inputs,
                                        boolean a_useDefault)
                                 throws WTException
Throws:
WTException

getXSLPath

private static String getXSLPath(String a_resourceName,
                                 Locale a_locale)

generateResultsNoCriteriaDrop

static QueryResult generateResultsNoCriteriaDrop(ReportTemplate a_reportTemplate,
                                                 Hashtable a_inputs,
                                                 Locale a_locale)
                                          throws WTException
Throws:
WTException