jet.server.api.rmi
Interface RemoteParamInfo

All Superinterfaces:
java.rmi.Remote

public interface RemoteParamInfo
extends java.rmi.Remote

Interface RemoteParamInfo contains the description of parameters in a report.

This is an RMI-based interface and invoking the methods of this interface will make an RMI call to the associated JReport Server

Since:
5.2
See Also:
jet.server.api.ParamInfo}., ParamInfo

Method Summary
 void check(java.lang.String value)
          Checks whether the value is valid for the parameter based on locale of this object set by setLocale(Locale).
 java.lang.String[] detectInvalidValues(java.lang.String[] values)
          Detects whether values are out of range(value list of parameter).
 java.lang.String[][] getBooleanLiteral()
          For Boolean type parameter, returns boolean literals.
 java.lang.String getBoundSQL()
          Returns the parameter bound SQL.
 java.lang.String getDefaultDateFormat()
          Returns the default date format of the parameter.
 long getDefaultDateValue()
          Returns the value of the date/datetime/time parameter as a long type.
 java.lang.String getDefaultValue()
          Returns the default value of the parameter.
 java.util.Vector getDisplayValues()
          Returns 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()
          Returns the locale of the Parameter.
 java.lang.String getMaxLimit()
          Returns the maximum limit of the parameter value.
 java.lang.String getMaxLimit(java.util.Locale locale)
          Deprecated. use setLocale(Locale) and getMaxLimit() instead.
 java.lang.String getMinLimit()
          Returns the minimum limit of the parameter value.
 java.lang.String getMinLimit(java.util.Locale locale)
          Deprecated. use setLocale(Locale) and getMinLimit() instead.
 java.lang.String getName()
          Returns the name of the parameter.
 java.lang.String getNextLevel()
          For cascading parameter, returns the next lower level parameter name.
 java.lang.String getPreviousLevel()
          For cascading parameter, returns the next higher level parameter name.
 java.lang.String getPrompt()
          Returns the prompt message of the parameter.
 java.util.Vector getReferedBy()
          Returns a Vector containing the list of parameters that refer to this parameter.
 java.lang.String getType()
          Returns the type of the parameter.
 java.lang.String getUserFormat()
          Returns the user defined format of the parameter.
 java.util.Vector<java.lang.String[]> getValueList()
          Gets the parameter value, show value, display value and NLS value
 java.util.Vector getValueOptions()
          Returns the options of the parameter value.
 java.util.Vector getValueOptions(java.util.Locale locale)
          Deprecated. use setLocale(Locale) and getValueOptions() instead.
 int getWhenOutOfRange()
          Returns the processing method when a typed value is out of range.
 boolean isAllowAll()
          Returns true if the parameter allows typing in values directly.
If it is true, typing in values directly should be allowed on UI regardless of whether the parameter is bound with column.
 boolean isAllowTypeIn()
          Returns true if the parameter allows typing in values directly.
If it is true, typing in values directly should be allowed on UI regardless of whether the parameter is bound with column.
 boolean isCascading()
          Returns true when the parameter is a member of a group of cascading parameters.
 boolean isColumn()
          Returns true if the parameter only accepts a column name as its value.
 boolean isDistinct()
          Returns true if the parameter is distinct.
 boolean isDynamicDateParameter()
          Indicates whether the parameter is a dynamic parameter.
 boolean isGetValueFromAPI()
          Check whether the parameter is API level parameter.
 boolean isHideParameterWhenSingleValueReturn()
          For bind with column parameter, isColumn() is true.
 boolean isMultiple()
          Determines whether the parameter allows multiple values to be specified.
 boolean isParameters()
          Returns true if the values are parameters.
 boolean isReferedBy()
          Returns true if the parameter is referred to by other parameters.
 boolean isReferOther()
          Returns true if the parameter refers to other parameters.
 boolean isRequired()
          Returns true if the parameter is required.
 boolean isSetAsParameter()
          For cascading parameter, returns true if the parameter is set as an independent parameter that can be used separately.
 boolean needNLSDisplayValue()
          Check whether the display value need nls
 void setEncoding(java.lang.String encoding)
          Sets the encoding.
 void setLocale(java.util.Locale locale)
          Sets the locale of the Parameter.
Default is system default locale.
 void setValue(java.lang.String value)
          Sets the parameter value.
 void setValue(java.lang.String[] value)
          Sets the parameter values.
 java.lang.String validateValue(java.lang.String paramValue)
          Checks whether a value is valid for the parameter, based on the Locale of this object set by setLocale(Locale).
 

Method Detail

getName

java.lang.String getName()
                         throws java.rmi.RemoteException
Returns the name of the parameter.

Returns:
name of the parameter.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getType

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

Returns:
type of the parameter.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getPrompt

java.lang.String getPrompt()
                           throws java.rmi.RemoteException
Returns the prompt message of the parameter.

Returns:
the prompt message of the parameter.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

setLocale

