|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Object java.lang.Enum<ContactProperty> corny.addressbook.data.ContactProperty
public enum ContactProperty
Enumeration declaring the properties a Contact can have.
This enumeration provides a generic access to Contact properties. Each ContactProperty contains a method to get the corresponding value from a Contact. The modifiable properties also offer a method to set the corresponding value.
For the filter creation process, the properties also contain regular expression representations.
Enum Constant Summary | |
---|---|
ADDRESS_CITY
Multi value, String type |
|
ADDRESS_COUNTRY
Multi value, String type |
|
ADDRESS_COUNTRY_CODE
Multi value, String type |
|
ADDRESS_STREET
Multi value, String type |
|
ADDRESS_ZIP
Multi value, Integer type / String type |
|
AGE
Integer type / String type |
|
BIRTHDAY
java.util.Date type / String type |
|
CHAT
Multi value, String type |
|
CONTACT
corny.data.Contact type Can be used with the Comparison ContactFilter.IN_GROUP . |
|
CREATION_DATE
java.util.Date type / String type |
|
DISPLAYED_NAME
String type |
|
EMAIL
Multi value, String type |
|
FIRST_NAME
String type |
|
FULL_ADDRESS
Multi value, corny.addressbook.data.Address type / String type |
|
FULL_NAME
String type |
|
FULL_NAME_LAST_NAME_FIRST
String type |
|
FULL_TEXT
String type |
|
HAS_PICTURE
Boolean type |
|
IS_ORGANIZATION
Boolean type |
|
IS_PERSON
Boolean type |
|
LAST_NAME
String type |
|
MIDDLE_NAME
String type |
|
MODIFICATION_DATE
java.util.Date type / String type |
|
ORGANIZATION
String type |
|
PARENT_GROUP_NAME
String type |
|
PARENT_GROUPS
Group class |
|
PHONE
Multi value, String type |
|
TITLE
String type |
|
UID
String type |
Method Summary | |
---|---|
void |
addRegularExpressionsTo(java.util.Map<java.lang.String,ContactProperty> propertyMap)
Used by the FilterCreator process to read the regular expressions which represent this property. |
java.util.List<java.lang.Object> |
fetchContactInfo(Contact c,
java.lang.String propertyLabel,
java.lang.Class<?> preferredClass)
Used by the filtering process. |
java.util.List<java.lang.Class<?>> |
getClasses()
Returns the Classes to which the property can be converted. |
abstract java.lang.String |
getDefaultRegex()
Returns the default regular expression used in the SearchDialog. |
java.lang.String |
getHumanReadableName()
Returns the human readable, localized name of this property. |
java.lang.Object |
getValue(Contact c)
Returns the value of this property for a given Contact instance. |
abstract java.lang.Object |
getValue(Contact c,
java.lang.String label)
Returns the value of this property for a given Contact instance. |
boolean |
isModifiable()
Returns true if the property can be modified. |
boolean |
isMultiValue()
Returns true, if the property is a multi value property. |
boolean |
isStringClass()
Returns true if the property can be converted to a String |
boolean |
modifyContactInfo(Contact c,
java.lang.String propertyLabel,
ValueModifier modifier)
Used by the search and replace process. |
boolean |
setValue(Contact c,
java.lang.Object value)
Sets the value of this property for a given Contact instance. |
static ContactProperty |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static ContactProperty[] |
values()
Returns an array containing the constants of this enum type, in the order they are declared. |
Methods inherited from class java.lang.Enum |
---|
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Enum Constant Detail |
---|
public static final ContactProperty CONTACT
Can be used with the Comparison ContactFilter.IN_GROUP
.
public static final ContactProperty FULL_TEXT
public static final ContactProperty TITLE
public static final ContactProperty FIRST_NAME
public static final ContactProperty MIDDLE_NAME
public static final ContactProperty LAST_NAME
public static final ContactProperty FULL_NAME
public static final ContactProperty FULL_NAME_LAST_NAME_FIRST
public static final ContactProperty ORGANIZATION
public static final ContactProperty DISPLAYED_NAME
public static final ContactProperty BIRTHDAY
public static final ContactProperty AGE
public static final ContactProperty PHONE
public static final ContactProperty EMAIL
public static final ContactProperty CHAT
public static final ContactProperty FULL_ADDRESS
public static final ContactProperty ADDRESS_STREET
public static final ContactProperty ADDRESS_ZIP
public static final ContactProperty ADDRESS_CITY
public static final ContactProperty ADDRESS_COUNTRY_CODE
public static final ContactProperty ADDRESS_COUNTRY
public static final ContactProperty PARENT_GROUP_NAME
public static final ContactProperty PARENT_GROUPS
public static final ContactProperty IS_PERSON
public static final ContactProperty IS_ORGANIZATION
public static final ContactProperty CREATION_DATE
public static final ContactProperty MODIFICATION_DATE
public static final ContactProperty HAS_PICTURE
public static final ContactProperty UID
Method Detail |
---|
public static ContactProperty[] values()
for (ContactProperty c : ContactProperty.values()) System.out.println(c);
public static ContactProperty valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified name
java.lang.NullPointerException
- if the argument is nullpublic java.lang.String getHumanReadableName()
public abstract java.lang.String getDefaultRegex()
public java.util.List<java.lang.Class<?>> getClasses()
public boolean isStringClass()
public boolean isMultiValue()
public boolean isModifiable()
public java.util.List<java.lang.Object> fetchContactInfo(Contact c, java.lang.String propertyLabel, java.lang.Class<?> preferredClass)
c
- Contact to read property frompropertyLabel
- Specific label to read for a multi value property or null to
read every labelpreferredClass
- Preferred Class
public abstract java.lang.Object getValue(Contact c, java.lang.String label)
c
- Contactlabel
- Specific label for a multi value property or null to get every
label
public final java.lang.Object getValue(Contact c)
c
- Contact
public final boolean setValue(Contact c, java.lang.Object value)
c
- Contactvalue
- New value (see getValue(Contact)
for the required
type)
public boolean modifyContactInfo(Contact c, java.lang.String propertyLabel, ValueModifier modifier)
c
- Contact to modifypropertyLabel
- Specific label to modify for a multi value property or null to
modify every labelmodifier
- ValueModifier
public final void addRegularExpressionsTo(java.util.Map<java.lang.String,ContactProperty> propertyMap)
propertyMap
- Map to write the expressions to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |