com.sun.mdm.index.edm.services.configuration
Class FieldConfig

java.lang.Object
  extended bycom.sun.mdm.index.edm.services.configuration.FieldConfig
All Implemented Interfaces:
java.lang.Comparable, java.io.Serializable

public class FieldConfig
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

for one search field displayed on UI.

See Also:
Serialized Form

Field Summary
static java.lang.String GUI_TYPE_MENULIST
          constant
static java.lang.String GUI_TYPE_TEXTBOX
          constant
 
Constructor Summary
FieldConfig(java.lang.String objRef, java.lang.String name, java.lang.String displayName, java.lang.String guiType, int maxLength)
          Construct a FieldConfig object with all required properties.
FieldConfig(java.lang.String objRef, java.lang.String name, java.lang.String displayName, java.lang.String guiType, int maxLength, int valueType)
          Construct a FieldConfig object with all required properties.
FieldConfig(java.lang.String objRef, java.lang.String name, java.lang.String displayName, java.lang.String guiType, int maxLength, java.lang.String gvalueList)
          Construct a FieldConfig object with all required properties.
FieldConfig(java.lang.String rootObj, java.lang.String objRef, java.lang.String name, java.lang.String displayName, int maxSize, java.lang.String guiType, int maxLength)
          Construct a FieldConfig object with all required properties
FieldConfig(java.lang.String rootObj, java.lang.String objRef, java.lang.String name, java.lang.String displayName, int maxSize, java.lang.String guiType, int maxLength, int valueType)
          Construct a FieldConfig object with all required properties
FieldConfig(java.lang.String rootObj, java.lang.String objRef, java.lang.String name, java.lang.String displayName, int maxSize, java.lang.String guiType, int maxLength, java.lang.String gvalueList)
          Construct a FieldConfig object with all required properties
FieldConfig(java.lang.String rootObj, java.lang.String objRef, java.lang.String name, java.lang.String displayName, java.lang.String guiType, int maxLength)
          Construct a FieldConfig object with all required properties.
FieldConfig(java.lang.String rootObj, java.lang.String objRef, java.lang.String name, java.lang.String displayName, java.lang.String guiType, int maxLength, int valueType)
          Construct a FieldConfig object with all required properties
FieldConfig(java.lang.String rootObj, java.lang.String objRef, java.lang.String name, java.lang.String displayName, java.lang.String guiType, int maxLength, java.lang.String gvalueList)
          Construct a FieldConfig object with all required properties.
 
Method Summary
 int compareTo(java.lang.Object obj)
           
 java.lang.Object copy()
           
 java.lang.String demask(java.lang.String value)
          apply the value mask
 java.lang.String getConstraintBy()
          Gets the constraintBy attribute of the FieldConfig object
 java.lang.String getDisplayName()
           
 int getDisplayOrder()
          Gets the displayOrder attribute of the FieldConfig object
 java.lang.String getFullFieldName()
          Retrieves the full name of an field
 java.lang.String getFullName()
          RANGE_SEARCH: Full name that is used in the generated html to identify this field.
 java.lang.String getGuiType()
          Gets the guiType attribute of the FieldConfig object
static int getIndex(java.lang.String fullName)
          RANGE_SEARCH: Determine the index of a field full name.
 java.lang.String getInputMask()
           
 int getMaxLength()
          Gets the maxLength attribute of the FieldConfig object
 int getMaxSize()
          Gets the maxSize attribute of the FieldConfig object
 java.lang.String getName()
           
 java.lang.String getObjRef()
           
 int getPossibleValueCount()
           
 PullDownListItem[] getPossibleValues()
           
 java.util.List getPossibleValuesList()
           
 java.lang.String getRootObj()
           
 java.util.ArrayList getSelectOptions()
          This getter method returns the array list of select items which will be used to populate the select options in JSF framework.
 java.lang.String getUserCode()
          Gets the userCode attribute of the FieldConfig object
 java.lang.String getValueList()
          get the value list
 java.lang.String getValueMask()
           
 int getValueType()
           
 boolean isExtraField()
          Gets the extraField attribute of the FieldConfig object
 boolean isKeyType()
          Gets the keyType attribute of the FieldConfig object
 boolean isOneOfTheseRequired()
          Gets the oneOftheseRequired attribute of the FieldConfig object
 boolean isRange()
          getter method for the range field
 boolean isRequired()
          Gets the required attribute of the FieldConfig object
 boolean isSensitive()
          Gets the sensitive attribute of the FieldConfig object
 boolean isUpdateable()
          Gets the updateable attribute of the FieldConfig object
