com.vodafone360.people.datatypes
Class ActivityContact

java.lang.Object
  extended by com.vodafone360.people.datatypes.BaseDataType
      extended by com.vodafone360.people.datatypes.ActivityContact

public class ActivityContact
extends BaseDataType

BaseDataType encapsulating an Activity Contact which contains contact information associated with an Activity response retrieved from the server.


Nested Class Summary
private static class ActivityContact.Tags
          Tags for fields associated with Activity Contacts.
 
Field Summary
 java.lang.String mAddress
          Optional for non-messages.
private  java.nio.ByteBuffer mAvatar
          Defines the binary data for the user's icon.
private  java.lang.String mAvatarMime
          Defines the MIME type of the avatar binary data.
 java.lang.String mAvatarUrl
          Defines an http url that the client can use to retrieve the avatar binary data.
 java.lang.Long mContactId
          The contact server id if the activity can be related to a contact.
 java.lang.Long mLocalContactId
          Local id for a Contact if activity can be related to a Contact.
 java.lang.String mName
          Contains the name of the other user.
 java.lang.String mNetwork
          This field contains information about the network (e.g. phone, flickr, google).
private  ContactDetail.DetailKeyTypes mType
          Optional for non-messages.
 java.lang.Long mUserId
          The user id if the activity can be related to a user, e.g. a message from a VF user but non-contact contains userid but not contactid, whereas a message from a contact that is also a VF user contains both contactid and userid.
 
Constructor Summary
ActivityContact()
           
 
Method Summary
static ActivityContact createFromHashTable(java.util.Hashtable<java.lang.String,java.lang.Object> hash)
          Create ActivityContact from Hashtable (generated from Hessian encoded response).
 java.lang.String name()
          Return name of the current Data-type.
private  void setValue(ActivityContact.Tags tag, java.lang.Object val)
          Sets the value of the member data item associated with the specified tag.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mContactId

public java.lang.Long mContactId
The contact server id if the activity can be related to a contact.


mLocalContactId

public java.lang.Long mLocalContactId
Local id for a Contact if activity can be related to a Contact.


mUserId

public java.lang.Long mUserId
The user id if the activity can be related to a user, e.g. a message from a VF user but non-contact contains userid but not contactid, whereas a message from a contact that is also a VF user contains both contactid and userid.


mName

public java.lang.String mName
Contains the name of the other user. When contactid is present, the name from the addressbook. When only userid is present, the name on the user's profile. When none is present, the name captured from the outside, if possible, e.g. the name on the email From header. In a case like a SMS received from an unknown number, there is no name.


mAddress

public java.lang.String mAddress
Optional for non-messages. Contains the MSISDN, email, etc, needed to reply back.


mType

private ContactDetail.DetailKeyTypes mType
Optional for non-messages. Contains the type (mobile, work, etc.) captured from the addressbook, if available.


mNetwork

public java.lang.String mNetwork
This field contains information about the network (e.g. phone, flickr, google).


mAvatar

private java.nio.ByteBuffer mAvatar
Defines the binary data for the user's icon. The type of the binary data is defined into the avatarmime field.


mAvatarMime

private java.lang.String mAvatarMime
Defines the MIME type of the avatar binary data.


mAvatarUrl

public java.lang.String mAvatarUrl
Defines an http url that the client can use to retrieve the avatar binary data. Can be used to embed the url into an IMG HTML tag.

Constructor Detail

ActivityContact

public ActivityContact()
Method Detail

name

public java.lang.String name()
Return name of the current Data-type.

Specified by:
name in class BaseDataType
Returns:
String containing name of the data-type.

createFromHashTable

public static ActivityContact createFromHashTable(java.util.Hashtable<java.lang.String,java.lang.Object> hash)
Create ActivityContact from Hashtable (generated from Hessian encoded response).

Parameters:
hash - Hashtable containing ActivityContact data
Returns:
ActivityContact created from supplied Hashtable.

setValue

private void setValue(ActivityContact.Tags tag,
                      java.lang.Object val)
Sets the value of the member data item associated with the specified tag.

Parameters:
tag - Current tag
val - Value associated with the tag

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object


JavaDoc