com.bea.wli.worklist.portal
Class PropertyInstanceHolder

java.lang.Object
  extended by com.bea.wli.worklist.portal.PropertyInstanceHolder
All Implemented Interfaces:
DataTypeInPlaceEditableValue, DataTypeValue, PropertyInstance, Serializable

public class PropertyInstanceHolder
extends Object
implements PropertyInstance, DataTypeInPlaceEditableValue

Utility class to assist in the editing of task properties. This class holds a PropertyInstance from a task, and decorates it with a summary value and other helper classes. These helpers allow the property to be edited in-place, and ease the interaction with standard property editors like the text and JavaBean/XMLBean property editors.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.bea.wli.datatype.DataTypeValue
VALUE_PROPERTY_NAME
 
Fields inherited from interface com.bea.wli.datatype.DataTypeInPlaceEditableValue
VALUE_PROPERTY_NAME
 
Constructor Summary
PropertyInstanceHolder(PropertyInstance prop)
           
 
Method Summary
 DataType getDataType()
          Get the data type that defines the values this data type value can hold.
 String getDataTypeName()
           
 Object getDefaultValue()
           
 String getDescription()
           
 String getEditorValueAsString()
           
 DataTypeValueSummarizer.InPlaceValueMediator getInPlaceValueMediator()
           
 boolean getIsValueSet()
           
 String getName()
           
 PropertyInstance getPropertyInstance()
           
 DataTypeSerializedValue getSerializedValue()
           
 String getShortDisplayValue()
           
 Object getValue()
          Get the object value set for this data type value, or null if none has been set.
 String getValueAsString()
          Get the value for this data type as a String, or null if none has been set.
 DataTypeValueSummarizer.ValueSummary getValueSummary()
           
 boolean isSystem()
           
 boolean isValueSet()
          Returns true if getValue() or getSerializedValue() return non-null.
 void setDescriptionOverride(String descriptionOverride)
           
 void setDoOverrideValue(boolean doDefaultOverride)
           
 void setEditorValueAsString(String value)
           
 void setOverrideValue(Object defaultOverrideValue)
           
 void setOverrideValueAsString(String defaultOverrideValue)
           
 void setSerializedValue(DataTypeSerializedValue serVal)
           
 void setValue(Object value)
          Set the value of this data type value.
 void setValueAsString(String value)
          Set the value for this data type value as a String.
 void unsetValue()
          Clear any value set into this property instance.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyInstanceHolder

public PropertyInstanceHolder(PropertyInstance prop)
Method Detail

getPropertyInstance

public PropertyInstance getPropertyInstance()

getDataType

public DataType getDataType()
Description copied from interface: DataTypeValue
Get the data type that defines the values this data type value can hold.

Specified by:
getDataType in interface DataTypeInPlaceEditableValue
Specified by:
getDataType in interface DataTypeValue
Returns:

getValueSummary

public DataTypeValueSummarizer.ValueSummary getValueSummary()
                                                     throws DataTypeException
Throws:
DataTypeException

getInPlaceValueMediator

public DataTypeValueSummarizer.InPlaceValueMediator getInPlaceValueMediator()
                                                                     throws DataTypeException
Throws:
DataTypeException

getDataTypeName

public String getDataTypeName()

getDescription

public String getDescription()
Specified by:
getDescription in interface PropertyInstance

getDefaultValue

public Object getDefaultValue()
                       throws ManagementException
Specified by:
getDefaultValue in interface PropertyInstance
Throws:
ManagementException

isSystem

public boolean isSystem()
Specified by:
isSystem in interface PropertyInstance

getName

public String getName()
Specified by:
getName in interface PropertyInstance

getShortDisplayValue

public String getShortDisplayValue()
                            throws DataTypeException,
                                   ManagementException
Throws:
DataTypeException
ManagementException

getEditorValueAsString

public String getEditorValueAsString()
                              throws DataTypeException
Specified by:
getEditorValueAsString in interface DataTypeInPlaceEditableValue
Throws:
DataTypeException

getValue

public Object getValue()
                throws DataTypeException
Description copied from interface: DataTypeValue
Get the object value set for this data type value, or null if none has been set.

Specified by:
getValue in interface DataTypeValue
Returns:
The object value set for this data type value, or null if none has been set.
Throws:
DataTypeException
See Also:
DataTypeValue.isValueSet()

getIsValueSet

public boolean getIsValueSet()

isValueSet

public boolean isValueSet()
Description copied from interface: DataTypeValue
Returns true if getValue() or getSerializedValue() return non-null.

Specified by:
isValueSet in interface DataTypeValue

setEditorValueAsString

public void setEditorValueAsString(String value)
                            throws DataTypeException
Specified by:
setEditorValueAsString in interface DataTypeInPlaceEditableValue
Throws:
DataTypeException

setValue

public void setValue(Object value)
              throws DataTypeException
Description copied from interface: DataTypeValue
Set the value of this data type value. This method will verify that the type of the object matches the data type for this data type value.

Specified by:
setValue in interface DataTypeValue
Parameters:
value - Object value for this data type value. If value is null, this call has the same effect as calling unsetValue().
Throws:
DataTypeException - If the provided object value is of the wrong type for the data type value.

getValueAsString

public String getValueAsString()
                        throws DataTypeException
Description copied from interface: DataTypeValue
Get the value for this data type as a String, or null if none has been set.

Specified by:
getValueAsString in interface DataTypeValue
Throws:
DataTypeException
See Also:
DataTypeValue.isValueSet()

setValueAsString

public void setValueAsString(String value)
                      throws DataTypeException
Description copied from interface: DataTypeValue
Set the value for this data type value as a String. This will require the value to be deserialized when it is accessed via any of the other value 'get' methods.

Specified by:
setValueAsString in interface DataTypeValue
Parameters:
value - Value in the default value String form required by the data type associated with this DataTypeValue instance.
Throws:
DataTypeException

unsetValue

public void unsetValue()
Description copied from interface: DataTypeValue
Clear any value set into this property instance. After this call, the isValueSet() method will return false.

Specified by:
unsetValue in interface DataTypeValue

validate

public void validate()
              throws DataTypeException
Specified by:
validate in interface DataTypeValue
Throws:
DataTypeException

getSerializedValue

public DataTypeSerializedValue getSerializedValue()
                                           throws DataTypeException
Specified by:
getSerializedValue in interface DataTypeValue
Throws:
DataTypeException

setSerializedValue

public void setSerializedValue(DataTypeSerializedValue serVal)
                        throws DataTypeException
Specified by:
setSerializedValue in interface DataTypeValue
Throws:
DataTypeException

setDoOverrideValue

public void setDoOverrideValue(boolean doDefaultOverride)

setOverrideValue

public void setOverrideValue(Object defaultOverrideValue)

setOverrideValueAsString

public void setOverrideValueAsString(String defaultOverrideValue)
                              throws DataTypeException
Throws:
DataTypeException

setDescriptionOverride

public void setDescriptionOverride(String descriptionOverride)