void setLocale(java.util.Locale locale)
               throws java.rmi.RemoteException
Sets the locale of the Parameter.
Default is system default locale.

Parameters:
locale - The locale of the parameter.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getLocale

java.util.Locale getLocale()
                           throws java.rmi.RemoteException
Returns the locale of the Parameter.

Returns:
the locale of the Parameter.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getDefaultValue

java.lang.String getDefaultValue()
                                 throws java.rmi.RemoteException
Returns the default value of the parameter.

Returns:
the default value of the parameter.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
setLocale(Locale)

getDefaultDateValue

long getDefaultDateValue()
                         throws java.rmi.RemoteException
Returns the value of the date/datetime/time parameter as a long type.

Returns:
value of the date/datetime/time parameter.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
setLocale(Locale)

isColumn

boolean isColumn()
                 throws java.rmi.RemoteException
Returns true if the parameter only accepts a column name as its value.

Returns:
if the parameter only accepts a column name as its value.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

isDistinct

boolean isDistinct()
                   throws java.rmi.RemoteException
Returns true if the parameter is distinct.

Returns:
if the parameter is distinct.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

isRequired

boolean isRequired()
                   throws java.rmi.RemoteException
Returns true if the parameter is required.

Returns:
if the parameter is required.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getValueOptions

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

Returns 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.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
setLocale(Locale)

getValueOptions

java.util.Vector getValueOptions()
                                 throws java.rmi.RemoteException
Returns the options of the parameter value.

Returns:
the options of the parameter value. The vector contains the strings of value options.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
setLocale(Locale)

getDisplayValues

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

Returns the parameter value displayed.

Parameters:
locale - The locale will be ignored.
Returns:
original column if there is no binding, returns bound column if there is binding.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
setLocale(Locale)

getDisplayValues

java.util.Vector getDisplayValues()
                                  throws java.rmi.RemoteException
Returns the parameter value displayed.

Returns:
original column if there is no binding, returns bound column if there is binding.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
setLocale(Locale)

setEncoding

void setEncoding(java.lang.String encoding)
                 throws java.rmi.RemoteException
Sets the encoding.

Parameters:
encoding - The encoding.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

setValue

void setValue(java.lang.String value)
              throws java.rmi.RemoteException
Sets the parameter value.

Parameters:
value - The parameter value.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

setValue

void setValue(java.lang.String[] value)
              throws java.rmi.RemoteException
Sets the parameter values.

Parameters:
value - The parameter values.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getMaxLimit

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

Returns the maximum limit of the parameter value.

Parameters:
locale - The locale will be ignored.
Returns:
the maximum limit of the parameter value.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
setLocale(Locale)

getMaxLimit

java.lang.String getMaxLimit()
                             throws java.rmi.RemoteException
Returns the maximum limit of the parameter value.

Returns:
the maximum limit of the parameter value.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getMinLimit

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

Returns the minimum limit of the parameter value.

Parameters:
locale - The locale will be ignored.
Returns:
the minimum limit of the parameter value.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
setLocale(Locale)

getMinLimit

java.lang.String getMinLimit()
                             throws java.rmi.RemoteException
Returns the minimum limit of the parameter value.

Returns:
the minimum limit of the parameter value.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
setLocale(Locale)

getUserFormat

java.lang.String getUserFormat()
                               throws java.rmi.RemoteException
Returns the user defined format of the parameter. If the parameter type is "String", the user format will be String Encoding.

Returns:
the user defined format of the parameter.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getDefaultDateFormat

java.lang.String getDefaultDateFormat()
                                      throws java.rmi.RemoteException
Returns the default date format of the parameter.

Returns:
the default date format of the parameter. If type is not "Date", "DateTime", or "Time", returns null.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
Since:
version 9

isParameters

boolean isParameters()
                     throws java.rmi.RemoteException
Returns true if the values are parameters.

Returns:
if the values are parameters.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

isReferedBy

boolean isReferedBy()
                    throws java.rmi.RemoteException
Returns true if the parameter is referred to by other parameters.

Returns:
if the parameter is referred by other parameters.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getReferedBy

java.util.Vector getReferedBy()
                              throws java.rmi.RemoteException
Returns a Vector containing the list of parameters that refer to this parameter.

Returns:
Vector The parameters that refer to this parameter. The element is parameter name.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

isReferOther

boolean isReferOther()
                     throws java.rmi.RemoteException
Returns true if the parameter refers to other parameters.

Returns:
if the parameter refers to other parameters.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getBoundSQL

java.lang.String getBoundSQL()
                             throws java.rmi.RemoteException
Returns the parameter bound SQL.

Returns:
the parameter bound SQL.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

isDynamicDateParameter

boolean isDynamicDateParameter()
                               throws java.rmi.RemoteException
Indicates whether the parameter is a dynamic parameter.

Returns:
true if the parameter is a dynamic parameter.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getDynamicDisplayValue

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

