Package edu.internet2.middleware.grouper
Class FieldFinder
java.lang.Object
edu.internet2.middleware.grouper.FieldFinder
Find fields.
- Version:
- $Id: FieldFinder.java,v 1.48 2009-08-11 20:18:08 mchyzer Exp $
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clear cache (e.g.static GrouperCache<Boolean,
Map<String, Field>> return the field cache.static Field
Deprecated.static Field
Get the specified field.static Field
Get the specified field.static Set
findAll()
Find all fields.findAllByGroupType
(GroupType groupType) findAllByGroupType
(String groupTypeId) findAllByType
(FieldType type) Find all fields of the specified type.findAllIdsByType
(FieldType type) find all ids by typestatic Field
Deprecated.use the overloadstatic Field
Get the specified field by id.static String
findFieldId
(String name, String type) Deprecated.static String
findFieldId
(String name, String type, boolean exceptionIfNull) findInternalIdsByNames
(Set<String> fieldNames) find field internal ids by name (exception if not found)static void
-
Constructor Details
-
FieldFinder
public FieldFinder()
-
-
Method Details
-
fieldGrouperCache
return the field cache. Customize with: <cache name="edu.internet2.middleware.grouper.FieldFinder.fieldCache" maxElementsInMemory="10000" eternal="false" timeToIdleSeconds="86400" timeToLiveSeconds="86400" overflowToDisk="false" />
- Returns:
- cache
-
findFieldId
Deprecated.- Parameters:
name
-type
-- Returns:
- the field id
-
findFieldId
- Parameters:
name
-type
-exceptionIfNull
-- Returns:
- the field id
-
findAllIdsByType
find all ids by type- Parameters:
type
-- Returns:
- all ids by type
-
find
Deprecated.Get the specified field.Field f = FieldFinder.find(field);
- Parameters:
name
- Name ofField
to return.- Returns:
- field
- Throws:
SchemaException
-
find
Get the specified field.Field f = FieldFinder.find(field);
- Parameters:
name
- Name ofField
to return.exceptionIfNotFound
- true if exception if not found, otherwise null- Returns:
- field
- Throws:
SchemaException
-
find
public static Field find(String name, boolean exceptionIfNotFound, boolean includePrivilegeSearch) throws SchemaException Get the specified field.Field f = FieldFinder.find(field);
- Parameters:
name
- Name ofField
to return.exceptionIfNotFound
- true if exception if not found, otherwise nullincludePrivilegeSearch
- if should also use name as privilege- Returns:
- field
- Throws:
SchemaException
-
findById
Deprecated.use the overloadGet 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
Get the specified field by id.- Parameters:
fieldId
- fieldIdexceptionIfNull
-- Returns:
- the field or null if fieldId is blank. will throw runtime exception if the field is not found
-
findAll
Find all fields.Set fields = FieldFinder.findAll();
- Returns:
Set
ofField
objects.- Throws:
GrouperException
-
findAllByGroupType
- Parameters:
groupType
-- Returns:
- set of fields
- Throws:
GrouperDAOException
-
findAllByGroupType
- Parameters:
groupTypeId
-- Returns:
- set of fields
- Throws:
GrouperDAOException
-
findAllByType
Find all fields of the specified type.Set types = FieldFinder.findAllByType(type);
- Parameters:
type
-- Returns:
- set of fields
- Throws:
SchemaException
-
internal_updateKnownFields
- Returns:
- map
-
clearCache
public static void clearCache()clear cache (e.g. if schema export) -
main
- Parameters:
args
-- Throws:
Exception
-
findInternalIdsByNames
find field internal ids by name (exception if not found)- Parameters:
fieldNames
-- Returns:
- the map
-