org.jasig.portal.portlets.groupselector
Enum EntityEnum

java.lang.Object
  extended by java.lang.Enum<EntityEnum>
      extended by org.jasig.portal.portlets.groupselector.EntityEnum
All Implemented Interfaces:
Serializable, Comparable<EntityEnum>

public enum EntityEnum
extends Enum<EntityEnum>

EntityEnum represents an enumeration of known uPortal entity types. This class was designed specifically for use with the JsonEntityBean entity wrapper and for simplified channel and group browsing.

Version:
$Revision: 19776 $
Author:
Jen Bourey, jbourey@unicon.net

Enum Constant Summary
CATEGORY
           
CHANNEL
           
GROUP
           
PERSON
           
 
Method Summary
 Class<?> getClazz()
          Get the Class associated with this entity type.
static EntityEnum getEntityEnum(String type)
          Get an EntityEnum for a String type representation.
 boolean isGroup()
          Determine if this entity type is a group type.
 String toString()
           
static EntityEnum valueOf(String name)
          Returns the enum constant of this type with the specified name.
static EntityEnum[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CHANNEL

public static final EntityEnum CHANNEL

CATEGORY

public static final EntityEnum CATEGORY

PERSON

public static final EntityEnum PERSON

GROUP

public static final EntityEnum GROUP
Method Detail

values

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

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

valueOf

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

getEntityEnum

public static EntityEnum getEntityEnum(String type)
Get an EntityEnum for a String type representation.

Parameters:
type -
Returns:

getClazz

public Class<?> getClazz()
Get the Class associated with this entity type.

Returns:

isGroup

public boolean isGroup()
Determine if this entity type is a group type. It should be noted that method returns the general "group"-iness of the entity, not whether this entity is specifically a person group.

Returns:

toString

public String toString()
Overrides:
toString in class Enum<EntityEnum>


Copyright © 2010 Jasig. All Rights Reserved.