Class GrouperZoomLocalCommands

java.lang.Object
edu.internet2.middleware.grouper.app.zoom.GrouperZoomLocalCommands

public class GrouperZoomLocalCommands extends Object
  • Constructor Details

    • GrouperZoomLocalCommands

      public GrouperZoomLocalCommands()
  • Method Details

    • folderNameToProvision

      public static String folderNameToProvision(String configId)
      Parameters:
      configId -
      Returns:
      the folder name
    • roleFolderNameToProvision

      public static String roleFolderNameToProvision(String configId)
      folder in grouper that corresponds to roles in zoom
      Parameters:
      configId -
      Returns:
      the folder name
    • groupNameToDeleteUsers

      public static String groupNameToDeleteUsers(String configId)
      Parameters:
      configId -
      Returns:
      the group name
    • removeGrouperMembershipFromDeletedGroupAfterDeleteZoomUser

      public static boolean removeGrouperMembershipFromDeletedGroupAfterDeleteZoomUser(String configId)
      Parameters:
      configId -
      Returns:
      the group name
    • removeGrouperMembershipFromDeactivatedGroupAfterDeactivateZoomUser

      public static boolean removeGrouperMembershipFromDeactivatedGroupAfterDeactivateZoomUser(String configId)
      Parameters:
      configId -
      Returns:
      the group name
    • removeGrouperMembershipFromDelicensedGroupAfterDelicenseZoomUser

      public static boolean removeGrouperMembershipFromDelicensedGroupAfterDelicenseZoomUser(String configId)
      Parameters:
      configId -
      Returns:
      the group name
    • removeGrouperMembershipFromDelicensedGroupAfterDelicensePhoneUser

      public static boolean removeGrouperMembershipFromDelicensedGroupAfterDelicensePhoneUser(String configId)
      Parameters:
      configId -
      Returns:
      the group name
    • groupNameToDeactivateUsers

      public static String groupNameToDeactivateUsers(String configId)
      Parameters:
      configId -
      Returns:
      the group name
    • licenseReactivatedUsers

      public static boolean licenseReactivatedUsers(String configId)
      Parameters:
      configId -
      Returns:
      true if reactivated users should be licensed
    • groupNameToReactivateUsers

      public static String groupNameToReactivateUsers(String configId)
      Parameters:
      configId -
      Returns:
      the group name
    • groupNameToDelicenseUsers

      public static String groupNameToDelicenseUsers(String configId)
      Parameters:
      configId -
      Returns:
      the group name
    • groupNameToDelicensePhoneUsers

      public static String groupNameToDelicensePhoneUsers(String configId)
      Parameters:
      configId -
      Returns:
      the group name
    • deleteInTargetIfDeletedInGrouper

      public static boolean deleteInTargetIfDeletedInGrouper(String configId)
      Parameters:
      configId -
      Returns:
      if delete
    • configSourcesForSubjects

      public static Set<String> configSourcesForSubjects(String configId)
      sources for subjects
      Parameters:
      configId -
      Returns:
      the config sources for subjects
    • configIgnoreUserIds

      public static Set<String> configIgnoreUserIds(String configId)
      user ids to ignore if they are in a group (e.g. admin accounts)
      Parameters:
      configId -
      Returns:
      user ids to ignore
    • subjectAttributeForZoomEmail

      public static String subjectAttributeForZoomEmail(String configId)
      Parameters:
      configId -
      Returns:
      the folder name
    • folderToProvision

      public static Stem folderToProvision(String configId)
      Parameters:
      configId -
      Returns:
      the stem that has groups
    • roleFolderToProvision

      public static Stem roleFolderToProvision(String configId)
      Parameters:
      configId -
      Returns:
      the stem that has groups
    • groupProvisionRemoveOnly

      public static boolean groupProvisionRemoveOnly(String configId)
      if provision remove only
      Parameters:
      configId -
      Returns:
      the stem that has groups
    • roleProvisionRemoveOnly

      public static boolean roleProvisionRemoveOnly(String configId)
      if role provision remove only
      Parameters:
      configId -
      Returns:
      if remove only
    • groupExtensionsToProvision

      public static Set<String> groupExtensionsToProvision(String configId)
      Parameters:
      configId -
      Returns:
      the group extensions to provision
    • roleExtensionsToProvision

      public static Set<String> roleExtensionsToProvision(String configId)
      Parameters:
      configId -
      Returns:
      the role extensions to provision
    • groupExtensionsToProvisionHelper

      public static Set<String> groupExtensionsToProvisionHelper(String configId, Stem parent)
      Parameters:
      configId -
      Returns:
      the group extensions to provision
    • groupsEmailsToProvision

      public static Map<String,Set<String>> groupsEmailsToProvision(String configId)
      get all memberships to provision by email
      Parameters:
      configId -
      Returns:
      the map of group extension to set of emails
    • rolesEmailsToProvision

      public static Map<String,Set<String>> rolesEmailsToProvision(String configId)
      get all memberships to provision by email for roles
      Parameters:
      configId -
      Returns:
      the map of role extension to set of emails
    • groupsEmailsFromFolderHelper

      public static Map<String,Set<String>> groupsEmailsFromFolderHelper(String configId, String folderName)
      get all memberships to provision by email
      Parameters:
      configId -
      folderName -
      Returns:
      the map of group extension to set of emails
    • groupEmailsFromGroup

      public static Set<String> groupEmailsFromGroup(String configId, String groupName)
      get all memberships from group by email
      Parameters:
      configId -
      groupName -
      Returns:
      the set of emails
    • convertGroupExtensionSourceIdSubjectIdToSourceIdToSubjectIds

      public static Map<String,Set<String>> convertGroupExtensionSourceIdSubjectIdToSourceIdToSubjectIds(String configId, Map<String,Set<MultiKey>> groupsSourceIdsSubjectIdsToProvision)
      Parameters:
      configId -
      groupsSourceIdsSubjectIdsToProvision -
      Returns:
      the map
    • convertSourceIdSubjectIdToSourceIdToSubjectIds

      public static Map<String,Set<String>> convertSourceIdSubjectIdToSourceIdToSubjectIds(String configId, Set<MultiKey> sourceIdsSubjectIds)
      Parameters:
      configId -
      sourceIdsSubjectIds -
      Returns:
      the map
    • convertSourceIdSubjectIdToEmail

      public static String convertSourceIdSubjectIdToEmail(String configId, String sourceId, String subjectId)
      input sourceId to subjectIds, return sourceId/subjectId multikey to email
      Parameters:
      configId -
      sourceId -
      subjectId -
      Returns:
      email
    • convertSourceIdSubjectIdToEmail

      public static Map<MultiKey,String> convertSourceIdSubjectIdToEmail(String configId, Map<String,Set<String>> sourceIdToSubjectIdsInput)
      input sourceId to subjectIds, return sourceId/subjectId multikey to email
      Parameters:
      configId -
      sourceIdToSubjectIdsInput -
      Returns:
      map of sourceId/subjectId to email
    • groupExtensionsInFolder

      public static Set<String> groupExtensionsInFolder(String folderName)
      Parameters:
      folderName -
      Returns:
      the group extensions
    • convertEmailToSourceIdSubjectId

      public static MultiKey convertEmailToSourceIdSubjectId(String configId, String emailInput)
      input sourceId to subjectIds, return sourceId/subjectId multikey to email
      Parameters:
      configId -
      emailInput -
      Returns:
      map of email to sourceId/subjectId
    • convertEmailToSourceIdSubjectId

      public static Map<String,MultiKey> convertEmailToSourceIdSubjectId(String configId, Collection<String> emailsInput)
      input sourceId to subjectIds, return sourceId/subjectId multikey to email
      Parameters:
      configId -
      emailsInput -
      Returns:
      map of email to sourceId/subjectId
    • groupsSourceIdsSubjectIdsToProvisionByFolderName

      public static Map<String,Set<MultiKey>> groupsSourceIdsSubjectIdsToProvisionByFolderName(String configId, String stemName)
      get all memberships to provision, filter out ones not in correct source
      Parameters:
      configId -
      stemName -
      Returns:
      the map of group extension to set of multikey with sourceId and subjectId
    • groupsSourceIdsSubjectIdsToProvision

      public static Map<String,Set<MultiKey>> groupsSourceIdsSubjectIdsToProvision(String configId, String stemId)
      get all memberships to provision, filter out ones not in correct source
      Parameters:
      configId -
      stemId -
      Returns:
      the map of group extension to set of multikey with sourceId and subjectId
    • groupSourceIdsSubjectIds

      public static Set<MultiKey> groupSourceIdsSubjectIds(String configId, String groupName)
      get all memberships, filter out ones not in correct source
      Parameters:
      configId -
      groupName -
      Returns:
      the map of group extension to set of multikey with sourceId and subjectId
    • groupSourceIdSubjectIdToProvision

      public static boolean groupSourceIdSubjectIdToProvision(String configId, String groupExtensionParam, String sourceIdParam, String subjectIdParam)
      get all memberships to provision, filter out ones not in correct source
      Parameters:
      configId -
      groupExtensionParam -
      sourceIdParam -
      subjectIdParam -
      Returns:
      true if membership exists
    • roleSourceIdSubjectIdToProvision

      public static boolean roleSourceIdSubjectIdToProvision(String configId, String groupExtensionParam, String sourceIdParam, String subjectIdParam)
      get all memberships to provision, filter out ones not in correct source
      Parameters:
      configId -
      groupExtensionParam -
      sourceIdParam -
      subjectIdParam -
      Returns:
      true if membership exists
    • groupSourceIdSubjectIdToProvisionHelper

      public static boolean groupSourceIdSubjectIdToProvisionHelper(String configId, Stem folderToProvision, String groupExtensionParam, String sourceIdParam, String subjectIdParam)
      get all memberships to provision, filter out ones not in correct source
      Parameters:
      configId -
      folderToProvision -
      groupExtensionParam -
      sourceIdParam -
      subjectIdParam -
      Returns:
      true if membership exists
    • groupSourceIdSubjectIdToDelete

      public static boolean groupSourceIdSubjectIdToDelete(String configId, String sourceIdParam, String subjectIdParam)
      see if subject should be deleted
      Parameters:
      configId -
      sourceIdParam -
      subjectIdParam -
      Returns:
      true if membership exists
    • groupSourceIdSubjectIdToDeactivate

      public static boolean groupSourceIdSubjectIdToDeactivate(String configId, String sourceIdParam, String subjectIdParam)
      see if subject should be deactivated
      Parameters:
      configId -
      sourceIdParam -
      subjectIdParam -
      Returns:
      true if membership exists
    • groupSourceIdSubjectIdToDelicense

      public static boolean groupSourceIdSubjectIdToDelicense(String configId, String sourceIdParam, String subjectIdParam)
      see if subject should be delicensed
      Parameters:
      configId -
      sourceIdParam -
      subjectIdParam -
      Returns:
      true if membership exists
    • main

      public static void main(String[] args)
      Parameters:
      args -
    • deleteGroupExtensionsInFolder

      public static void deleteGroupExtensionsInFolder(String groupSyncFolder, Set<String> groupsInGrouperToDelete)
      Parameters:
      groupSyncFolder -
      groupsInGrouperToDelete -
    • createGroupExtensionsInFolder

      public static void createGroupExtensionsInFolder(String groupSyncFolder, Set<String> groupsInGrouperToAdd)
      Parameters:
      groupSyncFolder -
      groupsInGrouperToAdd -
    • addMembership

      public static boolean addMembership(String configId, String groupSyncFolder, String grouperGroupExtension, String emailToAddToGrouper, String zoomUserId)
      Parameters:
      configId -
      groupSyncFolder -
      grouperGroupExtension -
      emailToAddToGrouper -
      zoomUserId -
      Returns:
      true if added, false if not
      Throws:
      SubjectNotFoundException
    • hasMembership

      public static boolean hasMembership(String configId, String groupName, String sourceIdParam, String subjectIdParam)
      Parameters:
      configId -
      groupName -
      sourceIdParam -
      subjectIdParam -
      Returns:
      true if subject is member of group
    • removeMembership

      public static boolean removeMembership(String configId, String groupSyncFolder, String grouperGroupExtension, String emailToAddToGrouper, String zoomUserId)
      Parameters:
      configId -
      groupSyncFolder -
      grouperGroupExtension -
      emailToAddToGrouper -
      zoomUserId -
      Returns:
      true if added, false if not
    • removeMembership

      public static void removeMembership(String configId, String groupName, String email)
      Parameters:
      configId -
      groupName -
      email -