Enum ProjectMetadataRole
- java.lang.Object
-
- java.lang.Enum<ProjectMetadataRole>
-
- ca.corefacility.bioinformatics.irida.model.enums.ProjectMetadataRole
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ProjectMetadataRole>
public enum ProjectMetadataRole extends java.lang.Enum<ProjectMetadataRole>
Role for a user's level of metadata access for a project.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProjectMetadataRole
fromString(java.lang.String code)
Get a role from the given string codeint
getLevel()
static ProjectMetadataRole
getMaxRoleForProjectAndGroups(ProjectUserJoin userJoin, java.util.Collection<UserGroupProjectJoin> groupJoins)
Static method to compare aProjectUserJoin
and a collection ofUserGroupProjectJoin
and return the maxProjectMetadataRole
from themjava.lang.String
toString()
static ProjectMetadataRole
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ProjectMetadataRole[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
LEVEL_1
public static final ProjectMetadataRole LEVEL_1
-
LEVEL_2
public static final ProjectMetadataRole LEVEL_2
-
LEVEL_3
public static final ProjectMetadataRole LEVEL_3
-
LEVEL_4
public static final ProjectMetadataRole LEVEL_4
-
-
Method Detail
-
values
public static ProjectMetadataRole[] 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 (ProjectMetadataRole c : ProjectMetadataRole.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ProjectMetadataRole valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Enum<ProjectMetadataRole>
-
fromString
public static ProjectMetadataRole fromString(java.lang.String code)
Get a role from the given string code- Parameters:
code
- the string to get a role for- Returns:
- The requested ProjectRole
-
getLevel
public int getLevel()
-
getMaxRoleForProjectAndGroups
public static ProjectMetadataRole getMaxRoleForProjectAndGroups(ProjectUserJoin userJoin, java.util.Collection<UserGroupProjectJoin> groupJoins)
Static method to compare aProjectUserJoin
and a collection ofUserGroupProjectJoin
and return the maxProjectMetadataRole
from them- Parameters:
userJoin
- a user'sProjectUserJoin
groupJoins
- a collection ofUserGroupProjectJoin
- Returns:
- the max
ProjectMetadataRole
-
-