Enum Class GrouperLoaderType
- All Implemented Interfaces:
Serializable
,Comparable<GrouperLoaderType>
,Constable
type of loaders (e.g. sql simple)
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionsimple sql query where all results are all members of group.various change log jobs on the systemgrouper reportsldap query where objects are group, and filter is for multi-valued object where all results are all members of group.ldap query where objects are users, and filter is for multi-valued object where all results are affiliations or something that represents the groups of users.simple ldap query where all results are all members of group.various messaging jobs on the systemother jobRun a psp full sync.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.simple sql query where all results are all members of group. -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
change log consumer prefixstatic final String
change log temp to change logstatic final String
esb http listener namestatic final String
esb xmpp listener namestatic final String
change log consumer prefixstatic final String
other jobs prefixstatic final String
rules daemon -
Method Summary
Modifier and TypeMethodDescriptionabstract 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 notstatic String
attributeValueOrDefaultOrNull
(AttributeAssign attributeAssign, String attributeDefName) get an attribute value, or null, or a default if existsstatic String
attributeValueOrDefaultOrNull
(Group group, String attributeName) get an attribute value, or null, or a default if existsstatic String
attributeValueOrDefaultOrNullAttrDef
(AttributeDef attributeDef, String attributeName) get an attribute value, or null, or a default if existsboolean
dayListContainsToday
(String dayList) static void
initPrivilegesForGroup
(GrouperLoaderResultset grouperLoaderResultsetOverall, Map<String, Map<Privilege, List<Subject>>> privsToAddForGroup, Map<String, Subject> subjectCache, Privilege privilege, String subjectsWithPrivilege) init the privilege for a group, add entries to the privsToAdd methodlookupSubject
(Map<String, Subject> subjectCache, String subjectIdOrIdentifierList) take in a subject list, comma separatedboolean
nameForThisType
(String jobName) if this job name is for this typeretrieveGroups
(GrouperSession grouperSession) retrieve all loader groups from the dbstatic Set<AttributeAssign>
abstract void
runJob
(LoaderJobBean loaderJobBean) sync up a group membership based on query and db.static int
for all attribute jobs in this loader type, schedule them with quartzstatic int
for all ldap jobs in this loader type, schedule them with quartzstatic int
for all jobs in this loader type, schedule them with quartzprotected static void
syncFolderList
(Set<String> groupNamesToSync, Map<String, String> groupNameToDisplayName, GrouperLoaderDisplayNameSyncType grouperLoaderDisplayNameSyncType, String displayNameSyncBaseFolderName, Integer displayNameSyncLevels) static void
syncGroupList
(GrouperLoaderResultset grouperLoaderResultsetOverall, long startTime, GrouperSession grouperSession, List<Group> andGroups, List<GroupType> groupTypes, String groupLikeString, String groupNameOverall, Hib3GrouperLoaderLog hib3GrouploaderLogOverall, GrouperLoaderStatus[] statusOverall, GrouperLoaderDb grouperLoaderDb, Map<String, String> groupNameToDisplayName, Map<String, String> groupNameToDescription, Map<String, Map<Privilege, List<Subject>>> privsToAdd, Set<String> groupNamesFromGroupQuery, GrouperLoaderDisplayNameSyncType grouperLoaderDisplayNameSyncType, String displayNameSyncBaseFolderName, Integer displayNameSyncLevels, GrouperFailsafeBean grouperFailsafeBean) sync a group listprotected static void
syncOneAttributeDef
(String attributeDefName, Hib3GrouperLoaderLog hib3GrouploaderLog, GrouperLoaderDb grouperLoaderDb, long startTime, GrouperSession grouperSession, String attributeLoaderAttrsLike, String attributeLoaderAttrQuery, String attributeLoaderAttrSetQuery, String attributeLoaderActionQuery, String attributeLoaderActionSetQuery) protected static void
syncOneGroupMembership
(String groupName, String loaderGroupName, String groupDisplayNameForInsert, String groupDescription, Hib3GrouperLoaderLog hib3GrouploaderLog, long startTime, GrouperLoaderResultset grouperLoaderResultset, boolean groupList, GrouperSession grouperSession, List<Group> andGroups, List<GroupType> groupTypes, Map<Privilege, List<Subject>> groupPrivsToAdd, GrouperFailsafeBean grouperFailsafeBean) static GrouperLoaderType
typeForThisName
(String jobName) return the type for this job namestatic boolean
validateAndScheduleLdapLoad
(AttributeAssign attributeAssign, Set<String> jobNames, boolean logErrorsToDb) static boolean
validateAndScheduleSqlLoad
(Group group, Set<String> jobNames, boolean logErrorsToDb) static GrouperLoaderType
Returns the enum constant of this class with the specified name.static GrouperLoaderType
valueOfIgnoreCase
(String string, boolean exceptionOnNull) do a case-insensitive matchingstatic GrouperLoaderType[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
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 -
grouper_report
grouper reports -
OTHER_JOB
other job -
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
various change log jobs on the system -
MESSAGE_LISTENER
various messaging jobs on the system -
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 -
LDAP_SIMPLE
simple ldap query where all results are all members of group. must have a subject id attribute -
LDAP_GROUP_LIST
ldap query where objects are group, and filter is for multi-valued object where all results are all members of group. must have a subject id attribute -
LDAP_GROUPS_FROM_ATTRIBUTES
ldap query where objects are users, and filter is for multi-valued object where all results are affiliations or something that represents the groups of users. -
PSP_FULL_SYNC
Run a psp full sync.
-
-
Field Details
-
GROUPER_RULES
rules daemon- See Also:
-
GROUPER_CHANGE_LOG_TEMP_TO_CHANGE_LOG
change log temp to change log- See Also:
-
GROUPER_CHANGE_LOG_CONSUMER_PREFIX
change log consumer prefix- See Also:
-
GROUPER_MESSAGING_LISTENER_PREFIX
change log consumer prefix- See Also:
-
GROUPER_OTHER_JOB_PREFIX
other jobs prefix- See Also:
-
GROUPER_ESB_HTTP_LISTENER
esb http listener name- See Also:
-
GROUPER_ESB_XMMP_LISTENER
esb xmpp listener name- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class has no constant with the specified nameNullPointerException
- if the argument is null
-
initPrivilegesForGroup
public static void initPrivilegesForGroup(GrouperLoaderResultset grouperLoaderResultsetOverall, Map<String, Map<Privilege, List<Subject>>> privsToAddForGroup, Map<String, Subject> subjectCache, Privilege privilege, String subjectsWithPrivilege) init the privilege for a group, add entries to the privsToAdd method- Parameters:
grouperLoaderResultsetOverall
- result set with groupsprivsToAddForGroup
- map to add results tosubjectCache
- to help with resolvingprivilege
- to addsubjectsWithPrivilege
- the subjects who have the privilege
-
syncGroupList
public static void syncGroupList(GrouperLoaderResultset grouperLoaderResultsetOverall, long startTime, GrouperSession grouperSession, List<Group> andGroups, List<GroupType> groupTypes, String groupLikeString, String groupNameOverall, Hib3GrouperLoaderLog hib3GrouploaderLogOverall, GrouperLoaderStatus[] statusOverall, GrouperLoaderDb grouperLoaderDb, Map<String, String> groupNameToDisplayName, Map<String, String> groupNameToDescription, Map<String, Map<Privilege, List<Subject>>> privsToAdd, Set<String> groupNamesFromGroupQuery, GrouperLoaderDisplayNameSyncType grouperLoaderDisplayNameSyncType, String displayNameSyncBaseFolderName, Integer displayNameSyncLevels, GrouperFailsafeBean grouperFailsafeBean) sync a group list- Parameters:
grouperLoaderResultsetOverall
-startTime
-grouperSession
-andGroups
-groupTypes
-groupLikeString
-groupNameOverall
-hib3GrouploaderLogOverall
-statusOverall
-grouperLoaderDb
-groupNameToDisplayName
-groupNameToDescription
-privsToAdd
-groupNamesFromGroupQuery
- if not null, this is the list of groups to sync
-
syncFolderList
protected static void syncFolderList(Set<String> groupNamesToSync, Map<String, String> groupNameToDisplayName, GrouperLoaderDisplayNameSyncType grouperLoaderDisplayNameSyncType, String displayNameSyncBaseFolderName, Integer displayNameSyncLevels) - Parameters:
groupNamesToSync
-groupNameToDisplayName
-grouperLoaderDisplayNameSyncType
-displayNameSyncBaseFolderName
-displayNameSyncLevels
-
-
nameForThisType
if this job name is for this type- Parameters:
jobName
-- Returns:
- true if this name is for this type
-
typeForThisName
return the type for this job name- Parameters:
jobName
-- Returns:
- the type
-
attributeRequired
/** see if an attribute if required or not- Parameters:
attributeName
-- Returns:
- true if required, false if not
-
runJob
sync up a group membership based on query and db. Note, the first thing you should do is set the context type: GrouperContext.createNewDefaultContext(GrouperEngineBuiltin.LOADER, false, true);
- Parameters:
loaderJobBean
- is the bean data
-
attributeOptional
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
get an attribute value, or null, or a default if exists- Parameters:
group
-attributeName
-- Returns:
- the attribute value
-
dayListContainsToday
- Parameters:
dayList
-- Returns:
- true if today is in day list, false if not
-
validateAndScheduleSqlLoad
public static boolean validateAndScheduleSqlLoad(Group group, Set<String> jobNames, boolean logErrorsToDb) - Parameters:
group
-jobNames
-logErrorsToDb
-- Returns:
- true if made changes
-
scheduleLoads
public static int scheduleLoads()for all jobs in this loader type, schedule them with quartz- Returns:
- number of changes made
-
syncOneGroupMembership
protected static void syncOneGroupMembership(String groupName, String loaderGroupName, String groupDisplayNameForInsert, String groupDescription, Hib3GrouperLoaderLog hib3GrouploaderLog, long startTime, GrouperLoaderResultset grouperLoaderResultset, boolean groupList, GrouperSession grouperSession, List<Group> andGroups, List<GroupType> groupTypes, Map<Privilege, List<Subject>> groupPrivsToAdd, GrouperFailsafeBean grouperFailsafeBean) - Parameters:
groupName
-loaderGroupName
- - it's the same as groupName for SQL_SIMPLE and LDAP_SIMPLE. For SQL_GROUP_LIST, it's the group name that stores the loader definition.groupDisplayNameForInsert
- can be null to default to group name or extension. This is display names if a group needs to be created. But the display extension will be changed if differentgroupDescription
- can be null to default to generated description, or the description of the grouphib3GrouploaderLog
-startTime
-grouperLoaderResultset
-groupList
- if this is a list of groups, then do something else with group name and the resultsetgrouperSession
-andGroups
-groupTypes
- comma separated group typesgroupPrivsToAdd
- privgrouperFailsafeBean
- meaning get all members here
-
attributeValueOrDefaultOrNull
public static String attributeValueOrDefaultOrNull(AttributeAssign attributeAssign, String attributeDefName) get an attribute value, or null, or a default if exists- Parameters:
attributeAssign
-attributeDefName
-- Returns:
- the attribute value
-
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
-
syncOneAttributeDef
protected static void syncOneAttributeDef(String attributeDefName, Hib3GrouperLoaderLog hib3GrouploaderLog, GrouperLoaderDb grouperLoaderDb, long startTime, GrouperSession grouperSession, String attributeLoaderAttrsLike, String attributeLoaderAttrQuery, String attributeLoaderAttrSetQuery, String attributeLoaderActionQuery, String attributeLoaderActionSetQuery) - Parameters:
attributeDefName
-hib3GrouploaderLog
-grouperLoaderDb
-startTime
-grouperSession
-attributeLoaderAttrsLike
-attributeLoaderAttrQuery
-attributeLoaderAttrSetQuery
-attributeLoaderActionQuery
-attributeLoaderActionSetQuery
-
-
scheduleAttributeLoads
public static int scheduleAttributeLoads()for all attribute jobs in this loader type, schedule them with quartz- Returns:
- changes made
-
validateAndScheduleLdapLoad
public static boolean validateAndScheduleLdapLoad(AttributeAssign attributeAssign, Set<String> jobNames, boolean logErrorsToDb) - Parameters:
attributeAssign
-jobNames
-logErrorsToDb
-- Returns:
- true if made change
-
scheduleLdapLoads
public static int scheduleLdapLoads()for all ldap jobs in this loader type, schedule them with quartz- Returns:
- changes made
-
retrieveLdapAttributeAssigns
-
retrieveGroups
retrieve all loader groups from the db- Parameters:
grouperSession
-- Returns:
- the groups (will not return null, only the empty set if none)
-
valueOfIgnoreCase
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
-