edu.internet2.middleware.grouper
Class StemFinder

java.lang.Object
  extended by edu.internet2.middleware.grouper.StemFinder

public class StemFinder
extends Object

Find stems within the Groups Registry.

Version:
$Id: StemFinder.java,v 1.54 2009-11-18 17:03:50 mchyzer Exp $
Author:
blair christensen.

Constructor Summary
StemFinder()
           
 
Method Summary
static Stem findByName(GrouperSession s, String name)
          Deprecated. see overload
static Stem findByName(GrouperSession s, String name, boolean exceptionOnNotFound)
          Find stem by name.
static Stem findByName(GrouperSession s, String name, boolean exceptionOnNotFound, QueryOptions queryOptions)
          Find stem by name.
static Stem findByUuid(GrouperSession s, String uuid)
          Deprecated. see overload
static Stem findByUuid(GrouperSession s, String uuid, boolean exceptionIfNull)
          Get stem by uuid.
static Stem findByUuid(GrouperSession s, String uuid, boolean exceptionIfNull, QueryOptions queryOptions)
          Get stem by uuid.
static Stem findRootStem(GrouperSession s)
          Find root stem of the Groups Registry.
static Set internal_findAllByApproximateDisplayExtension(GrouperSession s, String val)
           
static Set internal_findAllByApproximateDisplayName(GrouperSession s, String val)
           
static Set internal_findAllByApproximateExtension(GrouperSession s, String val)
           
static Set internal_findAllByApproximateName(GrouperSession s, String val)
           
static Set internal_findAllByApproximateNameAny(GrouperSession s, String val)
           
static Set internal_findAllByCreatedAfter(GrouperSession s, Date d)
           
static Set internal_findAllByCreatedBefore(GrouperSession s, Date d)
           
static Stem internal_findByName(String name, boolean exceptionIfNull)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StemFinder

public StemFinder()
Method Detail

findByName

@Deprecated
public static Stem findByName(GrouperSession s,
                                         String name)
                       throws StemNotFoundException
Deprecated. see overload

Find stem by name.
 try {
   Stem stem = StemFinder.findByName(s, name);
 }
 catch (StemNotFoundException e) {
   // Stem not found
 }
 

Parameters:
s - Search within this GrouperSession context
name - Find stem with this name.
Returns:
A Stem object
Throws:
StemNotFoundException

findByName

public static Stem findByName(GrouperSession s,
                              String name,
                              boolean exceptionOnNotFound)
                       throws StemNotFoundException
Find stem by name.
   Stem stem = StemFinder.findByName(s, name, false);
 

Parameters:
s - Search within this GrouperSession context
name - Find stem with this name.
exceptionOnNotFound -
Returns:
A Stem object
Throws:
StemNotFoundException

findByName

public static Stem findByName(GrouperSession s,
                              String name,
                              boolean exceptionOnNotFound,
                              QueryOptions queryOptions)
                       throws StemNotFoundException
Find stem by name.
   Stem stem = StemFinder.findByName(s, name, false);
 

Parameters:
s - Search within this GrouperSession context
name - Find stem with this name.
exceptionOnNotFound -
queryOptions -
Returns:
A Stem object
Throws:
StemNotFoundException

findRootStem

public static Stem findRootStem(GrouperSession s)
                         throws StemNotFoundException
Find root stem of the Groups Registry.
 // Find the root stem.
 Stem rootStem = StemFinder.findRootStem(s);
 

Parameters:
s - Search within this GrouperSession context
Returns:
A Stem object
Throws:
GrouperException
StemNotFoundException

findByUuid

@Deprecated
public static Stem findByUuid(GrouperSession s,
                                         String uuid)
                       throws StemNotFoundException
Deprecated. see overload

Get stem by uuid.
 // Get the specified stem by uuid.
 try {
   Stem stem = StemFinder.findByUuid(s, uuid);
 }
 catch (StemNotFoundException e) {
   // Stem not found
 }
 

Parameters:
s - Search within this GrouperSession context
uuid - Get stem with this UUID.
Returns:
A Stem object
Throws:
StemNotFoundException

findByUuid

public static Stem findByUuid(GrouperSession s,
                              String uuid,
                              boolean exceptionIfNull)
                       throws StemNotFoundException
Get stem by uuid.
 // Get the specified stem by uuid.
 try {
   Stem stem = StemFinder.findByUuid(s, uuid);
 }
 catch (StemNotFoundException e) {
   // Stem not found
 }
 

Parameters:
s - Search within this GrouperSession context
uuid - Get stem with this UUID.
exceptionIfNull -
Returns:
A Stem object
Throws:
StemNotFoundException

findByUuid

public static Stem findByUuid(GrouperSession s,
                              String uuid,
                              boolean exceptionIfNull,
                              QueryOptions queryOptions)
                       throws StemNotFoundException
Get stem by uuid.
 // Get the specified stem by uuid.
 try {
   Stem stem = StemFinder.findByUuid(s, uuid);
 }
 catch (StemNotFoundException e) {
   // Stem not found
 }
 

Parameters:
s - Search within this GrouperSession context
uuid - Get stem with this UUID.
exceptionIfNull -
queryOptions -
Returns:
A Stem object
Throws:
StemNotFoundException

internal_findAllByApproximateDisplayExtension

public static Set internal_findAllByApproximateDisplayExtension(GrouperSession s,
                                                                String val)
                                                         throws QueryException
Throws:
QueryException

internal_findAllByApproximateDisplayName

public static Set internal_findAllByApproximateDisplayName(GrouperSession s,
                                                           String val)
                                                    throws QueryException
Throws:
QueryException

internal_findAllByApproximateExtension

public static Set internal_findAllByApproximateExtension(GrouperSession s,
                                                         String val)
                                                  throws QueryException
Throws:
QueryException

internal_findAllByApproximateName

public static Set internal_findAllByApproximateName(GrouperSession s,
                                                    String val)
                                             throws QueryException
Throws:
QueryException

internal_findAllByApproximateNameAny

public static Set internal_findAllByApproximateNameAny(GrouperSession s,
                                                       String val)
                                                throws QueryException
Throws:
QueryException

internal_findAllByCreatedAfter

public static Set internal_findAllByCreatedAfter(GrouperSession s,
                                                 Date d)
                                          throws QueryException
Throws:
QueryException

internal_findAllByCreatedBefore

public static Set internal_findAllByCreatedBefore(GrouperSession s,
                                                  Date d)
                                           throws QueryException
Throws:
QueryException

internal_findByName

public static Stem internal_findByName(String name,
                                       boolean exceptionIfNull)
                                throws StemNotFoundException
Parameters:
name -
exceptionIfNull -
Returns:
Throws:
StemNotFoundException