com.vodafone360.people.datatypes
Class Identity

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

public class Identity
extends BaseDataType

BaseDataType encapsulating an Identity issued to or retrieved from server


Nested Class Summary
static class Identity.IdentityComparator
          Comparator class used to compare Identities retrieved from server to remove duplicates from list passed to People client UI.
private static class Identity.MemberData
          Enumeration containing items contained within Identity Parcel.
private static class Identity.Tags
          Tags associated with Identity item.
 
Field Summary
static  CREATOR
          Interface to allow Identity to be written and restored from a Parcel.
 java.lang.Boolean mActive
          Properties below are only present after GetMyIdentities.
 java.lang.String mAuthType
           
 java.util.List<IdentityCapability> mCapabilities
           
 java.util.List<java.lang.String> mCountryList
           
 java.lang.Long mCreated
           
 java.lang.String mDisplayName
           
 java.net.URL mIcon2Url
           
 java.lang.String mIconMime
           
 java.net.URL mIconUrl
           
 java.lang.String mIdentityId
           
 java.lang.String mIdentityType
           
 java.lang.String mName
           
 java.lang.String mNetwork
           
 java.net.URL mNetworkUrl
           
 java.lang.Integer mOrder
           
 java.lang.String mPluginId
           
 java.lang.Long mUpdated
           
 java.lang.Integer mUserId
           
 java.lang.String mUserName
           
 
Constructor Summary
  Identity()
          Default constructor.
private Identity(Parcel in)
          Create Identity from Parcel.
 
Method Summary
private  boolean areStringValuesSame(java.lang.String s1, java.lang.String s2)
          String values comparison
 Identity createFromHashtable(java.util.Hashtable<java.lang.String,java.lang.Object> hash)
          Populate Identity from supplied Hashtable.
 int describeContents()
          
 boolean isSameAs(Identity id)
          Test whether current Identity is identical to supplied Identity.
 java.lang.String name()
          Return name of the current Data-type.
private  void readFromParcel(Parcel in)
          Read Identity item from Parcel.
private  void setValue(Identity.Tags tag, java.lang.Object val)
          Sets the value of the member data item associated with the specified tag.
 java.lang.String toString()
          
 void writeToParcel(Parcel dest, int flags)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

mPluginId

public java.lang.String mPluginId

mNetwork

public java.lang.String mNetwork

mNetworkUrl

public java.net.URL mNetworkUrl

mIconUrl

public java.net.URL mIconUrl

mIcon2Url

public java.net.URL mIcon2Url

mAuthType

public java.lang.String mAuthType

mIconMime

public java.lang.String mIconMime

mOrder

public java.lang.Integer mOrder

mName

public java.lang.String mName

mCapabilities

public java.util.List<IdentityCapability> mCapabilities

mActive

public java.lang.Boolean mActive
Properties below are only present after GetMyIdentities.


mCreated

public java.lang.Long mCreated

mUpdated

public java.lang.Long mUpdated

mIdentityId

public java.lang.String mIdentityId

mUserId

public java.lang.Integer mUserId

mUserName

public java.lang.String mUserName

mDisplayName

public java.lang.String mDisplayName

mCountryList

public java.util.List<java.lang.String> mCountryList

mIdentityType

public java.lang.String mIdentityType

CREATOR

public static final  CREATOR
Interface to allow Identity to be written and restored from a Parcel.

Constructor Detail

Identity

public Identity()
Default constructor.


Identity

private Identity(Parcel in)
Create Identity from Parcel.

Parameters:
in - Parcel containing Identity.
Method Detail

isSameAs

public boolean isSameAs(Identity id)
Test whether current Identity is identical to supplied Identity.

Parameters:
id - Identity to compare against.
Returns:
true if Identities match, false otherwise.

areStringValuesSame

private boolean areStringValuesSame(java.lang.String s1,
                                    java.lang.String s2)
String values comparison

Parameters:
s1 - First String to test.
s2 - Second String to test.
Returns:
true if Strings match (or both are null), false otherwise.

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 Identity createFromHashtable(java.util.Hashtable<java.lang.String,java.lang.Object> hash)
Populate Identity from supplied Hashtable.

Parameters:
hash - Hashtable containing identity details.
Returns:
Identity instance.

setValue

private void setValue(Identity.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

describeContents

public int describeContents()


readFromParcel

private void readFromParcel(Parcel in)
Read Identity item from Parcel.

Parameters:
in - Parcel containing Identity information.

writeToParcel

public void writeToParcel(Parcel dest,
                          int flags)



JavaDoc