edu.internet2.middleware.grouper.ui
Class GroupOrStem

java.lang.Object
  extended by edu.internet2.middleware.grouper.ui.GroupOrStem

public class GroupOrStem
extends Object


Method Summary
static GroupOrStem findByGroup(GrouperSession s, Group group)
          Already have a group but a method needs GroupOrStem
static GroupOrStem findByID(GrouperSession s, String id)
          Only have and id ...
static GroupOrStem findByName(GrouperSession s, String name)
          Only have a name...
static GroupOrStem findByStem(GrouperSession s, Stem stem)
          Already have a stem but a method needs GroupOrStem
 Map getAsMap()
           
 String getDisplayExtension()
           
 String getDisplayName()
           
 Group getGroup()
           
 String getId()
           
 String getName()
           
 Stem getStem()
           
 String getType()
           
 boolean isGroup()
           
 boolean isStem()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findByStem

public static GroupOrStem findByStem(GrouperSession s,
                                     Stem stem)
Already have a stem but a method needs GroupOrStem

Parameters:
s -
stem -
Returns:
a GroupOrStem based on the stem provided

findByGroup

public static GroupOrStem findByGroup(GrouperSession s,
                                      Group group)
Already have a group but a method needs GroupOrStem

Parameters:
s -
group -
Returns:
a GroupOrStem based on the group provided

findByID

public static GroupOrStem findByID(GrouperSession s,
                                   String id)
Only have and id ...

Parameters:
s -
id -
Returns:
a GroupOrStem based on the id provided

findByName

public static GroupOrStem findByName(GrouperSession s,
                                     String name)
Only have a name...

Parameters:
s -
name -
Returns:
a GroupOrStem based on the name provided

getId

public String getId()
Returns:
id of 'masked' group or stem

isGroup

public boolean isGroup()
Returns:
if 'masked' object is a Group

isStem

public boolean isStem()
Returns:
if 'masked' object is a Stem

getAsMap

public Map getAsMap()
Returns:
'masked' object as a Map

getGroup

public Group getGroup()
Returns:
masked Group (or null if is a Stem)

getStem

public Stem getStem()
Returns:
masked Stem (or null if is a Group)

getDisplayExtension

public String getDisplayExtension()
Returns:
display extension for wrapped group or stem

getDisplayName

public String getDisplayName()
Returns:
display name for wrapped group or stem

getName

public String getName()
Returns:
name for wrapped group or stem

getType

public String getType()
Returns:
'group' or 'stem' depending on the wrapped object