static void main(java.lang.String[] args)
           
 java.lang.String mask(java.lang.String value)
          apply the input mask
 void setConstraintBy(java.lang.String val)
          Sets the constraintBy attribute of the FieldConfig object
 void setDisplayOrder(int val)
          Sets the displayOrder attribute of the FieldConfig object
 void setExtraField(boolean val)
          Sets the extraField attribute of the FieldConfig object
 void setInputMask(java.lang.String inputMask)
          set the input mask
 void setKeyType(boolean val)
          Sets the keyType attribute of the FieldConfig object
 void setMaxLength(int length)
          Sets the maxLength attribute of the FieldConfig object
 void setMaxSize(int size)
          Sets the maxSize attribute of the FieldConfig object
 void setOneOfTheseRequired(boolean val)
          Sets the oneOfTheseRequired attribute of the FieldConfig object
 void setRange(boolean range)
           
 void setRequired(boolean val)
          Sets the required attribute of the FieldConfig object
 void setRootObject(java.lang.String val)
           
 void setSelectOptions(java.util.ArrayList selectOptions)
          Setter method for the array of list items.
 void setSensitive(boolean val)
          Sets the sensitive attribute of the FieldConfig object
 void setUpdateable(boolean val)
          Sets the updateable attribute of the FieldConfig object
 void setUsage(java.lang.String usage)
          RANGE_SEARCH: set the usage code for this field (how will the field be used) If not set, then usage will be null.
 void setUserCode(java.lang.String val)
          Sets the userCode attribute of the FieldConfig object
 void setValueList(java.lang.String valueList)
          set the value list
 void setValueMask(java.lang.String valueMask)
          set the value mask
static java.lang.String toEpathStyleString(java.lang.String fullName)
          convert a field full name back to a ePath style string
 java.lang.String toString()
          Description of the Method
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

GUI_TYPE_MENULIST

public static final java.lang.String GUI_TYPE_MENULIST
constant

See Also:
Constant Field Values

GUI_TYPE_TEXTBOX

public static final java.lang.String GUI_TYPE_TEXTBOX
constant

See Also:
Constant Field Values
Constructor Detail

FieldConfig

public FieldConfig(java.lang.String objRef,
                   java.lang.String name,
                   java.lang.String displayName,
                   java.lang.String guiType,
                   int maxLength)
Construct a FieldConfig object with all required properties. If maxSize is not known, then it is set to maxLength.

Parameters:
objRef - object to which this field belongs
name - name of the field
displayName - display name of the field
guiType - gui type of the field
maxLength - max length of the field

FieldConfig

public FieldConfig(java.lang.String objRef,
                   java.lang.String name,
                   java.lang.String displayName,
                   java.lang.String guiType,
                   int maxLength,
                   int valueType)
Construct a FieldConfig object with all required properties. If maxSize is not known, then it is set to maxLength.

Parameters:
objRef - obj ref of the field
name - name of the field
displayName - display name of the field
guiType - gui type of the field
maxLength - max length of the field
valueType - value type of the field

FieldConfig

public FieldConfig(java.lang.String objRef,
                   java.lang.String name,
                   java.lang.String displayName,
                   java.lang.String guiType,
                   int maxLength,
                   java.lang.String gvalueList)
Construct a FieldConfig object with all required properties. If maxSize is not known, then it is set to maxLength.

Parameters:
objRef - obj ref of the field
name - name of the field
displayName - dislay name of the field
guiType - gui type of the field
maxLength - max length of the field
gvalueList - value list of the field

FieldConfig

public FieldConfig(java.lang.String rootObj,
                   java.lang.String objRef,
                   java.lang.String name,
                   java.lang.String displayName,
                   int maxSize,
                   java.lang.String guiType,
                   int maxLength)
Construct a FieldConfig object with all required properties

Parameters:
rootObj - root object to which this field belongs
objRef - object to which this field belongs
name - name of the field
displayName - display name of the field
maxSize - max size of the database column
guiType - gui type of the field
maxLength - max length of the field

FieldConfig

public FieldConfig(java.lang.String rootObj,
                   java.lang.String objRef,
                   java.lang.String name,
                   java.lang.String displayName,
                   int maxSize,
                   java.lang.String guiType,
                   int maxLength,
                   int valueType)
Construct a FieldConfig object with all required properties

Parameters:
rootObj - root object to which this field belongs
objRef - obj ref of the field
name - name of the field
displayName - display name of the field
maxSize - max size of the database column
guiType - gui type of the field
maxLength - max length of the field
valueType - value type of the field

FieldConfig

