ariba.util.fieldvalue
Class ExtensibleFieldValueAccessor

java.lang.Object
  extended by ariba.util.fieldvalue.BaseAccessor
      extended by ariba.util.fieldvalue.ExtensibleFieldValueAccessor
All Implemented Interfaces:
FieldValueAccessor, FieldValueGetter, FieldValueSetter

public class ExtensibleFieldValueAccessor
extends BaseAccessor
implements FieldValueSetter, FieldValueGetter

FieldValue_Extensible provides an implementation of the FieldValue interface for the Extensible interface. Clasess which implement the Extensible interface allow for named fields to be added dynamically to their instances. These fields are managed in a hashtable. The FieldValue_Extensible implementation uses this hashtable as an optional place to locate fields after we have failed to find the desired field in the usual way.


Method Summary
 java.lang.Object getValue(java.lang.Object target)
          Gets a value from the target's extendedFields hashtable.
static ExtensibleFieldValueAccessor newInstance(java.lang.Class targetClass, java.lang.String targetFieldName)
          Creates a new instance of an ExtensibleFieldValueAccessor.
 void setValue(java.lang.Object target, java.lang.Object value)
          Puts a value in the target's extendedFields hashtable.
 
Methods inherited from class ariba.util.fieldvalue.BaseAccessor
forClass, getFieldName, isApplicable
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ariba.util.fieldvalue.FieldValueAccessor
forClass, getFieldName, isApplicable
 

Method Detail

newInstance

public static ExtensibleFieldValueAccessor newInstance(java.lang.Class targetClass,
                                                       java.lang.String targetFieldName)
Creates a new instance of an ExtensibleFieldValueAccessor.

Parameters:
targetClass - the class for which the access applies.
targetFieldName - the name of the desired field
Returns:
a new ExtensibleFieldValueAccessor

getValue

public java.lang.Object getValue(java.lang.Object target)
Gets a value from the target's extendedFields hashtable. You must call setValue(...) before calling this or a FieldValueException will be thrown.

Specified by:
getValue in interface FieldValueGetter
Parameters:
target - the object on which the receiver will perform the get operation.
Returns:
the object found in the extendedFields hashtable.

setValue

public void setValue(java.lang.Object target,
                     java.lang.Object value)
Puts a value in the target's extendedFields hashtable.

Specified by:
setValue in interface FieldValueSetter
Parameters:
target - the object on which the receiver will perform the set operation.
value - the object put in the hashtable.


AribaWeb User Interface Development Framework
Copyright © 2000-2014 Ariba, Inc. All Rights Reserved.