Parameters:
currTime - The local current system time in milliseconds.
locale - The locale will be ignored.
Returns:
The display string of Dynamic parameter based on local current system time.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
setLocale(Locale)

getDynamicDisplayValue

java.lang.String getDynamicDisplayValue(long currTime)
                                        throws java.rmi.RemoteException
Parameters:
currTime - The local current system time in milliseconds.
Returns:
The display string of Dynamic parameter based on local current system time.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
setLocale(Locale)

isHideParameterWhenSingleValueReturn

boolean isHideParameterWhenSingleValueReturn()
                                             throws java.rmi.RemoteException
For bind with column parameter, isColumn() is true. Returns true if the parameter is hidden when a single value is returned.

Returns:
if the parameter is hidden when a single value is returned.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.
See Also:
isColumn()

getBooleanLiteral

java.lang.String[][] getBooleanLiteral()
                                       throws java.rmi.RemoteException
For Boolean type parameter, returns boolean literals.

Returns:
String[0][] are literals for true, String[1][] are literals for false.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

isMultiple

boolean isMultiple()
                   throws java.rmi.RemoteException
Determines whether the parameter allows multiple values to be specified.

Returns:
returns true if the parameter allows multiple values to be specified, else returns false.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

isAllowAll

boolean isAllowAll()
                   throws java.rmi.RemoteException
Returns true if the parameter allows typing in values directly.
If it is true, typing in values directly should be allowed on UI regardless of whether the parameter is bound with column.

Returns:
if the parameter allows typing in values directly.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

isCascading

boolean isCascading()
                    throws java.rmi.RemoteException
Returns true when the parameter is a member of a group of cascading parameters.

Returns:
if the parameter is a member of a group of cascading parameters
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getPreviousLevel

java.lang.String getPreviousLevel()
                                  throws java.rmi.RemoteException
For cascading parameter, returns the next higher level parameter name. If the parameter is non-cascading or it is the first level of a cascading group, returns null.

Returns:
the name of the next higher level parameter of a cascading group, else null.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getNextLevel

java.lang.String getNextLevel()
                              throws java.rmi.RemoteException
For cascading parameter, returns the next lower level parameter name. If the parameter is non-cascading or it is the last level of a cascading group, returns null.

Returns:
the name of the next lower level parameter of a cascading group, else null.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

isSetAsParameter

boolean isSetAsParameter()
                         throws java.rmi.RemoteException
For cascading parameter, returns true if the parameter is set as an independent parameter that can be used separately.

Returns:
if the parameter can be used separately.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

isAllowTypeIn

boolean isAllowTypeIn()
                      throws java.rmi.RemoteException
Returns true if the parameter allows typing in values directly.
If it is true, typing in values directly should be allowed on UI regardless of whether the parameter is bound with column.

Returns:
if the parameter allows typing in values.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getWhenOutOfRange

int getWhenOutOfRange()
                      throws java.rmi.RemoteException
Returns the processing method when a typed value is out of range.

Returns:
ParamDesc.ADOPT_DIRECTLY or ParamDesc.USE_DEFAULT or ParamDesc.WARN
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

detectInvalidValues

java.lang.String[] detectInvalidValues(java.lang.String[] values)
                                       throws java.rmi.RemoteException
Detects whether values are out of range(value list of parameter).

Parameters:
values - The values to be detected.
Returns:
the values out of range(value list of parameter).
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

check

void check(java.lang.String value)
           throws RptServerException,
                  java.rmi.RemoteException
Checks whether the value is valid for the parameter based on locale of this object set by setLocale(Locale).

Parameters:
value - The value to be checked.
Throws:
RptServerException - If the value is invalid for the parameter.
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

validateValue

java.lang.String validateValue(java.lang.String paramValue)
                               throws RptServerException,
                                      java.rmi.RemoteException
Checks whether a value is valid for the parameter, based on the Locale of this object set by setLocale(Locale).

Parameters:
paramValue - the value to be checked.
Returns:
return the following JSON object: {"success": false, "expr": "Today()", "customMsg": "invalid parameter" }
Throws:
RptServerException
java.rmi.RemoteException

isGetValueFromAPI

boolean isGetValueFromAPI()
                          throws java.rmi.RemoteException
Check whether the parameter is API level parameter.

Returns:
true means that the parameter value cannot be type-in by JSP UI, Only get parameter value from URL or java API or session parameter etc.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

getValueList

java.util.Vector<java.lang.String[]> getValueList()
                                                  throws java.rmi.RemoteException
Gets the parameter value, show value, display value and NLS value

Returns:
a String array, element 0 is value, element 1 is show value, element 2 is display value and element 3 is NLS value.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.

needNLSDisplayValue

boolean needNLSDisplayValue()
                            throws java.rmi.RemoteException
Check whether the display value need nls

Returns:
true when need nls, false when no need nls.
Throws:
java.rmi.RemoteException - If communication-related error occurs during RMI call execution or not.