com.jaspersoft.jasperserver.api.engine.jasperreports.util
Class CustomDataSourceDefinition

java.lang.Object
  extended by com.jaspersoft.jasperserver.api.engine.jasperreports.util.CustomDataSourceDefinition
All Implemented Interfaces:
java.io.Serializable

public class CustomDataSourceDefinition
extends java.lang.Object
implements java.io.Serializable

Author:
bob This class is meant to be instantiated as a spring bean that registers a custom data source with the system.
See Also:
Serialized Form

Field Summary
static java.lang.String PARAM_DEFAULT
           
static java.lang.String PARAM_HIDDEN
           
static java.lang.String PARAM_LABEL
           
static java.lang.String PARAM_NAME
           
 
Constructor Summary
CustomDataSourceDefinition()
           
 
Method Summary
 java.util.List getEditablePropertyDefinitions()
          utility function for the jsp--return just the editable param defs
 CustomReportDataSourceServiceFactory getFactory()
           
 java.lang.String getLabelName()
          message name used as label
 java.lang.String getName()
           
 java.lang.String getParameterLabelName(java.lang.String paramName)
          message names for params
 java.util.List getPropertyDefinitions()
           
 java.util.Map getQueryExecuterMap()
          Map with query languages (used language attribute of JRXML queryString element) as keys, and JRQueryExecuterFactory class names as values
 java.lang.String getServiceClassName()
           
 CustomDataSourceValidator getValidator()
           
 void setDefaultValues(CustomReportDataSource cds, boolean includeHidden)
          Initialize a CustomReportDataSource instance with the defaults specified
 void setFactory(CustomReportDataSourceServiceFactory factory)
          This is always set to the CustomReportDataSourceServiceFactory which is instantiated with the other RDSSF's in applicationContext.xml.
 void setName(java.lang.String name)
           
 void setPropertyDefinitions(java.util.List propertyDefinitions)
          a list of parameter defs.
 void setQueryExecuterMap(java.util.Map queryExecuterMap)
          register query executer factories with JR
 void setServiceClassName(java.lang.String serviceClassName)
          The name of the custom impl of ReportDataSourceService.
 void setValidator(CustomDataSourceValidator validator)
          (optional) the name of a validator that's used to check the params
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_NAME

public static final java.lang.String PARAM_NAME
See Also:
Constant Field Values

PARAM_LABEL

public static final java.lang.String PARAM_LABEL
See Also:
Constant Field Values

PARAM_DEFAULT

public static final java.lang.String PARAM_DEFAULT
See Also:
Constant Field Values

PARAM_HIDDEN

public static final java.lang.String PARAM_HIDDEN
See Also:
Constant Field Values
Constructor Detail

CustomDataSourceDefinition

public CustomDataSourceDefinition()
Method Detail

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

setFactory

public void setFactory(CustomReportDataSourceServiceFactory factory)
This is always set to the CustomReportDataSourceServiceFactory which is instantiated with the other RDSSF's in applicationContext.xml. We then need to register ourselves with that factory so it knows about us.

Parameters:
factory -

getFactory

public CustomReportDataSourceServiceFactory getFactory()

setServiceClassName

public void setServiceClassName(java.lang.String serviceClassName)
The name of the custom impl of ReportDataSourceService.

Parameters:
serviceClassName -

getServiceClassName

public java.lang.String getServiceClassName()

setValidator

public void setValidator(CustomDataSourceValidator validator)
(optional) the name of a validator that's used to check the params

Parameters:
validatorClassName -

getValidator

public CustomDataSourceValidator getValidator()

setPropertyDefinitions

public void setPropertyDefinitions(java.util.List propertyDefinitions)
a list of parameter defs. Each param is a map of props. Here are current valid props: name: name used to refer to the prop--in particular, used as the key in the persisted custom data source prop map label (auto generated): name of a label for this parameter to get out of a message catalog type: mandatory:

Parameters:
paramDefs -

getPropertyDefinitions

public java.util.List getPropertyDefinitions()

getLabelName

public java.lang.String getLabelName()
message name used as label


getParameterLabelName

public java.lang.String getParameterLabelName(java.lang.String paramName)
message names for params

Parameters:
paramName -
Returns:

getEditablePropertyDefinitions

public java.util.List getEditablePropertyDefinitions()
utility function for the jsp--return just the editable param defs

Returns:

getQueryExecuterMap

public java.util.Map getQueryExecuterMap()
Map with query languages (used language attribute of JRXML queryString element) as keys, and JRQueryExecuterFactory class names as values

Returns:

setQueryExecuterMap

public void setQueryExecuterMap(java.util.Map queryExecuterMap)
register query executer factories with JR

Parameters:
queryExecuterMap -

setDefaultValues

public void setDefaultValues(CustomReportDataSource cds,
                             boolean includeHidden)
Initialize a CustomReportDataSource instance with the defaults specified

Parameters:
cds -
b -


Copyright © 2007. All Rights Reserved.