public interface IDfValueAssistance
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getActualValue(java.lang.String displayValue)
Return the possible actual value mapped to the specified
displayValue . |
IDfList |
getActualValues()
Return the list of possible actual values that the user can choose
from.
|
java.lang.String |
getDisplayValue(java.lang.String actualValue)
Return the possible display value mapped to the specified actual value.
|
IDfList |
getDisplayValues()
Return the list of possbile attribute display values.
|
boolean |
isListComplete()
Indicate whether value assistance is complete or not.
|
boolean |
isValidForDependentValues(IDfProperties depAttrValues)
Indicate whether the value assistance is valid or not.
|
boolean |
isValidForObject(IDfPersistentObject objectInstance)
Indicate whether the value assistance is valid or not.
|
IDfList getActualValues()
java.lang.String getActualValue(java.lang.String displayValue) throws DfException
displayValue
.
If the specified displayValue
is not found, null
will be returned. Note: a developer can specify a value mapping table in the data dictionary. It maps a possible "actual value" to a user-friendly display value. For example, there could be a mapping as follows in the data dictionary:
Actual Value Display Value CA California NY New York FL FloridaIn a UI, the end-user will see California, New York and Florida in a drop down list. If the end-user chooses California, the application will map California back to its "actual value", CA, and store CA in the Documentum server as the attribute value for that object instance.
The following code example demonstrates how to obtain an IDfValueAssistance interface for a sysobject and display the actual values for an attribute:
IDfPersistentObject pObj = sess.getObject(new DfId("0900d5bb8001fd49")); IDfValidator v = pObj.getValidator(); IDfValueAssistance va = v.getValueAssistance("attr_list", null); String actualVal = va.getActualValue("California"); if (actualVal.equals("CA")) { // Do something here.. }
displayValue
- the display value.null
if the specified displayValue is not found.DfException
IDfList getDisplayValues()
The following code example demonstrates how to obtain an IDfValueAssistance interface for an IDfPersistentObject and the display values for an attribute:
IDfPersistentObject pObj = sess.getObject(new DfId("0900d5bb8001fd49")); IDfValidator v = pObj.getValidator(); IDfValueAssistance va = v.getValueAssistance("attr_list", null); IDfList listVals = va.getDisplayValues(); for (int i = 0; i < listVals.getCount(); i++) { System.out.println("Display Value: " + listVals.getString(i)); }
java.lang.String getDisplayValue(java.lang.String actualValue) throws DfException
null
will be returned.actualValue
- the actual valuenull
, if the specified actualValue is not found.DfException
boolean isListComplete()
true
if the value assistance is complete, false
otherwise.boolean isValidForObject(IDfPersistentObject objectInstance) throws DfException
objectInstance
.objectInstance
- the object instance where the values of
the depending attributes will be looked
up fromtrue
if the value assistance is valid, false
otherwise.DfException
boolean isValidForDependentValues(IDfProperties depAttrValues) throws DfException
depAttrValues
- the attribute name/value pairs where the values
of the depending attributes will be looked
up fromtrue
if the value assistance is valid, false
otherwise.DfException
Copyright 1994-2023 OpenText Corporation. All rights reserved.