Package org.cyclos.model.users.products
Enum AccountVisibility
- java.lang.Object
-
- java.lang.Enum<AccountVisibility>
-
- org.cyclos.model.users.products.AccountVisibility
-
- All Implemented Interfaces:
Serializable,Comparable<AccountVisibility>,HasDefault,HasMessageKey
public enum AccountVisibility extends Enum<AccountVisibility> implements HasMessageKey, HasDefault
Possible options for an user account being visible to the owner. This will allow users to hide his own accounts. It is not related to permissions, or even performance, but for convenience.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALWAYS_VISIBLEThe account is always visible and the owner can't change its visibility.
This is the behaviour for Cyclos 4.14.DEFAULT_HIDDENThe user account is hidden by default but the user can change its visibility.DEFAULT_VISIBLEThe user account is visible by default but the user can change its visibility.
-
Field Summary
Fields Modifier and Type Field Description static StringALWAYS_VISIBLE_VALUE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanConfigure()Returns whether the account owner can configure the account visibilityMessageKeygetMessageKey()booleanisDefault()booleanshouldBeVisible()Returns whether this visibility means the account is visiblestatic AccountVisibilityvalueOf(String name)Returns the enum constant of this type with the specified name.static AccountVisibility[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ALWAYS_VISIBLE
public static final AccountVisibility ALWAYS_VISIBLE
The account is always visible and the owner can't change its visibility.
This is the behaviour for Cyclos 4.14.
-
DEFAULT_VISIBLE
public static final AccountVisibility DEFAULT_VISIBLE
The user account is visible by default but the user can change its visibility.
-
DEFAULT_HIDDEN
public static final AccountVisibility DEFAULT_HIDDEN
The user account is hidden by default but the user can change its visibility.
-
-
Field Detail
-
ALWAYS_VISIBLE_VALUE
public static final String ALWAYS_VISIBLE_VALUE
-
-
Method Detail
-
values
public static AccountVisibility[] 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 (AccountVisibility c : AccountVisibility.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AccountVisibility 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
-
canConfigure
public boolean canConfigure()
Returns whether the account owner can configure the account visibility
-
getMessageKey
public MessageKey getMessageKey()
- Specified by:
getMessageKeyin interfaceHasMessageKey
-
isDefault
public boolean isDefault()
- Specified by:
isDefaultin interfaceHasDefault
-
shouldBeVisible
public boolean shouldBeVisible()
Returns whether this visibility means the account is visible
-
-