|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.engine.contactsync.ContactChange
public class ContactChange
Class describing a Contact Change. A Contact Change is meant to represent the smallest chunk of data associated with a Contact whilst being able to map and track its properties: - Origin (via IDs and type); - Purpose (destination); - Attributes (IDs, Key, Value and Flags)
Field Summary | |
---|---|
static java.lang.String |
ATTRIBUTE_BIRTHDAY
BIRTHDAY FLAG |
static java.lang.String |
ATTRIBUTE_CELL
TODO: Needed?! |
static java.lang.String |
ATTRIBUTE_FAX
TODO: Needed?! |
static java.lang.String |
ATTRIBUTE_HOME
TODO: Needed?! |
static java.lang.String |
ATTRIBUTE_PREFERRED
TODO: Needed?! |
static java.lang.String |
ATTRIBUTE_WORK
TODO: Needed?! |
static int |
DESTINATION_FLAG_CAB
CAB destination |
static int |
DESTINATION_FLAG_NAB
NAB destination |
static int |
DESTINATION_FLAG_NONE
None (null) destination |
static int |
DESTINATION_FLAG_RPG
RPG destination |
static int |
DESTINATIONS_CAB_NAB
Incoming via RPG. |
static int |
DESTINATIONS_CAB_NAB_RPG
Incoming via client. |
static int |
DESTINATIONS_CAB_RPG
Incoming via NAB. |
static int |
FLAG_BIRTHDAY
TODO: Needed?! |
static int |
FLAG_CELL
CELL Flag |
static int |
FLAG_FAX
FAX flag |
static int |
FLAG_HOME
HOME Flag |
static int |
FLAG_NONE
None (null) flag |
static int |
FLAG_PREFERRED
Preferred Flag |
static int |
FLAG_WORK
WORK Flag |
static int |
FLAGS_HOME_CELL
HOME and CELL Flag combination for convenience purposes |
static int |
FLAGS_HOME_FAX
HOME and FAX Flag combination for convenience purposes |
static int |
FLAGS_WORK_CELL
WORK and CELL Flag combination for convenience purposes |
static int |
FLAGS_WORK_FAX
WORK and FAX Flag combination for convenience purposes |
static long |
INVALID_ID
Invalid ID value applicable to any ID within this class |
static int |
KEY_BOOKMARK
BOOKMARK Key |
static int |
KEY_EXTERNAL
EXTERNAL Key |
static int |
KEY_FOLDER
FOLDER Key |
static int |
KEY_GENDER
GENDER Key |
static int |
KEY_GROUP
GROUP Key |
static int |
KEY_INTEREST
INTEREST Key |
static int |
KEY_LINK
LINK Key |
static int |
KEY_LOCATION
LOCATION Key |
static int |
KEY_PHOTO
PHOTO Key |
static int |
KEY_PRESENCE_TEXT
PRESENCE_TEXT Key |
static int |
KEY_RELATION
RELATION Key |
static int |
KEY_UNKNOWN
UNKNOWN Key |
static int |
KEY_VCARD_ADDRESS
ADDRESS Key |
static int |
KEY_VCARD_BUSINESS
BUSINESS Key |
static int |
KEY_VCARD_DATE
DATE Key |
static int |
KEY_VCARD_EMAIL
EMAIL Key |
static int |
KEY_VCARD_IMADDRESS
IM_ADDRESS Key |
static int |
KEY_VCARD_INTERNET_ADDRESS
INTERNET_ADDRESS Key |
static int |
KEY_VCARD_NAME
NAME Key |
static int |
KEY_VCARD_NICKNAME
NICKNAME Key |
static int |
KEY_VCARD_NOTE
NOTE Key |
static int |
KEY_VCARD_ORG
ORG Key |
static int |
KEY_VCARD_PHONE
PHONE Key |
static int |
KEY_VCARD_ROLE
ROLE Key |
static int |
KEY_VCARD_TITLE
TITLE Key |
static int |
KEY_VCARD_URL
URL Key |
private long |
mBackendContactId
Backend Contact ID for this ContactChange |
private long |
mBackendDetailId
Backend Detail ID for this ContactChange |
private int |
mDestinations
Destination flags for this ContactChange |
private int |
mFlags
Flags for this ContactChange |
private long |
mInternalContactId
Internal Contact ID for this ContactChange |
private long |
mInternalDetailId
Internal Detail ID for this ContactChange |
private int |
mKey
Key for this ContactChange |
private long |
mNabContactId
NAB Contact ID for this ContactChange |
private long |
mNabDetailId
NAB Detail ID for this ContactChange |
private int |
mType
Type for this ContactChange |
private java.lang.String |
mValue
Value for this ContactChange |
private static java.lang.String[] |
sIntToKeyLookupTable
Lookup Table from Key integer to String values |
private static java.util.HashMap<java.lang.String,java.lang.Integer> |
sKeyToIntMap
Hashmap from Key String to integer values |
static int |
TYPE_ADD_CONTACT
ADD_CONTACT Type |
static int |
TYPE_ADD_DETAIL
ADD_DETAIL Type |
static int |
TYPE_DELETE_CONTACT
DELETE_CONTACT Type |
static int |
TYPE_DELETE_DETAIL
UPDATE_DELETE_DETAIL Type |
static int |
TYPE_UNKNOWN
UNKNOWN Type |
static int |
TYPE_UPDATE_BACKEND_CONTACT_ID
UPDATE_BACKEND_CONTACT_ID Type |
static int |
TYPE_UPDATE_BACKEND_DETAIL_ID
UPDATE_BACKEND_DETAIL_ID Type |
static int |
TYPE_UPDATE_CONTACT
UPDATE_CONTACT Type |
static int |
TYPE_UPDATE_DETAIL
UPDATE_DETAIL Type |
static int |
TYPE_UPDATE_NAB_CONTACT_ID
UPDATE_NAB_CONTACT_ID Type |
static int |
TYPE_UPDATE_NAB_DETAIL_ID
UPDATE_NAB_DETAIL_ID Type |
Constructor Summary | |
---|---|
ContactChange()
Default constructor |
|
ContactChange(int type)
Constructor taking the change type |
|
ContactChange(int destinations,
int type)
Constructor taking destination flags and a type |
|
ContactChange(int key,
java.lang.String value,
int flags)
Constructor taking key, value and flags |
|
ContactChange(long nabContactId)
Constructor taking a nabContactId |
|
ContactChange(long nabContactId,
long nabDetailId)
Constructor taking a nabContactId and a nabDetailId |
Method Summary | |
---|---|
ContactChange |
copyWithNewValue(java.lang.String newValue)
Creates a copy of the ContactChange with a modified value. |
static ContactChange |
createIdsChange(ContactChange cc,
int type)
Creates a shallow copy of a change. |
long |
getBackendContactId()
Get the change's Backend Contact ID. |
long |
getBackendDetailId()
Get the change's Backend Detail ID. |
int |
getDestinations()
Get the change destination flags. |
int |
getFlags()
Get the change flags. |
long |
getInternalContactId()
Get the change's Internal Contact ID. |
long |
getInternalDetailId()
Get the change's Internal Detail ID. |
int |
getKey()
Get the change Key. |
java.lang.String |
getKeyToString()
Get the change Key String value. |
long |
getNabContactId()
Get the change's NAB Contact ID. |
long |
getNabDetailId()
Get the change's NAB Detail ID. |
int |
getType()
Get the change type. |
java.lang.String |
getValue()
Get the change value |
void |
setBackendContactId(long backendContactId)
Set the change's Backend Contact ID. |
void |
setBackendDetailId(long backendDetailId)
Set the change's Backend Detail ID. |
void |
setDestinations(int destinations)
Set the change destination flags. |
void |
setFlags(int flags)
Set the change flags. |
void |
setInternalContactId(long internalContactId)
Set the change's Internal Contact ID. |
void |
setInternalDetailId(long internalDetailId)
Set the change's Internal Detail ID. |
void |
setKey(int key)
Sets the key. |
void |
setNabContactId(long nabContactId)
Set the change's NAB Contact ID. |
void |
setNabDetailId(long nabDetailId)
Set the change's NAB Detail ID. |
void |
setType(int type)
Set the type of change. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int TYPE_UNKNOWN
public static final int TYPE_ADD_CONTACT
public static final int TYPE_UPDATE_CONTACT
public static final int TYPE_DELETE_CONTACT
public static final int TYPE_ADD_DETAIL
public static final int TYPE_UPDATE_DETAIL
public static final int TYPE_DELETE_DETAIL
public static final int TYPE_UPDATE_BACKEND_CONTACT_ID
public static final int TYPE_UPDATE_NAB_CONTACT_ID
public static final int TYPE_UPDATE_BACKEND_DETAIL_ID
public static final int TYPE_UPDATE_NAB_DETAIL_ID
public static final int FLAG_NONE
public static final java.lang.String ATTRIBUTE_PREFERRED
public static final int FLAG_PREFERRED
public static final java.lang.String ATTRIBUTE_HOME
public static final int FLAG_HOME
public static final java.lang.String ATTRIBUTE_CELL
public static final int FLAG_CELL
public static final java.lang.String ATTRIBUTE_WORK
public static final int FLAG_WORK
public static final java.lang.String ATTRIBUTE_BIRTHDAY
public static final int FLAG_BIRTHDAY
public static final java.lang.String ATTRIBUTE_FAX
public static final int FLAG_FAX
public static final int FLAGS_HOME_CELL
public static final int FLAGS_WORK_CELL
public static final int FLAGS_HOME_FAX
public static final int FLAGS_WORK_FAX
public static final int KEY_UNKNOWN
public static final int KEY_VCARD_NAME
public static final int KEY_VCARD_NICKNAME
public static final int KEY_VCARD_DATE
public static final int KEY_VCARD_EMAIL
public static final int KEY_VCARD_PHONE
public static final int KEY_VCARD_ADDRESS
public static final int KEY_VCARD_URL
public static final int KEY_VCARD_INTERNET_ADDRESS
public static final int KEY_VCARD_IMADDRESS
public static final int KEY_VCARD_ROLE
public static final int KEY_VCARD_ORG
public static final int KEY_VCARD_TITLE
public static final int KEY_VCARD_NOTE
public static final int KEY_VCARD_BUSINESS
public static final int KEY_PRESENCE_TEXT
public static final int KEY_PHOTO
public static final int KEY_LOCATION
public static final int KEY_GENDER
public static final int KEY_RELATION
public static final int KEY_BOOKMARK
public static final int KEY_INTEREST
public static final int KEY_FOLDER
public static final int KEY_GROUP
public static final int KEY_LINK
public static final int KEY_EXTERNAL
public static final int DESTINATION_FLAG_NONE
public static final int DESTINATION_FLAG_NAB
public static final int DESTINATION_FLAG_CAB
public static final int DESTINATION_FLAG_RPG
public static final int DESTINATIONS_CAB_NAB
public static final int DESTINATIONS_CAB_RPG
public static final int DESTINATIONS_CAB_NAB_RPG
private static final java.lang.String[] sIntToKeyLookupTable
private static final java.util.HashMap<java.lang.String,java.lang.Integer> sKeyToIntMap
public static final long INVALID_ID
private int mDestinations
private int mKey
private int mFlags
private final java.lang.String mValue
private int mType
private long mInternalContactId
private long mInternalDetailId
private long mBackendContactId
private long mBackendDetailId
private long mNabContactId
private long mNabDetailId
Constructor Detail |
---|
public ContactChange()
public ContactChange(int type)
type
- The Change Typepublic ContactChange(long nabContactId)
nabContactId
- Native Contact IDpublic ContactChange(long nabContactId, long nabDetailId)
nabContactId
- Native Contact IDnabDetailId
- Native Detail IDpublic ContactChange(int destinations, int type)
destinations
- The destination flagstype
- The change typepublic ContactChange(int key, java.lang.String value, int flags)
key
- The Key for the Changevalue
- The Value for the Changeflags
- The Flags for the ChangeMethod Detail |
---|
public static ContactChange createIdsChange(ContactChange cc, int type)
cc
- The original Contact Changetype
- The new type
public ContactChange copyWithNewValue(java.lang.String newValue)
newValue
- the new value to set
public int getDestinations()
public void setDestinations(int destinations)
destinations
- The Destination flags to setpublic int getKey()
public java.lang.String getKeyToString()
public java.lang.String getValue()
public int getType()
public void setType(int type)
type
- The type to setpublic void setFlags(int flags)
flags
- The flags to setpublic int getFlags()
public void setKey(int key)
key
- The key to setpublic long getInternalContactId()
public void setInternalContactId(long internalContactId)
The
- Internal Contact ID to setpublic long getInternalDetailId()
public void setInternalDetailId(long internalDetailId)
The
- Internal Detail ID to setpublic long getBackendContactId()
public void setBackendContactId(long backendContactId)
The
- Backend Contact ID to setpublic long getBackendDetailId()
public void setBackendDetailId(long backendDetailId)
The
- Backend Detail ID to setpublic long getNabContactId()
public void setNabContactId(long nabContactId)
The
- NAB Contact ID to setpublic long getNabDetailId()
public void setNabDetailId(long nabDetailId)
The
- NAB Detail ID
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc