edu.internet2.middleware.grouper.service
Enum ServiceRole

java.lang.Object
  extended by java.lang.Enum<ServiceRole>
      extended by edu.internet2.middleware.grouper.service.ServiceRole
All Implemented Interfaces:
Serializable, Comparable<ServiceRole>

public enum ServiceRole
extends Enum<ServiceRole>

role in a service, admin (update or admin in service) or user (member of group/role or assignee of permissions)

Author:
mchyzer

Enum Constant Summary
admin
          admin of a service
user
          user of a service (might include admins)
 
Method Summary
static Collection<Field> allFieldsForGroupQuery()
          get all fields for any role
abstract  Collection<Field> fieldsForGroupQuery()
          e.g.
static ServiceRole valueOf(String name)
          Returns the enum constant of this type with the specified name.
static ServiceRole valueOfIgnoreCase(String string, boolean exceptionOnNull)
          convert a string to the service role enum
static ServiceRole[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

admin

public static final ServiceRole admin
admin of a service


user

public static final ServiceRole user
user of a service (might include admins)

Method Detail

values

public static ServiceRole[] 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 (ServiceRole c : ServiceRole.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static ServiceRole 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 name
NullPointerException - if the argument is null

allFieldsForGroupQuery

public static Collection<Field> allFieldsForGroupQuery()
get all fields for any role

Returns:
the fields

fieldsForGroupQuery

public abstract Collection<Field> fieldsForGroupQuery()
e.g. return the fields for this service role

Returns:
the fields for the query

valueOfIgnoreCase

public static ServiceRole valueOfIgnoreCase(String string,
                                            boolean exceptionOnNull)
convert a string to the service role enum

Parameters:
string -
exceptionOnNull -
Returns:
service role