jet.server.api
Interface ParamInfo


public interface ParamInfo

Interface ParamInfo contains description of parameters of a report.


Method Summary
 void check(java.lang.String value)
          check whether value is valid for the parameter.
set locale via setLocale first.
 java.lang.String[] detectInvalidValues(java.lang.String[] values)
          Detect whether values are out of range(value list of parameter)
 java.lang.String[][] getBooleanLiteral()
          For Boolean type parameter, Return boolean literals
 java.lang.String getBoundSQL()
          Return the parameter bound SQL.
 java.lang.String getDefaultDateFormat()
          Return the default date format of the parameter.
 long getDefaultDateValue()
          Return long value of the date/datetime/time parameter.
 java.lang.String getDefaultValue()
          Return default value of the parameter.
 java.util.Vector getDisplayValues()
          Return the parameter value displayed.
 java.util.Vector getDisplayValues(java.util.Locale locale)
          Deprecated. use setLocale(Locale) and getDisplayValues() instead.
 java.lang.String getDynamicDisplayValue(long currTime)
           
 java.lang.String getDynamicDisplayValue(long currTime, java.util.Locale local)
          Deprecated. use setLocale(Locale) and getDynamicDisplayValue(long) instead.
 java.util.Locale getLocale()
          Return the Locale of the Parameter.
 java.lang.String getMaxLimit()
          Return the max limit of the parameter value.
 java.lang.String getMaxLimit(java.util.Locale locale)
          Deprecated. use setLocale(Locale) and getMaxLimit() instead.
 java.lang.String getMinLimit()
          Return the max limit of the parameter value.
 java.lang.String getMinLimit(java.util.Locale locale)
          Deprecated. use setLocale(Locale) and getMinLimit() instead.
 java.lang.String getName()
          Return the name of the parameter.
 java.lang.String getNextLevel()
          For cascading parameter, Return the next level parameter name for cascading parameter.
 java.lang.String getPreviousLevel()
          For cascading parameter, Return the previous level parameter name.
 java.lang.String getPrompt()
          Return the prompt message of the parameter.
 java.util.Vector getReferedBy()
          Return the parameter refered by other parameters.
 java.lang.String getType()
          Return the type of the parameter.
 java.lang.String getUserFormat()
          Return the user defined format of the parameter.
 java.util.Vector getValueOptions()
          Return the options of the parameter value.
 java.util.Vector getValueOptions(java.util.Locale locale)
          Deprecated. use setLocale(Locale) and getValueOptions() instead.
 int getWhenOutOfRange()
          Return the process method when type value is out of range.
 boolean isAllowAll()
          Return whether this parameter is allow ALL value or not.
 boolean isAllowTypeIn()
          Return if the parameter is allow type-in value directly.
if it is true, UI should allow type-in value directly regardless whether the parameter is bound with column.
 boolean isCascading()
          Return whether the parameter is cascading.
 boolean isColumn()
          Return if the parameter only accepts a column name as its value.
 boolean isDistinct()
          Returns if the parameter is distinct.
 boolean isDynamicDateParameter()
          Indicate whether the paramter is dynamic parameter.
 boolean isHideParameterWhenSingleValueReturn()
          For bound with column parameter, isColumn() is true, Return if the parameter maybe hidden when single value is returned.
 boolean isMultiple()
          Return whether the parameter is support multiple choice or not.
 boolean isParameters()
          Return if the values are parameters.
 boolean isReferedBy()
          Return if the parameter is refered by other parameters.
 boolean isReferOther()
          Return if the parameter refer other parameters.
 boolean isRequired()
          Returns if the parameter is required.
 boolean isSetAsParameter()
          For cascading parameter, Return whether the parameter is set as parameter.
 void setEncoding(java.lang.String encoding)
           
 void setLocale(java.util.Locale locale)
          Set the Locale of the Parameter.
Default is system default locale
 void setValue(java.lang.String value)
          Set the parameter value.
 

