Class RuleEngine
java.lang.Object
edu.internet2.middleware.grouper.rules.RuleEngine
processes rules and kicks off actions
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionallRulesAttributeAssignValueContainers
(QueryOptions queryOptions) get all rules from the DB in the form of attribute assignmentsstatic void
clear this for testingstatic int
daemon()
validate the rules, and run the daemon stuff in rulesstatic int
daemon
(Hib3GrouperLoaderLog hib3GrouperLoaderLog) validate the rules, and run the daemon stuff in rulesstatic void
fireRule
(RuleCheckType ruleCheckType, RulesBean rulesBean) find rules and fire themmap of checks to sets of relevant rulesrule definitionsgetRuleDefinitions
(boolean onlyValid) static boolean
hasAccessToElApi
(Subject subject) see if a subejct (e.g.ruleCheckIndexDefinitionsByNameOrId
(RuleCheck ruleCheck) get rule definitions from cache based on name or idget rule definitions from cache based on name or idget rule definitions from cache based on name or idstatic RuleEngine
void
setRuleDefinitions
(Set<RuleDefinition> ruleDefinitions) rule definitions
-
Constructor Details
-
RuleEngine
public RuleEngine()
-
-
Method Details
-
getRuleDefinitions
rule definitions- Returns:
- the ruleDefinitions
-
getRuleDefinitions
-
ruleCheckIndexDefinitionsByNameOrId
get rule definitions from cache based on name or id- Parameters:
ruleCheck
-- Returns:
- the definitions
-
ruleCheckIndexDefinitionsByNameOrIdInFolder
get rule definitions from cache based on name or id- Parameters:
ruleCheck
-- Returns:
- the definitions
-
setRuleDefinitions
rule definitions- Parameters:
ruleDefinitions
- the ruleDefinitions to set
-
ruleEngine
- Returns:
- all the rule definitions, cached
-
getRuleCheckIndex
map of checks to sets of relevant rules- Returns:
- the ruleCheckIndex
-
ruleCheckIndexDefinitionsByNameOrIdInFolderPickOneArgOptional
public Set<RuleDefinition> ruleCheckIndexDefinitionsByNameOrIdInFolderPickOneArgOptional(RuleCheck ruleCheck) get rule definitions from cache based on name or id- Parameters:
ruleCheck
-- Returns:
- the definitions
-
fireRule
find rules and fire them- Parameters:
ruleCheckType
-rulesBean
-
-
allRulesAttributeAssignValueContainers
public static Map<AttributeAssign,Set<AttributeAssignValueContainer>> allRulesAttributeAssignValueContainers(QueryOptions queryOptions) get all rules from the DB in the form of attribute assignments- Parameters:
queryOptions
-- Returns:
- the assigns of all rules
-
daemon
public static int daemon()validate the rules, and run the daemon stuff in rules- Returns:
- the number of records changed
-
daemon
validate the rules, and run the daemon stuff in rules- Parameters:
hib3GrouperLoaderLog
-- Returns:
- the number of records changed
-
clearRuleEngineCache
public static void clearRuleEngineCache()clear this for testing -
hasAccessToElApi
see if a subejct (e.g. act as subject) has access to the EL api- Parameters:
subject
-- Returns:
- true if has access, flase if not, use the cache
-