Package org.cyclos.model.users.users
Enum BasicProfileField
- java.lang.Object
-
- java.lang.Enum<BasicProfileField>
-
- org.cyclos.model.users.users.BasicProfileField
-
- All Implemented Interfaces:
Serializable,Comparable<BasicProfileField>,HasValueMatch,ProfileField,HasMessageKey
public enum BasicProfileField extends Enum<BasicProfileField> implements ProfileField, HasMessageKey
Contains built-in fields in a user profile
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCOUNT_NUMBERADDRESSEMAILFULL_NAMEIMAGELOGIN_NAMEPHONE
-
Field Summary
-
Fields inherited from interface org.cyclos.model.users.users.ProfileField
PROPERTY_NAME
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanallowManagePrivacy()Returns whether this field allows users to manage privacybooleancanHide()Returns whether this field can be hidden for other usersStringgetAlias()Returns the first aliasList<String>getAliases()static BasicProfileFieldgetByAlias(String alias)Returns a basic profile field by alias, or null if no matchMessageKeygetMessageKey()ValueMatchgetValueMatch()Returns how values for this field are matched in a searchMessageKeygetVariableKey()StringgetVariableName()Property<Boolean,?>hideProperty()Returns the property which can be used to hide the fieldbooleanisAllowedForOperator()Returns whether this field is allowed for operatorsbooleanisSimple()Property<String,?>property()Returns the property for simple profile fields, or null if not a simple profile fieldbooleanreadOnly()Returns whether this field is always read only (i.e., never typed by the user)static Set<BasicProfileField>simple()Returns the simple profile fields.static BasicProfileFieldvalueOf(String name)Returns the enum constant of this type with the specified name.static BasicProfileField[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
FULL_NAME
public static final BasicProfileField FULL_NAME
-
LOGIN_NAME
public static final BasicProfileField LOGIN_NAME
-
EMAIL
public static final BasicProfileField EMAIL
-
PHONE
public static final BasicProfileField PHONE
-
ADDRESS
public static final BasicProfileField ADDRESS
-
ACCOUNT_NUMBER
public static final BasicProfileField ACCOUNT_NUMBER
-
IMAGE
public static final BasicProfileField IMAGE
-
-
Method Detail
-
values
public static BasicProfileField[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BasicProfileField c : BasicProfileField.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BasicProfileField valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getByAlias
public static BasicProfileField getByAlias(String alias)
Returns a basic profile field by alias, or null if no match
-
simple
public static Set<BasicProfileField> simple()
Returns the simple profile fields.- See Also:
isSimple()
-
allowManagePrivacy
public boolean allowManagePrivacy()
Returns whether this field allows users to manage privacy
-
canHide
public boolean canHide()
Returns whether this field can be hidden for other users
-
getAlias
public String getAlias()
Returns the first alias
-
getMessageKey
public MessageKey getMessageKey()
- Specified by:
getMessageKeyin interfaceHasMessageKey
-
getValueMatch
public ValueMatch getValueMatch()
Returns how values for this field are matched in a search- Specified by:
getValueMatchin interfaceHasValueMatch
-
getVariableKey
public MessageKey getVariableKey()
-
getVariableName
public String getVariableName()
-
hideProperty
public Property<Boolean,?> hideProperty()
Returns the property which can be used to hide the field
-
isAllowedForOperator
public boolean isAllowedForOperator()
Returns whether this field is allowed for operators
-
isSimple
public boolean isSimple()
Returns true is this basic profile field is a simple one, that is,LOGIN_NAME,FULL_NAMEandEMAIL. All simple profile fields (and only them) have non-nullproperty()
-
property
public Property<String,?> property()
Returns the property for simple profile fields, or null if not a simple profile field
-
readOnly
public boolean readOnly()
Returns whether this field is always read only (i.e., never typed by the user)
-
-