edu.internet2.middleware.grouper
Class FieldFinder

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

public class FieldFinder
extends java.lang.Object

Find fields.

Version:
$Id: FieldFinder.java,v 1.48 2009-08-11 20:18:08 mchyzer Exp $
Author:
blair christensen.

Constructor Summary
FieldFinder()
           
 
Method Summary
static void clearCache()
          clear cache (e.g. if schema export)
static Field find(java.lang.String name)
          Deprecated. 
static Field find(java.lang.String name, boolean exceptionIfNotFound)
          Get the specified field.
static Field find(java.lang.String name, boolean exceptionIfNotFound, boolean includePrivilegeSearch)
          Get the specified field.
static java.util.Set findAll()
          Find all fields.
static java.util.Set<Field> findAllByGroupType(GroupType groupType)
           
static java.util.Set<Field> findAllByGroupType(java.lang.String groupTypeId)
           
static java.util.Set<Field> findAllByType(FieldType type)
          Find all fields of the specified type.
static java.util.List<java.lang.String> findAllIdsByType(FieldType type)
          find all ids by type
static Field findById(java.lang.String fieldId)
          Deprecated. use the overload
static Field findById(java.lang.String fieldId, boolean exceptionIfNull)
          Get the specified field by id.
static java.lang.String findFieldId(java.lang.String name, java.lang.String type)
          Deprecated. 
static java.lang.String findFieldId(java.lang.String name, java.lang.String type, boolean exceptionIfNull)
           
static java.util.Map<java.lang.String,Field> internal_updateKnownFields()
           
static void main(java.lang.String[] args)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FieldFinder

public FieldFinder()
Method Detail

findFieldId

@Deprecated
public static java.lang.String findFieldId(java.lang.String name,
                                                      java.lang.String type)
Deprecated. 

Parameters:
name -
type -
Returns:
the field id

findFieldId

public static java.lang.String findFieldId(java.lang.String name,
                                           java.lang.String type,
                                           boolean exceptionIfNull)
Parameters:
name -
type -
exceptionIfNull -
Returns:
the field id

findAllIdsByType

public static java.util.List<java.lang.String> findAllIdsByType(FieldType type)
find all ids by type

Parameters:
type -
Returns:
all ids by type

find

@Deprecated
public static Field find(java.lang.String name)
                  throws SchemaException
Deprecated. 

Get the specified field.
 Field f = FieldFinder.find(field);
 

Parameters:
name - Name of Field to return.
Returns:
field
Throws:
SchemaException

find

public static Field find(java.lang.String name,
                         boolean exceptionIfNotFound)
Get the specified field.
 Field f = FieldFinder.find(field);
 

Parameters:
name - Name of Field to return.
exceptionIfNotFound - true if exception if not found, otherwise null
Returns:
field
Throws:
SchemaException

find

public static Field find(java.lang.String name,
                         boolean exceptionIfNotFound,
                         boolean includePrivilegeSearch)
                  throws SchemaException
Get the specified field.
 Field f = FieldFinder.find(field);
 

Parameters:
name - Name of Field to return.
exceptionIfNotFound - true if exception if not found, otherwise null
includePrivilegeSearch - if should also use name as privilege
Returns:
field
Throws:
SchemaException

findById

@Deprecated
public static Field findById(java.lang.String fieldId)
Deprecated. use the overload

Get the specified field by id.

Parameters:
fieldId - fieldId
Returns:
the field or null if fieldId is blank. will throw runtime exception if the field is not found

findById

public static Field findById(java.lang.String fieldId,
                             boolean exceptionIfNull)
Get the specified field by id.

Parameters:
fieldId - fieldId
exceptionIfNull -
Returns:
the field or null if fieldId is blank. will throw runtime exception if the field is not found

findAll

public static java.util.Set findAll()
                             throws GrouperException
Find all fields.
 Set fields = FieldFinder.findAll();
 

Returns:
Set of Field objects.
Throws:
GrouperException

findAllByGroupType

public static java.util.Set<Field> findAllByGroupType(GroupType groupType)
                                               throws GrouperDAOException
Parameters:
groupType -
Returns:
set of fields
Throws:
GrouperDAOException

findAllByGroupType

public static java.util.Set<Field> findAllByGroupType(java.lang.String groupTypeId)
                                               throws GrouperDAOException
Parameters:
groupTypeId -
Returns:
set of fields
Throws:
GrouperDAOException

findAllByType

public static java.util.Set<Field> findAllByType(FieldType type)
                                          throws SchemaException
Find all fields of the specified type.
 Set types = FieldFinder.findAllByType(type);
 

Parameters:
type -
Returns:
set of fields
Throws:
SchemaException

internal_updateKnownFields

public static java.util.Map<java.lang.String,Field> internal_updateKnownFields()
Returns:
map

clearCache

public static void clearCache()
clear cache (e.g. if schema export)


main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Parameters:
args -
Throws:
java.lang.Exception