Method Detail

getName

java.lang.String getName()
Return the name of the parameter.

Returns:
name of the parameter.

getType

java.lang.String getType()
Return the type of the parameter. Possible values are: "String", "Number", "Currency", "Boolean", "Date", "Time", "DateTime".

Returns:
type of the parameter.

getPrompt

java.lang.String getPrompt()
Return the prompt message of the parameter.

Returns:
the prompt message of the parameter.

setLocale

void setLocale(java.util.Locale locale)
Set the Locale of the Parameter.
Default is system default locale

Parameters:
locale - the Locale of the parameter.

getLocale

java.util.Locale getLocale()
Return the Locale of the Parameter.

Returns:
the Locale of the Parameter.

getDefaultValue

java.lang.String getDefaultValue()
Return default value of the parameter.

Returns:
default value of the parameter.
See Also:
setLocale(Locale)

getDefaultDateValue

long getDefaultDateValue()
Return long value of the date/datetime/time parameter.

Returns:
long value of the date/datetime/time parameter.
See Also:
setLocale(Locale)

isColumn

boolean isColumn()
Return if the parameter only accepts a column name as its value.

Returns:
if the parameter only accepts a column name as its value.

isDistinct

boolean isDistinct()
Returns if the parameter is distinct.

Returns:
if the parameter is distinct.

isRequired

boolean isRequired()
Returns if the parameter is required.

Returns:
if the parameter is required.

getValueOptions

java.util.Vector getValueOptions(java.util.Locale locale)
Deprecated. use setLocale(Locale) and getValueOptions() instead.

Return the options of the parameter value.

Parameters:
locale - the Locale will be ignored.
Returns:
the options of the parameter value. The Vector contains the Strings of value options.
See Also:
setLocale(Locale)

getValueOptions

java.util.Vector getValueOptions()
Return the options of the parameter value.

Returns:
the options of the parameter value. The Vector contains the Strings of value options.
See Also:
setLocale(Locale)

getDisplayValues

java.util.Vector getDisplayValues(java.util.Locale locale)
Deprecated. use setLocale(Locale) and getDisplayValues() instead.

Return the parameter value displayed.

Parameters:
locale - the Locale will be ignored.
Returns:
original column if no binding, return binding column if binding.
See Also:
setLocale(Locale)

getDisplayValues

java.util.Vector getDisplayValues()
Return the parameter value displayed.

Returns:
original column if no binding, return binding column if binding.
See Also:
setLocale(Locale)

setEncoding

void setEncoding(java.lang.String encoding)

setValue

void setValue(java.lang.String value)
Set the parameter value.

Parameters:
value - the parameter value.

getMaxLimit

java.lang.String getMaxLimit(java.util.Locale locale)
Deprecated. use setLocale(Locale) and getMaxLimit() instead.

Return the max limit of the parameter value.

Parameters:
locale - the Locale will be ignored.
Returns:
the max limit of the parameter value.
See Also:
setLocale(Locale)

getMaxLimit

java.lang.String getMaxLimit()
Return the max limit of the parameter value.

Returns:
the max limit of the parameter value.
See Also:
setLocale(Locale)

getMinLimit

java.lang.String getMinLimit(java.util.Locale locale)
Deprecated. use setLocale(Locale) and getMinLimit() instead.

Return the max limit of the parameter value.

Parameters:
locale - the Locale will be ignored.
Returns:
the max limit of the parameter value.
See Also:
setLocale(Locale)

getMinLimit

java.lang.String getMinLimit()
Return the max limit of the parameter value.

Returns:
the max limit of the parameter value.
See Also:
setLocale(Locale)

getUserFormat

java.lang.String getUserFormat()
Return the user defined format of the parameter. If the parameter type is "String", the user format is the String Encoding.

Returns:
the user defined format of the parameter.

getDefaultDateFormat

java.lang.String getDefaultDateFormat()
Return the default date format of the parameter.

