edu.internet2.middleware.grouper.membership
Enum MembershipType

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

public enum MembershipType
extends Enum<MembershipType>

type of membership


Enum Constant Summary
COMPOSITE
          composite memberships are due to union, intersection, minus A member of a group (aka composite member) has either or both of an immediate (direct) membership, or an effective (indirect) membership
EFFECTIVE
          An effective member has an indirect membership to a group (e.g.
IMMEDIATE
          An immediate member is directly assigned to a group.
NONIMMEDIATE
          everything except immediate An immediate member is directly assigned to a group.
 
Method Summary
 String getTypeString()
          return the type string
abstract  String queryClause()
          query clause for this membership type, e.g.
static MembershipType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static MembershipType valueOfIgnoreCase(String string, boolean exceptionOnNull)
          do a case-insensitive matching
static MembershipType[] 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

IMMEDIATE

public static final MembershipType IMMEDIATE
An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships


EFFECTIVE

public static final MembershipType EFFECTIVE
An effective member has an indirect membership to a group (e.g. in a group within a group). All subjects in a composite group are effective members (since the composite group has two groups and a set operator and no other immediate members). Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. 'group within a group' can be nested to any level so long as it does not become circular. A group can have potentially unlimited effective memberships


COMPOSITE

public static final MembershipType COMPOSITE
composite memberships are due to union, intersection, minus A member of a group (aka composite member) has either or both of an immediate (direct) membership, or an effective (indirect) membership


NONIMMEDIATE

public static final MembershipType NONIMMEDIATE
everything except immediate An immediate member is directly assigned to a group. A composite group has no immediate members. Note that a member can have 0 to 1 immediate memberships to a single group, and 0 to many effective memberships to a group. A group can have potentially unlimited effective memberships

Method Detail

values

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

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

valueOf

public static MembershipType 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

queryClause

public abstract String queryClause()
query clause for this membership type, e.g. = 'immediate'

Returns:
the query clause

getTypeString

public String getTypeString()
return the type string

Returns:
the type

valueOfIgnoreCase

public static MembershipType valueOfIgnoreCase(String string,
                                               boolean exceptionOnNull)
do a case-insensitive matching

Parameters:
string -
exceptionOnNull - will not allow null or blank entries
Returns:
the enum or null or exception if not found