Package org.cyclos.impl.users
Enum UserVariable
- java.lang.Object
-
- java.lang.Enum<UserVariable>
-
- org.cyclos.impl.users.UserVariable
-
- All Implemented Interfaces:
Serializable,Comparable<UserVariable>,HasMessageKey
public enum UserVariable extends Enum<UserVariable> implements HasMessageKey
Contains the fixed variables supported byProfileFieldHandler.getUserVariablesFunction(org.cyclos.entities.users.BasicUser).
The final list of variables that can be used also includeBasicProfileField,UserCustomFieldandAddressFields(prefixed with 'address').- See Also:
ProfileFieldHandler.getUserVariables()
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ACCOUNT_AVAILABLE_BALANCEThe available balance of the specific account.ACCOUNT_BALANCEThe balance of the specific account.ACCOUNT_CREDIT_LIMITThe credit limit of the specific account.ACCOUNT_NUMBERACCOUNT_TYPE_IDThe masked account type id.ACCOUNT_TYPE_NAMEThe account type name.ACCOUNT_UPPER_CREDIT_LIMITThe upper credit limit of the specific account.APPLICATION_NAMEThe application name of the user according to its configuration.APPLICATION_URLThe root URL of the user according to its configuration.DATEThe current timestamp formatted as date.DATE_TIMEThe current formatted timestamp.DISPLAYThe user's display according to its configuration.GROUPThe name of the user's group.GROUP_DISPLAYThe display name at registration for the user's group.GROUP_SETThe name of the user's group set.LAND_LINE_PHONEThe first land-line phone number.LAND_LINE_PHONESAll land line phone numbers.MOBILE_PHONEThe first mobile phone number.MOBILE_PHONESAll mobile phone numbers.PHONESAll phone numbers, both mobile and land-line.TIMEThe current timestamp formatted as time.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddAccountParameters(List<ParameterVO> params, TranslationHandler translationHandler)static voidaddAddressParameters(List<ParameterVO> params, TranslationHandler translationHandler)static voidaddGeneralParameters(List<ParameterVO> params, TranslationHandler translationHandler)static voidaddOtherProfileParameters(List<ParameterVO> params, TranslationHandler translationHandler)static voidaddProfileParameters(List<ParameterVO> params, TranslationHandler translationHandler)MessageKeygetMessageKey()static ParameterVOtoParameter(String name, MessageKey key, TranslationHandler translationHandler)ParameterVOtoParameter(TranslationHandler translationHandler)static UserVariablevalueOf(String name)Returns the enum constant of this type with the specified name.static UserVariable[]values()Returns an array containing the constants of this enum type, in the order they are declared.static Pair<UserVariable,String>variable(String name)Returns a pair with the resolved variable and, only in case of names of the form <account_type>.*, the account type.
-
-
-
Enum Constant Detail
-
DISPLAY
public static final UserVariable DISPLAY
The user's display according to its configuration.
-
GROUP_SET
public static final UserVariable GROUP_SET
The name of the user's group set.
-
GROUP
public static final UserVariable GROUP
The name of the user's group.
-
GROUP_DISPLAY
public static final UserVariable GROUP_DISPLAY
The display name at registration for the user's group.
-
PHONES
public static final UserVariable PHONES
All phone numbers, both mobile and land-line.
-
MOBILE_PHONES
public static final UserVariable MOBILE_PHONES
All mobile phone numbers.
-
MOBILE_PHONE
public static final UserVariable MOBILE_PHONE
The first mobile phone number.
-
LAND_LINE_PHONES
public static final UserVariable LAND_LINE_PHONES
All land line phone numbers.
-
LAND_LINE_PHONE
public static final UserVariable LAND_LINE_PHONE
The first land-line phone number.
-
ACCOUNT_NUMBER
public static final UserVariable ACCOUNT_NUMBER
-
ACCOUNT_TYPE_ID
public static final UserVariable ACCOUNT_TYPE_ID
The masked account type id.
-
ACCOUNT_TYPE_NAME
public static final UserVariable ACCOUNT_TYPE_NAME
The account type name.
-
ACCOUNT_BALANCE
public static final UserVariable ACCOUNT_BALANCE
The balance of the specific account.
-
ACCOUNT_AVAILABLE_BALANCE
public static final UserVariable ACCOUNT_AVAILABLE_BALANCE
The available balance of the specific account.
-
ACCOUNT_CREDIT_LIMIT
public static final UserVariable ACCOUNT_CREDIT_LIMIT
The credit limit of the specific account.
-
ACCOUNT_UPPER_CREDIT_LIMIT
public static final UserVariable ACCOUNT_UPPER_CREDIT_LIMIT
The upper credit limit of the specific account.
-
APPLICATION_NAME
public static final UserVariable APPLICATION_NAME
The application name of the user according to its configuration.
-
APPLICATION_URL
public static final UserVariable APPLICATION_URL
The root URL of the user according to its configuration.
-
DATE
public static final UserVariable DATE
The current timestamp formatted as date.
-
TIME
public static final UserVariable TIME
The current timestamp formatted as time.
-
DATE_TIME
public static final UserVariable DATE_TIME
The current formatted timestamp.
-
-
Method Detail
-
values
public static UserVariable[] 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 (UserVariable c : UserVariable.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static UserVariable 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
-
addAccountParameters
public static void addAccountParameters(List<ParameterVO> params, TranslationHandler translationHandler)
-
addAddressParameters
public static void addAddressParameters(List<ParameterVO> params, TranslationHandler translationHandler)
-
addGeneralParameters
public static void addGeneralParameters(List<ParameterVO> params, TranslationHandler translationHandler)
-
addOtherProfileParameters
public static void addOtherProfileParameters(List<ParameterVO> params, TranslationHandler translationHandler)
-
addProfileParameters
public static void addProfileParameters(List<ParameterVO> params, TranslationHandler translationHandler)
-
toParameter
public static ParameterVO toParameter(String name, MessageKey key, TranslationHandler translationHandler)
-
variable
public static Pair<UserVariable,String> variable(String name)
Returns a pair with the resolved variable and, only in case of names of the form <account_type>.*, the account type. In case of an invalid name it returns a pair of <null, null>, never null. NOTE: This method doesn't support dynamic variables only those declared in this enum. Dynamic ones must be managed separately.
-
getMessageKey
public MessageKey getMessageKey()
- Specified by:
getMessageKeyin interfaceHasMessageKey
-
toParameter
public ParameterVO toParameter(TranslationHandler translationHandler)
-
-