com.wm.app.tn.profile
Class ExtendedProfileField

java.lang.Object
  extended by com.wm.app.tn.util.TNFixedData
      extended by com.wm.app.tn.profile.ExtendedProfileField
All Implemented Interfaces:
com.wm.data.IData, java.lang.Cloneable

public class ExtendedProfileField
extends TNFixedData

An ExtendedProfileField represents a single extended field in a partner profile.

See Also:
ProfileFieldMetaData

Nested Class Summary
 
Nested classes/interfaces inherited from class com.wm.app.tn.util.TNFixedData
TNFixedData.TreeCursor
 
Constructor Summary
ExtendedProfileField()
          Creates an empty ProfileField.
ExtendedProfileField(java.lang.String partnerID, ProfileFieldMetaData pfmd)
          Constructs a value-less ExtendedProfileField for a Partner from a ProfileFieldMetaData.
 
Method Summary
static com.wm.data.IData create()
          Creates an ExtendedProfileField.
 ProfileFieldMetaData getMetaData()
           
 java.lang.String getName()
           
 java.lang.String getPartnerDisplayName()
          For INTERNAL use only
 java.lang.String getPartnerID()
           
 java.lang.Object getValue()
           
 java.lang.String[] isValid()
          Validates the ExtendedProfileField.
 java.lang.String[] isValidLocal()
          This is for client side use only
 void setMetaData(ProfileFieldMetaData pfmd)
          Sets the metadata of the field
 void setPartnerDisplayName(java.lang.String partnerName)
          For INTERNAL use only
 void setPartnerID(java.lang.String partnerID)
          Assigns the field to a partner
 void setValue(java.lang.Object value)
          Sets the value of the field
 
Methods inherited from class com.wm.app.tn.util.TNFixedData
clone, dataSize, get, get, getCursor, getHashCursor, getIndexCursor, getKey, getSharedCursor, getTreeCursor, indexOf, merge, set, set, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExtendedProfileField

public ExtendedProfileField()
Creates an empty ProfileField.


ExtendedProfileField

public ExtendedProfileField(java.lang.String partnerID,
                            ProfileFieldMetaData pfmd)
Constructs a value-less ExtendedProfileField for a Partner from a ProfileFieldMetaData.

See Also:
ProfileFieldMetaData
Method Detail

create

public static com.wm.data.IData create()
Creates an ExtendedProfileField. Used by the IDataCoders.


getName

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

getValue

public final java.lang.Object getValue()
Returns:
the field's value. Use getMetaData().getDatatype() to discover what type to cast it to.

getPartnerID

public final java.lang.String getPartnerID()
Returns:
the TN-assigned identifier of the partner that the field belongs to

getMetaData

public final ProfileFieldMetaData getMetaData()
Returns:
the metadata that describes the field

getPartnerDisplayName

public final java.lang.String getPartnerDisplayName()
For INTERNAL use only


setPartnerID

public final void setPartnerID(java.lang.String partnerID)
Assigns the field to a partner


setValue

public final void setValue(java.lang.Object value)
Sets the value of the field

Parameters:
value - the field's new value

setMetaData

public final void setMetaData(ProfileFieldMetaData pfmd)
Sets the metadata of the field

Parameters:
pfmd - the field's metadata
See Also:
ProfileFieldMetaData

setPartnerDisplayName

public final void setPartnerDisplayName(java.lang.String partnerName)
For INTERNAL use only


isValid

public final java.lang.String[] isValid()
Validates the ExtendedProfileField. If a value is required, verifies that one is present. If valid value constraints exist, verifies that the value conforms.

Returns:
an array of String error messages if not valid, otherwise null.

isValidLocal

public final java.lang.String[] isValidLocal()
This is for client side use only