|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.vodafone360.people.datatypes.VCardHelper
public class VCardHelper
Helper class for handling VCard information associated with Contacts either from People server/client or from Native database. Also used to help with handling of Call log/Message log events displayed in Timeline.
Nested Class Summary | |
---|---|
private static class |
VCardHelper.Item
Item class representing vCard item. |
static class |
VCardHelper.Name
Handle VCard name fields. |
static class |
VCardHelper.Organisation
Handle VCard organisation fields. |
static class |
VCardHelper.PostalAddress
Handle VCard postal address |
Field Summary | |
---|---|
static char |
LIST_SEPARATOR
|
static char |
SUB_LIST_SEPARATOR
|
Constructor Summary | |
---|---|
VCardHelper()
|
Method Summary | |
---|---|
private static java.lang.String |
createVCardList(java.util.List<VCardHelper.Item> itemList)
Create String from array of VCard items. |
protected static Time |
getDate(java.lang.String val)
Get Time item from supplied String. |
protected static java.lang.String |
getEmail(java.lang.String val)
Create simple String representation of email address from supplied VCard email String. |
static VCardHelper.Name |
getName(java.lang.String val)
Get Name object from supplied String. |
static VCardHelper.Organisation |
getOrg(java.lang.String val)
s Create Organisation item from String containing VCArd organisation representation. |
static VCardHelper.PostalAddress |
getPostalAddress(java.lang.String val)
Get PostalAddress from supplied string. |
protected static java.lang.String |
getSingleTextValue(java.lang.String val)
Fetch a single string value from a VCard string Suitable for Url, Internet Address, IM Address, Role, Title and Note |
protected static void |
getStringList(java.util.List<java.lang.String> list,
java.lang.String val)
Generate List array of items (as Strings) from single String using ListIterator. |
protected static java.lang.String |
getTel(java.lang.String val)
Get telephone number as String from VCard representation. |
private static void |
getVCardList(java.lang.String val,
java.util.List<VCardHelper.Item> itemList)
Create array of VCard items from supplied String. |
static boolean |
isEmptyVCardValue(java.lang.String value)
Tells whether or not the provided VCard value is empty. |
protected static java.lang.String |
makeDate(Time time)
Create VCard date String from supplied Time item. |
static java.lang.String |
makeEmail(java.lang.String emailAddress)
Generate VCard email address from simple String representation. |
static java.lang.String |
makeName(VCardHelper.Name name)
Return VCard name string from supplied Name. |
static java.lang.String |
makeOrg(VCardHelper.Organisation org)
Create VCard Organisation item. |
static java.lang.String |
makePostalAddress(VCardHelper.PostalAddress address)
Create VCard representation of postal address. |
protected static java.lang.String |
makeSingleTextValue(java.lang.String textValue)
Create a VCard string from a single value Suitable for Url, Internet Address, IM Address, Role, Title and Note |
protected static java.lang.String |
makeTel(java.lang.String telNumber)
Create VCard telephone number String. |
private static java.lang.String |
nextFullItem(java.util.ListIterator<VCardHelper.Item> it)
Return next complete Item from item ListIterator as String. |
private static java.util.List<java.lang.String> |
nextFullItemArray(java.util.ListIterator<VCardHelper.Item> it)
Return List of Strings made up of next full item and sub-items retrieved from ListIterator. |
static java.lang.String |
parseCompanyFromOrganization(java.lang.String value)
Parses the Company name from a VCard Organization String. |
static java.lang.String |
splitDepartmentsFromOrganization(java.lang.String value)
Splits the VCard Organization value to return only the departments Note: it will return the ';' separated departments |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final char LIST_SEPARATOR
public static final char SUB_LIST_SEPARATOR
Constructor Detail |
---|
public VCardHelper()
Method Detail |
---|
private static java.lang.String createVCardList(java.util.List<VCardHelper.Item> itemList)
itemList
- List array of VCard items.
private static void getVCardList(java.lang.String val, java.util.List<VCardHelper.Item> itemList)
val
- String containing VCard items.itemList
- List of VCard items to populate.private static java.lang.String nextFullItem(java.util.ListIterator<VCardHelper.Item> it)
it
- ListIterator to iterate through Items.
private static java.util.List<java.lang.String> nextFullItemArray(java.util.ListIterator<VCardHelper.Item> it)
it
- ListIterator to iterate through Items.
protected static java.lang.String makeSingleTextValue(java.lang.String textValue)
textValue
- The string value to use
protected static java.lang.String getSingleTextValue(java.lang.String val)
val
- A string in VCard format.
public static java.lang.String makeName(VCardHelper.Name name)
name
- Name item.
public static VCardHelper.Name getName(java.lang.String val)
val
- String containing name information.
protected static java.lang.String makeDate(Time time)
time
- Time item.
protected static Time getDate(java.lang.String val)
val
- String containing time information.
public static java.lang.String makeEmail(java.lang.String emailAddress)
emailAddress
- simple email address.
protected static java.lang.String getEmail(java.lang.String val)
val
- VCard email String.
protected static java.lang.String makeTel(java.lang.String telNumber)
telNumber
- String containing telephone number
protected static java.lang.String getTel(java.lang.String val)
val
- VCard representation of telephone number.
public static java.lang.String makePostalAddress(VCardHelper.PostalAddress address)
address
- PostalAddress item.
public static VCardHelper.PostalAddress getPostalAddress(java.lang.String val)
val
- String containing address.
public static java.lang.String makeOrg(VCardHelper.Organisation org)
org
- Organisation item.
public static VCardHelper.Organisation getOrg(java.lang.String val)
val
- String containing VCard organisation.
public static java.lang.String parseCompanyFromOrganization(java.lang.String value)
value
- the VCard Organization String to parse
public static java.lang.String splitDepartmentsFromOrganization(java.lang.String value)
value
- the value to split
public static boolean isEmptyVCardValue(java.lang.String value)
protected static void getStringList(java.util.List<java.lang.String> list, java.lang.String val)
list
- List array to be populatedval
- Single String containing items.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
JavaDoc