public FieldConfig(java.lang.String rootObj,
                   java.lang.String objRef,
                   java.lang.String name,
                   java.lang.String displayName,
                   int maxSize,
                   java.lang.String guiType,
                   int maxLength,
                   java.lang.String gvalueList)
Construct a FieldConfig object with all required properties

Parameters:
rootObj - root object to which this field belongs
objRef - obj ref of the field
name - name of the field
displayName - dislay name of the field
maxSize - max size of the database column
guiType - gui type of the field
maxLength - max length of the field
gvalueList - value list of the field

FieldConfig

public FieldConfig(java.lang.String rootObj,
                   java.lang.String objRef,
                   java.lang.String name,
                   java.lang.String displayName,
                   java.lang.String guiType,
                   int maxLength)
Construct a FieldConfig object with all required properties. If maxSize is not known, then it is set to maxLength.

Parameters:
rootObj - root object to which this field belongs
objRef - object to which this field belongs
name - name of the field
displayName - display name of the field
guiType - gui type of the field
maxLength - max length of the field

FieldConfig

public FieldConfig(java.lang.String rootObj,
                   java.lang.String objRef,
                   java.lang.String name,
                   java.lang.String displayName,
                   java.lang.String guiType,
                   int maxLength,
                   int valueType)
Construct a FieldConfig object with all required properties

Parameters:
rootObj - root object to which this field belongs
objRef - obj ref of the field
name - name of the field
displayName - display name of the field
guiType - gui type of the field
maxLength - max length of the field
valueType - value type of the field

FieldConfig

public FieldConfig(java.lang.String rootObj,
                   java.lang.String objRef,
                   java.lang.String name,
                   java.lang.String displayName,
                   java.lang.String guiType,
                   int maxLength,
                   java.lang.String gvalueList)
Construct a FieldConfig object with all required properties. If maxSize is not known, then it is set to maxLength.

Parameters:
rootObj - root object to which this field belongs
objRef - obj ref of the field
name - name of the field
displayName - dislay name of the field
guiType - gui type of the field
maxLength - max length of the field
gvalueList - value list of the field
Method Detail

compareTo

public int compareTo(java.lang.Object obj)
Parameters:
obj - the other obj
Returns:
the result: greater than 0, equal to 0, or less than 0

copy

public java.lang.Object copy()

demask

public java.lang.String demask(java.lang.String value)
apply the value mask

Parameters:
value - the value from GUI
Returns:
the value to be saved in db

getConstraintBy

public java.lang.String getConstraintBy()
Gets the constraintBy attribute of the FieldConfig object

Returns:
The constraint by value

getDisplayName

public java.lang.String getDisplayName()
Returns:
the dislay name

getDisplayOrder

public int getDisplayOrder()
Gets the displayOrder attribute of the FieldConfig object

Returns:
The displayOrder value

getFullFieldName

public java.lang.String getFullFieldName()
Retrieves the full name of an field

Returns:
full name of the field

getFullName

public java.lang.String getFullName()
RANGE_SEARCH: Full name that is used in the generated html to identify this field. The full name begins with the object name (e.g. Person) if it exists, followed by a separator (____), followed by the name of the field. If the usage flag is null, then no other values are appended. If the usage flag is not null, then the flag is appended to the name. This is used later to identify the index position of this field in getIndex().

Returns:
the full name

getGuiType

public java.lang.String getGuiType()
Gets the guiType attribute of the FieldConfig object

Returns:
The guiType value

getIndex

public static int getIndex(java.lang.String fullName)
RANGE_SEARCH: Determine the index of a field full name. If field full name ends with ____rangeFrom, then index is 1, if ____rangeTo, then index is 2, otherwise index is 0. The index position is used when constructing search criteria to determine whether the field value belongs to object 0,1,or 2. Object 1 and 2 are to convey criteria for a range search.

Parameters:
fullName - full name
Returns:
the ePath style string

getInputMask

public java.lang.String getInputMask()
Returns:
the input mask string

getMaxLength

public int getMaxLength()
Gets the maxLength attribute of the FieldConfig object

Returns:
The maxLength value

getMaxSize

public int getMaxSize()
Gets the maxSize attribute of the FieldConfig object

Returns:
The maxSize value

getName

public java.lang.String getName()
Returns:
the name

getObjRef

public java.lang.String getObjRef()
Returns:
the obj ref

getPossibleValueCount

public int getPossibleValueCount()
Returns:
the possible value count

getPossibleValues

public PullDownListItem[] getPossibleValues()
                                     throws java.lang.Exception
Returns:
the items
Throws:
java.lang.Exception

