Package org.cyclos.model.access
Enum Role
- java.lang.Object
-
- java.lang.Enum<Role>
-
- org.cyclos.model.access.Role
-
- All Implemented Interfaces:
Serializable,Comparable<Role>,SecurityElement
public enum Role extends Enum<Role> implements SecurityElement
Possible roles for Cyclos actors
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADMINAdministrators have this role, and may have other more specific roles as well, such asGLOBAL_ADMINorNETWORK_ADMIN.ALIAS_OPERATORAn operator without group, that is, an alias of the own memberBROKERA broker is someone who can manage other users, and eventually receive commissions.
IMPORTANT: All brokers also have theMEMBERrole.GLOBAL_ADMINAdministrators in the special global system administrators group have this role.MEMBERA member is a regular user.NETWORK_ADMINAdministrators in the special network system administrators group have this role.OPERATORAn operator is a "sub-user" created by a member to manage his data.RESTRICTED_OPERATORAn operator with group, that is, with restricted permissions
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisUserManager()Returns whether this role a user manager (admin or broker)static EnumMessageKeyResolver<Role>resolverForConnectedUsers()Returns anEnumMessageKeyResolverfor translations of connected user rolesstatic Role[]userManager()Returns all roles which manages other usersstatic RolevalueOf(String name)Returns the enum constant of this type with the specified name.static Role[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
ADMIN
public static final Role ADMIN
Administrators have this role, and may have other more specific roles as well, such asGLOBAL_ADMINorNETWORK_ADMIN.
-
GLOBAL_ADMIN
public static final Role GLOBAL_ADMIN
Administrators in the special global system administrators group have this role.
-
NETWORK_ADMIN
public static final Role NETWORK_ADMIN
Administrators in the special network system administrators group have this role.
-
BROKER
public static final Role BROKER
A broker is someone who can manage other users, and eventually receive commissions.
IMPORTANT: All brokers also have theMEMBERrole.
-
MEMBER
public static final Role MEMBER
A member is a regular user. Brokers and operators always have this role.
-
OPERATOR
public static final Role OPERATOR
An operator is a "sub-user" created by a member to manage his data. All operators also have theMEMBERrole.
-
ALIAS_OPERATOR
public static final Role ALIAS_OPERATOR
An operator without group, that is, an alias of the own member
-
RESTRICTED_OPERATOR
public static final Role RESTRICTED_OPERATOR
An operator with group, that is, with restricted permissions
-
-
Method Detail
-
values
public static Role[] 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 (Role c : Role.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static Role 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
-
resolverForConnectedUsers
public static EnumMessageKeyResolver<Role> resolverForConnectedUsers()
Returns anEnumMessageKeyResolverfor translations of connected user roles
-
userManager
public static Role[] userManager()
Returns all roles which manages other users
-
isUserManager
public boolean isUserManager()
Returns whether this role a user manager (admin or broker)
-
-