edu.internet2.middleware.grouper.app.loader
Enum GrouperLoaderType

java.lang.Object
  extended by java.lang.Enum<GrouperLoaderType>
      extended by edu.internet2.middleware.grouper.app.loader.GrouperLoaderType
All Implemented Interfaces:
Serializable, Comparable<GrouperLoaderType>

public enum GrouperLoaderType
extends Enum<GrouperLoaderType>

type of loaders (e.g. sql simple)


Enum Constant Summary
ATTR_SQL_SIMPLE
          simple sql query where all results are all members of group.
CHANGE_LOG
          various change log jobs on the system
MAINTENANCE
          various maintenance jobs on the system
SQL_GROUP_LIST
          sql query where there is a column for group_name (which is the extension of each stem, and the extension of the group, separated by colons) must have a subject_id col, and optionally a subject_source_id col.
SQL_SIMPLE
          simple sql query where all results are all members of group.
 
Field Summary
static String GROUPER_CHANGE_LOG_CONSUMER_PREFIX
          change log consumer prefix
static String GROUPER_CHANGE_LOG_TEMP_TO_CHANGE_LOG
          change log temp to change log
static String GROUPER_ENABLED_DISABLED
          maintenance enabledDisabled name
static String GROUPER_ESB_HTTP_LISTENER
          esb http listener name
static String GROUPER_ESB_XMMP_LISTENER
          esb xmpp listener name
static String GROUPER_REPORT
          maintenance grouper report name
static String MAINTENANCE_CLEAN_LOGS
          maintenance clean logs name
 
Method Summary
abstract  boolean attributeOptional(String attributeName)
          see if an attribute if optional or not (if not, then it is either required or forbidden)
abstract  boolean attributeRequired(String attributeName)
          /** see if an attribute if required or not
static String attributeValueOrDefaultOrNull(Group group, String attributeName)
          get an attribute value, or null, or a default if exists
static String attributeValueOrDefaultOrNullAttrDef(AttributeDef attributeDef, String attributeName)
          get an attribute value, or null, or a default if exists
 boolean dayListContainsToday(String dayList)
           
static List<Subject> lookupSubject(Map<String,Subject> subjectCache, String subjectIdOrIdentifierList)
          take in a subject list, comma separated
 boolean nameForThisType(String jobName)
          if this job name is for this type
abstract  void runJob(LoaderJobBean loaderJobBean)
          sync up a group membership based on query and db
static void scheduleAttributeLoads()
          for all attribute jobs in this loader type, schedule them with quartz
static void scheduleLoads()
          for all jobs in this loader type, schedule them with quartz
static GrouperLoaderType typeForThisName(String jobName)
          return the type for this job name
static GrouperLoaderType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static GrouperLoaderType valueOfIgnoreCase(String string, boolean exceptionOnNull)
          do a case-insensitive matching
static GrouperLoaderType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

SQL_SIMPLE

public static final GrouperLoaderType SQL_SIMPLE
simple sql query where all results are all members of group. must have a subject_id col, and optionally a subject_source_id col


MAINTENANCE

public static final GrouperLoaderType MAINTENANCE
various maintenance jobs on the system


SQL_GROUP_LIST

public static final GrouperLoaderType SQL_GROUP_LIST
sql query where there is a column for group_name (which is the extension of each stem, and the extension of the group, separated by colons) must have a subject_id col, and optionally a subject_source_id col. note the query should have no order by, and if there is a where clause, it should have "where" separated by whitespace on both side so it can be detected


CHANGE_LOG

public static final GrouperLoaderType CHANGE_LOG
various change log jobs on the system


ATTR_SQL_SIMPLE

public static final GrouperLoaderType ATTR_SQL_SIMPLE
simple sql query where all results are all members of group. must have a subject_id col, and optionally a subject_source_id col

Field Detail

MAINTENANCE_CLEAN_LOGS

public static final String MAINTENANCE_CLEAN_LOGS
maintenance clean logs name

See Also:
Constant Field Values

GROUPER_REPORT

public static final String GROUPER_REPORT
maintenance grouper report name

See Also:
Constant Field Values

GROUPER_ENABLED_DISABLED

public static final String GROUPER_ENABLED_DISABLED
maintenance enabledDisabled name

See Also:
Constant Field Values

GROUPER_CHANGE_LOG_TEMP_TO_CHANGE_LOG

public static final String GROUPER_CHANGE_LOG_TEMP_TO_CHANGE_LOG
change log temp to change log

See Also:
Constant Field Values

GROUPER_CHANGE_LOG_CONSUMER_PREFIX

public static final String GROUPER_CHANGE_LOG_CONSUMER_PREFIX
change log consumer prefix

See Also:
Constant Field Values

GROUPER_ESB_HTTP_LISTENER

public static final String GROUPER_ESB_HTTP_LISTENER
esb http listener name

See Also:
Constant Field Values

GROUPER_ESB_XMMP_LISTENER

public static final String GROUPER_ESB_XMMP_LISTENER
esb xmpp listener name

See Also:
Constant Field Values
Method Detail

values

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

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

valueOf

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

nameForThisType

public boolean nameForThisType(String jobName)
if this job name is for this type

Parameters:
jobName -
Returns:
true if this name is for this type

typeForThisName

public static GrouperLoaderType typeForThisName(String jobName)
return the type for this job name

Parameters:
jobName -
Returns:
the type

attributeRequired

public abstract boolean attributeRequired(String attributeName)
/** see if an attribute if required or not

Parameters:
attributeName -
Returns:
true if required, false if not

runJob

public abstract void runJob(LoaderJobBean loaderJobBean)
sync up a group membership based on query and db

Parameters:
loaderJobBean - is the bean data

attributeOptional

public abstract boolean attributeOptional(String attributeName)
see if an attribute if optional or not (if not, then it is either required or forbidden)

Parameters:
attributeName -
Returns:
true if optional, false if not

lookupSubject

public static List<Subject> lookupSubject(Map<String,Subject> subjectCache,
                                          String subjectIdOrIdentifierList)
take in a subject list, comma separated

Parameters:
subjectCache -
subjectIdOrIdentifierList -
Returns:
the list of subjects (never null)

attributeValueOrDefaultOrNull

public static String attributeValueOrDefaultOrNull(Group group,
                                                   String attributeName)
get an attribute value, or null, or a default if exists

Parameters:
group -
attributeName -
Returns:
the attribute value

dayListContainsToday

public boolean dayListContainsToday(String dayList)
Parameters:
dayList -
Returns:
true if today is in day list, false if not

scheduleLoads

public static void scheduleLoads()
for all jobs in this loader type, schedule them with quartz


attributeValueOrDefaultOrNullAttrDef

public static String attributeValueOrDefaultOrNullAttrDef(AttributeDef attributeDef,
                                                          String attributeName)
get an attribute value, or null, or a default if exists

Parameters:
attributeDef -
attributeName -
Returns:
the attribute value

scheduleAttributeLoads

public static void scheduleAttributeLoads()
for all attribute jobs in this loader type, schedule them with quartz


valueOfIgnoreCase

public static GrouperLoaderType valueOfIgnoreCase(String string,
                                                  boolean exceptionOnNull)
do a case-insensitive matching

Parameters:
string -
exceptionOnNull - will not allow null or blank entries
Returns:
the enum or null or exception if not found