SL-GMS Enterprise RTView Customization

com.sl.gmsjrtviewds
Class GmsRtViewDataObject

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

public class GmsRtViewDataObject
extends com.sl.gmsjrtview.GmsRtViewDataObject
implements com.sl.gmsjrtview.GmsRtViewDataObjectType, java.util.Comparator

The GmsRtViewDataObject class implements a data attachment between an Enterprise RTView object and a custom datasource. Data attachments are made to attributes of graphical objects in the Enterprise RTView Builder.

This class allows an arbitrary number of named fields to be defined in order to specify a data attachment. These fields are defined on an exemplar data object during datasource initialization, in the method GmsRtViewDs.initDataObjectExemplar(). All subsequent data objects are created with the fields defined on this exemplar.

Fields are added to the exemplar using the addField(String) or addField(String, String) methods. The second method allows the application to specify the DialogFieldType used to represent the field in the Attach To Data Dialog of the Enterprise RTView Builder.

Two additonal methods are provided to add scrambled fields, addScrambledField(String) and addScrambledField(String, String). Scrambled fields are identical to other fields except that they are not serialized to Enterprise RTView Display files in plain-text.

The serialized form of the data object is known as a dsstring. The dsstring for this class uses the following pattern:

   dskey {field1name=field1value field2name=field2value}

where dskey is the datasource key, followed by a series of fields enclosed in braces. Each field has a URL-encoded field name followed by an equals sign and a URL-encoded (and optionally scrambled) field value.

Note that field names may not begin with two underscore characters, as these field names are reserved for use by Enterprise RTView.


Field Summary
 GmsRtViewDs owner
           
 
Fields inherited from class com.sl.gmsjrtview.GmsRtViewDataObject
name
 
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
 java.lang.String getColumnFilterColumnNames()
          Return a semicolon separated list of column names that will be used for column filtering.
 java.lang.String getDataField(java.lang.String fieldName)
          Return a String containing the value of the named field.
 java.lang.String getDataKey()
          Return the data key for this object.
 java.lang.String[] getDataKeyColumnFields()
          Return the names of the fields in the dsstring that uniquely identify a data table.
 java.lang.String getDsString()
          Return a string representation of the data object.
 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.
 java.lang.String[] getIndexColumnFields()
          Get the names of fields that identify the index columns for this data object.
 java.lang.String getRowFilterColumnName()
          Return the name of the column that will be used for row filtering.
 java.lang.String getRowFilterValue()
          Return the value to match in the column used for row filtering.
 boolean isScrambledField(java.lang.String name)
          Test if the named field a scrambled field.
 boolean isUpdateModeEnabled()
          Is the update mode (and thus update mode fields) enabled?
 void setAvailableColumns(java.util.Set availableColumns)
          Set the set of column names available for row and column filtering.
 void setColumnFilterColumnNames(java.lang.String columnNames)
          Set the names of the columns that will be used for column filtering.
 void setDataKeyColumnFields(java.lang.String[] fieldNames)
          Set the names of the fields in the dsstring that uniquely identify a data table.
 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 setIndexColumnFields(java.lang.String[] fieldNames)
          Set the names of fields that identify the index columns for this data object.
 void setRowFilterColumnName(java.lang.String columnName)
          Set the name of the column that will be used for row filtering.
 void setRowFilterValue(java.lang.String value)
          Set the value to match in the column used for row filtering.
 void setUpdateModeEnabled(boolean enabled)
          Set the update mode fields enabled (or disabled)
 java.lang.String toString()
           
 
Methods inherited from class com.sl.gmsjrtview.GmsRtViewDataObject
addListener, applyDataToListener, applyDataToListeners, getColumnNames, getColumnNames, getData, getDataField, getListeners, getName, getVarNames, isEmpty, removeListener, removeListener, updateDataField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.sl.gmsjrtview.GmsRtViewDataObjectType
addListener, applyDataToListener, applyDataToListeners, getName, isEmpty, removeListener, removeListener
 
Methods inherited from interface com.sl.gmsjrt.GmsDataObjectType
getData, getDataField
 
Methods inherited from interface java.util.Comparator
compare, equals
 

Field Detail

owner

public GmsRtViewDs owner
Method Detail

getColumnFilterColumnNames

public java.lang.String getColumnFilterColumnNames()
Return a semicolon separated list of column names that will be used for column filtering.

Returns:
column names used for column filtering

getDataKey

public java.lang.String getDataKey()
Return the data key for this object. The data key is the name of the data table in the datasource for this object.

Returns:
the dataKey

getDataKeyColumnFields

public java.lang.String[] getDataKeyColumnFields()
Return the names of the fields in the dsstring that uniquely identify a data table.

Returns:
the names of the data key column fields

getDsString

public java.lang.String getDsString()
Return a string representation of the data object.

Returns:
String representation of the data object

getIndexColumnFields

public java.lang.String[] getIndexColumnFields()
Get the names of fields that identify the index columns for this data object.

Returns:
the names of the index column fields

getRowFilterColumnName

public java.lang.String getRowFilterColumnName()
Return the name of the column that will be used for row filtering.

Returns:
the name of the row filter column

getRowFilterValue

public java.lang.String getRowFilterValue()
Return the value to match in the column used for row filtering.

Returns:
the value to match in the row filter column

isUpdateModeEnabled

public boolean isUpdateModeEnabled()
Is the update mode (and thus update mode fields) enabled?

Returns:
true if update mode is enabled

setAvailableColumns

public void setAvailableColumns(java.util.Set availableColumns)
Set the set of column names available for row and column filtering.

Parameters:
availableColumns - The set of column names available for row and column filtering.

setColumnFilterColumnNames

public void setColumnFilterColumnNames(java.lang.String columnNames)
Set the names of the columns that will be used for column filtering. Multiple columns should be separated by semicolons.

Parameters:
columnNames - column names used for column filtering

setDataKeyColumnFields

public void setDataKeyColumnFields(java.lang.String[] fieldNames)
Set the names of the fields in the dsstring that uniquely identify a data table.

Parameters:
fieldNames - the names of the data key column fields

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

setIndexColumnFields

public void setIndexColumnFields(java.lang.String[] fieldNames)
Set the names of fields that identify the index columns for this data object. These fields will be automatically added as columns in the tables stored by the data source. The additional information can be used, for example, to uniquely identify the source of the data.

Parameters:
fieldNames - the names of the index column fields

setRowFilterColumnName

public void setRowFilterColumnName(java.lang.String columnName)
Set the name of the column that will be used for row filtering.

Parameters:
columnName - the name of the row filter column

setRowFilterValue

public void setRowFilterValue(java.lang.String value)
Set the value to match in the column used for row filtering.

Parameters:
value - the value to match in the column used for row filtering

setUpdateModeEnabled

public void setUpdateModeEnabled(boolean enabled)
Set the update mode fields enabled (or disabled)

Parameters:
enabled -

toString

public java.lang.String toString()
Overrides:
toString in class com.sl.gmsjrtview.GmsRtViewDataObject

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