Returns:
the default date format of the parameter. If type is not "Date", "DateTime", or "Time", return null
Since:
version 9

isParameters

boolean isParameters()
Return if the values are parameters.

Returns:
if the values are parameters.

isReferedBy

boolean isReferedBy()
Return if the parameter is refered by other parameters.

Returns:
if the parameter is refered by other parameters.

getReferedBy

java.util.Vector getReferedBy()
Return the parameter refered by other parameters.

Returns:
Vector the parameter refered by other parameters, the element is parameter name.

isReferOther

boolean isReferOther()
Return if the parameter refer other parameters.

Returns:
if the parameter refer other parameters.

getBoundSQL

java.lang.String getBoundSQL()
Return the parameter bound SQL.

Returns:
the parameter bound SQL.

isDynamicDateParameter

boolean isDynamicDateParameter()
Indicate whether the paramter is dynamic parameter.

Returns:
true the parameter is dynamic parameter.

getDynamicDisplayValue

java.lang.String getDynamicDisplayValue(long currTime,
                                        java.util.Locale local)
Deprecated. use setLocale(Locale) and getDynamicDisplayValue(long) instead.

Parameters:
currTime - the milliseconds value of local current system time.
locale - the Locale will be ignored.
Returns:
The display string of Dynamic paremter based on local
See Also:
setLocale(Locale)

getDynamicDisplayValue

java.lang.String getDynamicDisplayValue(long currTime)
Parameters:
currTime - the milliseconds value of local current system time.
Returns:
The display string of Dynamic paremter based on local
See Also:
setLocale(Locale)

isHideParameterWhenSingleValueReturn

boolean isHideParameterWhenSingleValueReturn()
For bound with column parameter, isColumn() is true, Return if the parameter maybe hidden when single value is returned.

Returns:
if the parameter maybe hidden when single value is returned.
See Also:
isColumn()

getBooleanLiteral

java.lang.String[][] getBooleanLiteral()
For Boolean type parameter, Return boolean literals

Returns:
String[0][] are literals for true, String[1][] are literals for false

isMultiple

boolean isMultiple()
Return whether the parameter is support multiple choice or not.

Returns:
return true if the parameter support multiple choice, else return false.

isAllowAll

boolean isAllowAll()
Return whether this parameter is allow ALL value or not.

Returns:

isCascading

boolean isCascading()
Return whether the parameter is cascading.

Returns:

getPreviousLevel

java.lang.String getPreviousLevel()
For cascading parameter, Return the previous level parameter name. if the parameter is none-cascading or it is the first level of cascading, return null.

Returns:

getNextLevel

java.lang.String getNextLevel()
For cascading parameter, Return the next level parameter name for cascading parameter. if the parameter is none-cascading or it is the last level of cascading, return null.

Returns:

isSetAsParameter

boolean isSetAsParameter()
For cascading parameter, Return whether the parameter is set as parameter.

Returns:

isAllowTypeIn

boolean isAllowTypeIn()
Return if the parameter is allow type-in value directly.
if it is true, UI should allow type-in value directly regardless whether the parameter is bound with column.

Returns:
if the parameter is allow type-in value.

getWhenOutOfRange

int getWhenOutOfRange()
Return the process method when type value is out of range.

Returns:
ParamDesc.ADOPT_DIRECTLY or ParamDesc.USE_DEFAULT or ParamDesc.WARN

detectInvalidValues

java.lang.String[] detectInvalidValues(java.lang.String[] values)
Detect whether values are out of range(value list of parameter)

Parameters:
values - The values to be detected
Returns:
the values those out of range(value list of parameter)

check

void check(java.lang.String value)
           throws RptServerException
check whether value is valid for the parameter.
set locale via setLocale first.

Parameters:
value - the value to be checked.
Throws:
RptServerException - if the value is invalid for the parameter.
See Also:
setLocale(Locale)