getPossibleValuesList

public java.util.List getPossibleValuesList()
                                     throws java.lang.Exception
Returns:
the possible values
Throws:
java.lang.Exception

getRootObj

public java.lang.String getRootObj()

getSelectOptions

public java.util.ArrayList getSelectOptions()
                                     throws java.lang.Exception
This getter method returns the array list of select items which will be used to populate the select options in JSF framework.

Returns:
ArrayList
Throws:
java.lang.Exception

getUserCode

public java.lang.String getUserCode()
Gets the userCode attribute of the FieldConfig object

Returns:
The user code value

getValueList

public java.lang.String getValueList()
get the value list

Returns:
valueList a String value

getValueMask

public java.lang.String getValueMask()
Returns:
the input mask string

getValueType

public int getValueType()
Returns:
the value type

isExtraField

public boolean isExtraField()
Gets the extraField attribute of the FieldConfig object

Returns:
The extraField value

isKeyType

public boolean isKeyType()
Gets the keyType attribute of the FieldConfig object

Returns:
The keyType value

isOneOfTheseRequired

public boolean isOneOfTheseRequired()
Gets the oneOftheseRequired attribute of the FieldConfig object

Returns:
The oneOftheseRequired value

isRange

public boolean isRange()
getter method for the range field

Returns:
boolean

isRequired

public boolean isRequired()
Gets the required attribute of the FieldConfig object

Returns:
The required value

isSensitive

public boolean isSensitive()
Gets the sensitive attribute of the FieldConfig object

Returns:
The sensitive value

isUpdateable

public boolean isUpdateable()
Gets the updateable attribute of the FieldConfig object

Returns:
The updateable value

main

public static void main(java.lang.String[] args)

mask

public java.lang.String mask(java.lang.String value)
apply the input mask

Parameters:
value - the value saved in database
Returns:
the value to display in GUI

setConstraintBy

public void setConstraintBy(java.lang.String val)
Sets the constraintBy attribute of the FieldConfig object

Parameters:
val - the constraint by value

setDisplayOrder

public void setDisplayOrder(int val)
Sets the displayOrder attribute of the FieldConfig object

Parameters:
val - the display order to be set to

setExtraField

public void setExtraField(boolean val)
Sets the extraField attribute of the FieldConfig object

Parameters:
val - the init value

setInputMask

public void setInputMask(java.lang.String inputMask)
set the input mask

Parameters:
inputMask - the mask

setKeyType

public void setKeyType(boolean val)
Sets the keyType attribute of the FieldConfig object

Parameters:
val - the init value

setMaxLength

public void setMaxLength(int length)
Sets the maxLength attribute of the FieldConfig object


setMaxSize

public void setMaxSize(int size)
Sets the maxSize attribute of the FieldConfig object

Parameters:
size - new max size

setOneOfTheseRequired

public void setOneOfTheseRequired(boolean val)
Sets the oneOfTheseRequired attribute of the FieldConfig object

Parameters:
val - the oneOfTheseRequired value

setRange

public void setRange(boolean range)

setRequired

public void setRequired(boolean val)
Sets the required attribute of the FieldConfig object

Parameters:
val - the required value

setRootObject

public void setRootObject(java.lang.String val)

setSelectOptions

public void setSelectOptions(java.util.ArrayList selectOptions)
Setter method for the array of list items.

Parameters:
selectOptions -

setSensitive

public void setSensitive(boolean val)
Sets the sensitive attribute of the FieldConfig object

Parameters:
val - the init value

setUpdateable

public void setUpdateable(boolean val)
Sets the updateable attribute of the FieldConfig object

Parameters:
val - the updateable value

setUsage

public void setUsage(java.lang.String usage)
RANGE_SEARCH: set the usage code for this field (how will the field be used) If not set, then usage will be null. If usage is non-null, then it is used to determine display name and index position (see other comments in this class file).

Parameters:
usage - usage

setUserCode

public void setUserCode(java.lang.String val)
Sets the userCode attribute of the FieldConfig object

Parameters:
val - the user code value

setValueList

public void setValueList(java.lang.String valueList)
set the value list

Parameters:
valueList - the list

setValueMask

public void setValueMask(java.lang.String valueMask)
set the value mask

Parameters:
valueMask - the mask

toEpathStyleString

public static java.lang.String toEpathStyleString(java.lang.String fullName)
convert a field full name back to a ePath style string

Parameters:
fullName - full name
Returns:
the ePath style string

toString

public java.lang.String toString()
Description of the Method

Returns:
Description of the Return Value


Sun Microsystems, Inc.