Class HierarchicalOrgLoaderHook
java.lang.Object
edu.internet2.middleware.grouper.hooks.LoaderHooks
edu.internet2.middleware.grouper.hooks.examples.HierarchicalOrgLoaderHook
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouper.hooks.LoaderHooks
METHOD_LOADER_POST_RUN, METHOD_LOADER_PRE_RUN
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
loaderPreRun
(HooksContext hooksContext, HooksLoaderBean preRunBean) called right before a loader runstatic void
retrieveAllExistingNodes
(GrouperLoaderDb grouperLoaderDb) get all existing nodes from the dbstatic Map<String,
edu.internet2.middleware.grouper.hooks.examples.HierarchicalOrgLoaderHook.OrgHierarchyNode> retrieveAllNodes
(GrouperLoaderDb grouperLoaderDb, String orgsTableName, String orgsIdCol, String orgsNameCol, String orgsParentIdCol, String orgsDisplayNameCol) get all nodes from the db in map of id to OrgHierarchyNode objectstatic void
make sure the org hierarchical table is in syncstatic void
syncUpTables
(GrouperLoaderDb grouperLoaderDb, Map<String, edu.internet2.middleware.grouper.hooks.examples.HierarchicalOrgLoaderHook.OrgHierarchyNode> allNodes, Map<String, String> existingNodes) get all existing nodes from the dbMethods inherited from class edu.internet2.middleware.grouper.hooks.LoaderHooks
loaderPostRun
-
Constructor Details
-
HierarchicalOrgLoaderHook
public HierarchicalOrgLoaderHook()
-
-
Method Details
-
loaderPreRun
Description copied from class:LoaderHooks
called right before a loader run -
main
- Parameters:
args
-
-
retrieveAllExistingNodes
get all existing nodes from the db- Parameters:
grouperLoaderDb
-- Returns:
- the map of all nodes, id to name
-
retrieveAllNodes
public static Map<String,edu.internet2.middleware.grouper.hooks.examples.HierarchicalOrgLoaderHook.OrgHierarchyNode> retrieveAllNodes(GrouperLoaderDb grouperLoaderDb, String orgsTableName, String orgsIdCol, String orgsNameCol, String orgsParentIdCol, String orgsDisplayNameCol) get all nodes from the db in map of id to OrgHierarchyNode object- Parameters:
grouperLoaderDb
-orgsTableName
-orgsIdCol
-orgsNameCol
-orgsParentIdCol
-orgsDisplayNameCol
-- Returns:
- the map of all nodes
-
syncUpHierarchicalOrgTable
public static void syncUpHierarchicalOrgTable()make sure the org hierarchical table is in sync -
syncUpTables
public static void syncUpTables(GrouperLoaderDb grouperLoaderDb, Map<String, edu.internet2.middleware.grouper.hooks.examples.HierarchicalOrgLoaderHook.OrgHierarchyNode> allNodes, Map<String, String> existingNodes) get all existing nodes from the db- Parameters:
grouperLoaderDb
-allNodes
-existingNodes
-
-