Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## jet.server.api
Interface ParamInfo

    public interface ParamInfo

Interface `ParamInfo` contains the descriptions of the parameters of a report.

Method Summary
`void` | `check(java.lang.String value)` Checks whether a value is valid for the parameter, based on the 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), based on the Locale of this object set by `setLocale(Locale)`.
`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 this parameter, based on the Locale of this object set by `setLocale(Locale)`.
`long` | `getDefaultDateValue()` Returns the default value in milliseconds represented by this parameter object, the number of milliseconds since January 1, 1970, 00:00:00 GMT. The parameter type must be date/time/datetime, otherwise return 0.
`java.lang.String` | `getDefaultValue()` Returns default value of the parameter, based on the Locale of this object set by `setLocale(Locale)`.
`java.util.Vector` | `getDisplayValues()` Returns the parameter display values, based on the Locale of this object set by `setLocale(Locale)`.
`java.util.Vector` | `getDisplayValues(java.util.Locale locale)` Deprecated. replaced by `getDisplayValues()`, and set locale via `setLocale(Locale)`.
`java.lang.String` | `getDynamicDisplayValue(long currTime)` Returns dynamic datetime display value for the specified time in milliseconds, format based on the Locale of this object set by `setLocale(Locale)`.
`java.lang.String` | `getDynamicDisplayValue(long currTime, java.util.Locale local)` Deprecated. replaced by `getDynamicDisplayValue(long)`, and set locale via `setLocale(Locale)`.
`java.util.Locale` | `getLocale()` Returns the Locale of the parameter.
`java.lang.String` | `getMaxLimit()` Returns the maximum limit of the parameter value range, based on the Locale of this object set by `setLocale(Locale)`.
`java.lang.String` | `getMaxLimit(java.util.Locale locale)` Deprecated. replaced by `getMaxLimit()`, and set locale via `setLocale(Locale)`.
`java.lang.String` | `getMinLimit()` Returns the minimum limit of the parameter value range, based on the Locale of this object set by `setLocale(Locale)`.
`java.lang.String` | `getMinLimit(java.util.Locale locale)` Deprecated. replaced by `getMinLimit()`, and set locale via `setLocale(Locale)`.
`java.lang.String` | `getName()` Returns the name of the parameter.
`java.lang.String` | `getNextLevel()` For cascading parameter, returns the lower level parameter name.
`java.lang.String` | `getPreviousLevel()` For cascading parameter, returns the higher level parameter name.
`java.lang.String` | `getPrompt()` Returns the prompt message of the parameter. If this Param is "Required" prompt message will append a "*" at the end of normal prompt text.
`java.util.Vector` | `getReferedBy()` Returns the parameter referred by other parameters.
`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, based on the Locale of this object set by `setLocale(Locale)`.
`java.util.Vector` | `getValueOptions(java.util.Locale locale)` Deprecated. replaced by `getValueOptions()`, and set locale via `setLocale(Locale)`.
`int` | `getWhenOutOfRange()` Returns the processing way when a typed value is out of range.
`boolean` | `isAllowAll()` Returns whether the parameter allows the ALL value to represent all the values of the parameter.
`boolean` | `isAllowTypeIn()` Returns whether the parameter allows for typing in values directly. If it is true, UI should allow users to type in values directly regardless whether the parameter is bound with column.
`boolean` | `isCascading()` Returns whether the parameter is a member of a group of cascading parameters.
`boolean` | `isColumn()` Returns if the parameter only accepts a column name as its value.
`boolean` | `isDistinct()` Returns if the parameter is distinct.
`boolean` | `isDynamicDateParameter()` Indicates whether the parameter is dynamic datetime parameter.
`boolean` | `isGetValueFromAPI()` Check whether the parameter is API level parameter.
`boolean` | `isHideParameterWhenSingleValueReturn()` For bound with column parameter, return whether this parameter is hidden when single value is returned.
`boolean` | `isMultiple()` Returns whether the parameter allows for multiple values to be selected.
`boolean` | `isParameters()` Returns if the parameter type is Parameters.
`boolean` | `isReferedBy()` Returns if the parameter is referred by other parameters.
`boolean` | `isReferOther()` Returns if the parameter refers other parameters.
`boolean` | `isRequired()` Returns if the parameter is required.
`boolean` | `isSetAsParameter()` For cascading parameter, returns whether the parameter is set as an independent parameter that can be used alone.
`boolean` | `needNLSDisplayValue()` Check whether the display value need nls
`void` | `setEncoding(java.lang.String encoding)` Sets the encoding of the parameter.
`void` | `setLocale(java.util.Locale locale)` Sets the Locale of the parameter, default is system default locale The Locale will affect the result format which you get from this ParamInfo object, and the input format which you set into this ParamInfo object: `getDefaultValue()`, `getDisplayValues()`, `getValueOptions()`, `getDefaultDateFormat()`, `getDynamicDisplayValue(long)`, `detectInvalidValues(String[])`, `check(String)`, `setValue(String)`, `setValue(String[])`, etc.
`void` | `setValue(java.lang.String value)` Sets the parameter value if this parameter allows for only one value, based on the Locale of this object set by `setLocale(Locale)`.
`void` | `setValue(java.lang.String[] value)` Sets the parameter values if this parameter allows for multiple values, based on the Locale of this object set by `setLocale(Locale)`.
`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()

  Returns the name of the parameter.

  Returns:
    name of the parameter.

### getType

    java.lang.String getType()

  Returns the type of the parameter. Possible values are "String", "Number", "Currency", "Boolean", "Date", "Time", "DateTime", and "Parameters".

  Returns:
    the type of the parameter.

### getPrompt

    java.lang.String getPrompt()

  Returns the prompt message of the parameter.
  If this Param is "Required" prompt message will append a "*" at the end of normal prompt text.
  The original prompt message may be replaced by runtime NLS, the runtime NLS language is decided by `APIConst.TAG_REPORT_LANGUAGE` and `APIConst.TAG_REPORT_COUNTRY` tags for calling `RptServer.getReportInfo(String, String, int, String, int, Hashtable)`.

  Returns:
    the prompt message of the parameter.
  See Also:
    `isRequired()`

### setLocale

    void setLocale(java.util.Locale locale)

  Sets the Locale of the parameter, default is system default locale
  The Locale will affect the result format which you get from this ParamInfo object, and the input format which you set into this ParamInfo object:
  `getDefaultValue()`, `getDisplayValues()`, `getValueOptions()`, `getDefaultDateFormat()`, `getDynamicDisplayValue(long)`, `detectInvalidValues(String[])`, `check(String)`, `setValue(String)`, `setValue(String[])`, etc.

  Parameters:
    `locale` - the Locale of the parameter.

### getLocale

    java.util.Locale getLocale()

  Returns the Locale of the parameter.

  Returns:
    the Locale of the parameter.

### getDefaultValue

    java.lang.String getDefaultValue()

  Returns default value of the parameter, based on the Locale of this object set by `setLocale(Locale)`.

  Returns:
    default value of the parameter.

### getDefaultDateValue

    long getDefaultDateValue()

  Returns the default value in milliseconds represented by this parameter object, the number of milliseconds since January 1, 1970, 00:00:00 GMT.
  The parameter type must be date/time/datetime, otherwise return 0.

  Returns:
    the number of milliseconds of the parameter default value.

### isColumn

    boolean isColumn()

  Returns 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. replaced by `getValueOptions()`, and set locale via `setLocale(Locale)`.

  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.
  See Also:
    `setLocale(Locale)`

### getValueOptions

    java.util.Vector getValueOptions()

  Returns the options of the parameter value, based on the Locale of this object set by `setLocale(Locale)`.

  Returns:
    the options of the parameter value. The Vector contains the Strings of value options.

### getDisplayValues

    java.util.Vector getDisplayValues(java.util.Locale locale)

  Deprecated. replaced by `getDisplayValues()`, and set locale via `setLocale(Locale)`.

  Returns the parameter display values.

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

### getDisplayValues

    java.util.Vector getDisplayValues()

  Returns the parameter display values, based on the Locale of this object set by `setLocale(Locale)`.

  Returns:
    original column if no binding, return bound column if binding.

### setEncoding

    void setEncoding(java.lang.String encoding)

  Sets the encoding of the parameter.

  Parameters:
    `encoding` - the encoding of the parameter.

### setValue

    void setValue(java.lang.String value)

  Sets the parameter value if this parameter allows for only one value, based on the Locale of this object set by `setLocale(Locale)`.
  If this parameter allows for only one value, you need to call this method to set the parameter value, instead of setValue(String[]).

  Parameters:
    `value` - the parameter value.
  See Also:
    `isMultiple()`

### setValue

    void setValue(java.lang.String[] value)

  Sets the parameter values if this parameter allows for multiple values, based on the Locale of this object set by `setLocale(Locale)`.
  If this parameter allows for multiple values, you need to call this method to set the parameter values, instead of setValue(String).

  Parameters:
    `value` - the parameter's multiple values.
  See Also:
    `isMultiple()`

### getMaxLimit

    java.lang.String getMaxLimit(java.util.Locale locale)

  Deprecated. replaced by `getMaxLimit()`, and set locale via `setLocale(Locale)`.

  Returns the maximum limit of the parameter value range.

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

### getMaxLimit

    java.lang.String getMaxLimit()

  Returns the maximum limit of the parameter value range, based on the Locale of this object set by `setLocale(Locale)`.

  Returns:
    the maximum limit of the parameter value range.

### getMinLimit

    java.lang.String getMinLimit(java.util.Locale locale)

  Deprecated. replaced by `getMinLimit()`, and set locale via `setLocale(Locale)`.

  Returns the minimum limit of the parameter value range.

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

### getMinLimit

    java.lang.String getMinLimit()

  Returns the minimum limit of the parameter value range, based on the Locale of this object set by `setLocale(Locale)`.

  Returns:
    the minimum limit of the parameter value range.

### getUserFormat

    java.lang.String getUserFormat()

  Returns 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.
  See Also:
    `getType()`

### getDefaultDateFormat

    java.lang.String getDefaultDateFormat()

  Returns the default date format of this parameter, based on the Locale of this object set by `setLocale(Locale)`.

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

### isParameters

    boolean isParameters()

  Returns if the parameter type is Parameters.
  Same as: `getType()`.equals("Parameters").

  Returns:
    if the parameter type is Parameters.
  See Also:
    `getType()`

### isReferedBy

    boolean isReferedBy()

  Returns if the parameter is referred by other parameters.

  Returns:
    if the parameter is referred by other parameters.

### getReferedBy

    java.util.Vector getReferedBy()

  Returns the parameter referred by other parameters.

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

### isReferOther

    boolean isReferOther()

  Returns if the parameter refers other parameters.

  Returns:
    if the parameter refers other parameters.

### getBoundSQL

    java.lang.String getBoundSQL()

  Returns the parameter bound SQL.

  Returns:
    the parameter bound SQL.

### isDynamicDateParameter

    boolean isDynamicDateParameter()

  Indicates whether the parameter is dynamic datetime parameter.

  Returns:
    true the parameter is dynamic datetime parameter.

### getDynamicDisplayValue

    java.lang.String getDynamicDisplayValue(long currTime,
                                            java.util.Locale local)

  Deprecated. replaced by `getDynamicDisplayValue(long)`, and set locale via `setLocale(Locale)`.

  Returns dynamic datetime display value for the specified time in milliseconds.

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

### getDynamicDisplayValue

    java.lang.String getDynamicDisplayValue(long currTime)

  Returns dynamic datetime display value for the specified time in milliseconds, format based on the Locale of this object set by `setLocale(Locale)`.

  Parameters:
    `currTime` - the current local system time in milliseconds.
  Returns:
    The display string of Dynamic parameter based on local.

### isHideParameterWhenSingleValueReturn

    boolean isHideParameterWhenSingleValueReturn()

  For bound with column parameter, return whether this parameter is hidden when single value is returned. It is meaningful only when `isColumn()` is `true`.

  Returns:
    whether this parameter is hidden when single value is returned.
  See Also:
    `isColumn()`

### getBooleanLiteral

    java.lang.String[][] getBooleanLiteral()

  For Boolean type parameter, returns boolean literals.

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

### isMultiple

    boolean isMultiple()

  Returns whether the parameter allows for multiple values to be selected.

  Returns:
    return true if the parameter allows for multiple values to be selected, or else return false.

### isAllowAll

    boolean isAllowAll()

  Returns whether the parameter allows the ALL value to represent all the values of the parameter.

  Returns:
    whether the parameter allows the ALL value.

### isCascading

    boolean isCascading()

  Returns whether the parameter is a member of a group of cascading parameters.

  Returns:
    whether the parameter is a member of a group of cascading parameters.

### getPreviousLevel

    java.lang.String getPreviousLevel()

  For cascading parameter, returns the higher level parameter name. If the parameter is a non-cascading parameter or it is the highest level of the cascading group, return null.

  Returns:
    the parent level parameter name.

### getNextLevel

    java.lang.String getNextLevel()

  For cascading parameter, returns the lower level parameter name. If the parameter is a non-cascading parameter or it is the lowest level of the cascading group, return null.

  Returns:
    the lower level parameter name.

### isSetAsParameter

    boolean isSetAsParameter()

  For cascading parameter, returns whether the parameter is set as an independent parameter that can be used alone.

  Returns:
    whether the parameter is set as an independent parameter that can be used alone.

### isAllowTypeIn

    boolean isAllowTypeIn()

  Returns whether the parameter allows for typing in values directly.
  If it is true, UI should allow users to type in values directly regardless whether the parameter is bound with column.

  Returns:
    whether the parameter allows type-in values.

### getWhenOutOfRange

    int getWhenOutOfRange()

  Returns the processing way when a typed value is out of range.

  Returns:
    `ParamDesc.ADOPT_DIRECTLY` or `ParamDesc.USE_DEFAULT` or `ParamDesc.WARN`
  See Also:
    `ParamDesc`

### detectInvalidValues

    java.lang.String[] detectInvalidValues(java.lang.String[] values)

  Detects whether values are out of range (value list of parameter), based on the Locale of this object set by `setLocale(Locale)`.

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

### check

    void check(java.lang.String value)
               throws RptServerException

  Checks whether a value is valid for the parameter, based on the 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.

### validateValue

    java.lang.String validateValue(java.lang.String paramValue)
                                   throws RptServerException

  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` - if the value is invalid for the parameter.

### isGetValueFromAPI

    boolean isGetValueFromAPI()

  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.

### getValueList

    java.util.Vector<java.lang.String[]> getValueList()

  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.

### needNLSDisplayValue

    boolean needNLSDisplayValue()

  Check whether the display value need nls

  Returns:
    true when need nls, false when no need nls.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD