SL-GMS Enterprise RTView Customization

com.sl.gmsjrtviewds
Class GmsRtViewDsOptions

java.lang.Object
  extended by com.sl.gmsjrtview.GmsRtViewDataObject
      extended by com.sl.gmsjrtviewds.GmsRtViewDsOptions
All Implemented Interfaces:
com.sl.gmsjrt.GmsDataObjectType, com.sl.gmsjrtview.GmsRtViewDataObjectType

public class GmsRtViewDsOptions
extends com.sl.gmsjrtview.GmsRtViewDataObject

The GmsRtViewDsOptions class contains information which controls or modifies the behavior of a datasource.

To customize this class for a given application, add named fields to the Exemplar to hold the information needed. DsOptions objects, with their custom fields, are edited via the Application Options dialog.


Field Summary
 
Fields inherited from class com.sl.gmsjrtview.GmsRtViewDataObject
name
 
Constructor Summary
GmsRtViewDsOptions(GmsRtViewDs owner)
          Create a ds options object with the specified parameters.
 
Method Summary
 boolean addField(java.lang.String name)
          Add a new field to the object.
 boolean addField(java.lang.String name, java.lang.String dialogFieldType)
          Add a new field to the object and specifies the user interface element that will be used to represent the field in a dialog.
 boolean addScrambledField(java.lang.String name)
          Add a new scrambled field to the object.
 boolean addScrambledField(java.lang.String name, java.lang.String dialogFieldType)
          Add a new scrambled field to the object and specifies the user interface element that will be used to represent the field in a dialog.
protected static java.util.LinkedHashMap copyFieldAttrs(java.util.LinkedHashMap exemplarFieldAttrs)
          Copy field attrs
 boolean equals(java.lang.Object o)
          Compares this DsOptions object to the specified object.
 java.lang.String getDataField(java.lang.String fieldName)
          Return a String containing the value of the named field.
 java.util.List getFieldChoices(java.lang.String fieldName)
          Return a List of possible values for the named field when displayed in a dialog.
 java.util.List getFieldNames()
          Return a List containing the names of all defined fields.
 java.lang.String getFieldSubstitutionValue(java.lang.String fieldName)
          Return the value of the named field with available substitutions applied.
 DialogFieldState getFieldUIState(java.lang.String fieldName)
          Return a DialogFieldState value representing the user interface state of the named field when displayed in a dialog.
 DataFieldValidity getFieldValidity(java.lang.String fieldName)
          Return a DataFieldValidity value representing the validity of the value in the named field.
 java.lang.String getFieldValue(java.lang.String fieldName)
          Return a String containing the value of the named field.
 int hashCode()
          Returns a hash code for this DsOptions object.
 boolean isScrambledField(java.lang.String name)
          Test if the named field a scrambled field.
 void setFieldChoices(java.lang.String fieldName, java.util.Set choices)
          Set the possible values for the named field when displayed in a dialog.
 void setFieldUIState(java.lang.String fieldName, DialogFieldState state)
          Set the user interface state of the named field when displayed in a dialog.
 void setFieldValidity(java.lang.String fieldName, DataFieldValidity validity)
          Set the validity of the value in the named field.
 boolean setFieldValue(java.lang.String fieldName, java.lang.String fieldValue)
          Set the value of the named field.
 void setUpdatePeriod(int updatePeriod)
          Set the update period (in seconds).
 
Methods inherited from class com.sl.gmsjrtview.GmsRtViewDataObject
addListener, applyDataToListener, applyDataToListeners, getColumnNames, getColumnNames, getData, getDataField, getListeners, getName, getVarNames, isEmpty, removeListener, removeListener, toString, updateDataField
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GmsRtViewDsOptions

public GmsRtViewDsOptions(GmsRtViewDs owner)
Create a ds options object with the specified parameters.

Method Detail

equals

public boolean equals(java.lang.Object o)
Compares this DsOptions object to the specified object. The result is true if and only if the argument is not null and is a DsOptions object with the same initialization properties as this object.

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to compare this DsOptions object against.
Returns:
true if the DsOptions objects are equal; false otherwise

hashCode

public int hashCode()
Returns a hash code for this DsOptions object.

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.

setFieldValue

public boolean setFieldValue(java.lang.String fieldName,
                             java.lang.String fieldValue)
Set the value of the named field.

Parameters:
fieldName - the name of the field
fieldValue - the value of the field
Returns:
flag indicating whether the operation was successful

setUpdatePeriod

public void setUpdatePeriod(int updatePeriod)
Set the update period (in seconds). This can be used to set the default update period for a data source, by setting it on the options exemplar. Note this will be overridden by the loaded, previously saved, data source options from the .INI file

Parameters:
updatePeriod -

addField

public boolean addField(java.lang.String name)
Add a new field to the object.

Parameters:
name - the name of the field
Returns:
true if the field was successfully added.

addField

public boolean addField(java.lang.String name,
                        java.lang.String dialogFieldType)
Add a new field to the object and specifies the user interface element that will be used to represent the field in a dialog.

Parameters:
name - the name of the field.
dialogFieldType - how the field will be displayed in a dialog.
Returns:
true if the field was successfully added.

addScrambledField

public boolean addScrambledField(java.lang.String name)
Add a new scrambled field to the object.

Parameters:
name - The name of the field to add.
Returns:
true if the field was successfully added.

addScrambledField

public boolean addScrambledField(java.lang.String name,
                                 java.lang.String dialogFieldType)
Add a new scrambled field to the object and specifies the user interface element that will be used to represent the field in a dialog.

Parameters:
name - The name of the field
dialogFieldType - how the field will be displayed in a dialog.
Returns:
true if the field was successfully added.

copyFieldAttrs

protected static java.util.LinkedHashMap copyFieldAttrs(java.util.LinkedHashMap exemplarFieldAttrs)
Copy field attrs

Parameters:
exemplarFieldAttrs -
Returns:
populated copy of fieldAttrs

getDataField

public java.lang.String getDataField(java.lang.String fieldName)
Return a String containing the value of the named field.

Specified by:
getDataField in interface com.sl.gmsjrt.GmsDataObjectType
Overrides:
getDataField in class com.sl.gmsjrtview.GmsRtViewDataObject
Parameters:
fieldName - the name of the field
Returns:
the value of the named field

getFieldChoices

public java.util.List getFieldChoices(java.lang.String fieldName)
Return a List of possible values for the named field when displayed in a dialog.

Parameters:
fieldName - the name of the field to return
Returns:
a List of possible values for the named field

getFieldNames

public java.util.List getFieldNames()
Return a List containing the names of all defined fields.

Returns:
List of all field names.

getFieldSubstitutionValue

public java.lang.String getFieldSubstitutionValue(java.lang.String fieldName)
Return the value of the named field with available substitutions applied.

Parameters:
fieldName - the name of the field to return
Returns:
the value of the named field with available substitutions applied

getFieldUIState

public DialogFieldState getFieldUIState(java.lang.String fieldName)
Return a DialogFieldState value representing the user interface state of the named field when displayed in a dialog.

Parameters:
fieldName - the name of the field to return
Returns:
a DialogFieldState value representing the user interface state of the named field:
  • DialogFieldState.HIDDEN
  • DialogFieldState.DISABLED
  • DialogFieldState.ENABLED
  • DialogFieldState.EDITABLE
  • DialogFieldState.UNKNOWN

getFieldValidity

public DataFieldValidity getFieldValidity(java.lang.String fieldName)
Return a DataFieldValidity value representing the validity of the value in the named field.

Parameters:
fieldName - the name of the field to return
Returns:
a DataFieldValidity value representing the validity of the value of the named field:
  • DataFieldValidity.GOOD
  • DataFieldValidity.BAD
  • DataFieldValidity.NOTREQ
  • DataFieldValidity.UNKNOWN

getFieldValue

public java.lang.String getFieldValue(java.lang.String fieldName)
Return a String containing the value of the named field.

Parameters:
fieldName - the name of the field
Returns:
the value of the named field

isScrambledField

public boolean isScrambledField(java.lang.String name)
Test if the named field a scrambled field.

Parameters:
name - The name of the field
Returns:
true if the named field a scrambled field

setFieldChoices

public void setFieldChoices(java.lang.String fieldName,
                            java.util.Set choices)
Set the possible values for the named field when displayed in a dialog.

Parameters:
fieldName - the name of the field to return
choices - a List of possible values for the named field

setFieldUIState

public void setFieldUIState(java.lang.String fieldName,
                            DialogFieldState state)
Set the user interface state of the named field when displayed in a dialog.

Parameters:
fieldName - the name of the field to return
state - a DialogFieldState value representing the user interface state of the named field:
  • DialogFieldState.HIDDEN
  • DialogFieldState.DISABLED
  • DialogFieldState.ENABLED
  • DialogFieldState.EDITABLE

setFieldValidity

public void setFieldValidity(java.lang.String fieldName,
                             DataFieldValidity validity)
Set the validity of the value in the named field.

Parameters:
fieldName - the name of the field to return
validity - a DataFieldValidity value representing the validity of the value of the named field:
  • DataFieldValidity.GOOD
  • DataFieldValidity.BAD
  • DataFieldValidity.NOTREQ
  • DataFieldValidity.UNKNOWN

SL-GMS Enterprise RTView Customization

Copyright 2009 Sherrill-Lubinski Corporation, 240 Tamal Vista Blvd
Corte Madera, CA 94925, U.S.A. All Rights Reserved