Class GrouperZoomCommands

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

public class GrouperZoomCommands extends Object
  • Constructor Details

    • GrouperZoomCommands

      public GrouperZoomCommands()
  • Method Details

    • main

      public static void main(String[] args)
    • test_printUsersPerSubaccount

      public static void test_printUsersPerSubaccount(String configId)
      Parameters:
      configId -
    • retrieveBearerTokenFromCacheOrFresh

      public static String retrieveBearerTokenFromCacheOrFresh(String configId)
      get a cached or fresh bearer token
      Parameters:
      configId -
      Returns:
      the bearer token
    • retrieveBearerTokenFresh

      public static String retrieveBearerTokenFresh(String configId)
      get a cached or fresh bearer token
      Parameters:
      configId -
      Returns:
      the bearer token
    • bearerTokenCache

      public static ExpirableCache<Boolean,String> bearerTokenCache()
      get the cache based on how long to cache. Note this is used for oauth which expires in an hour... we can adjust this in future
      Returns:
      the cache
    • retrieveUser

      public static Map<String,Object> retrieveUser(String configId, String email)
      Parameters:
      configId -
      email -
      Returns:
      map with id(string), first_name(string), last_name(string), email(string), type(int), role_name(string), personal_meeting_url(string), timezone(string), verified(int), group_ids (array[string]), account_id(string), status(string e.g. active) or null if not found
    • retrieveUserFromJsonObject

      public static Map<String,Object> retrieveUserFromJsonObject(com.fasterxml.jackson.databind.JsonNode jsonObject)
      Parameters:
      jsonObject -
      Returns:
      map
    • retrieveUsers

      public static Map<String,Map<String,Object>> retrieveUsers(String configId)
      Parameters:
      configId -
      Returns:
      map key is email, and value with id(string), first_name(string), last_name(string), email(string), type(int), role_name(string), personal_meeting_url(string), timezone(string), verified(int), group_ids (array[string]), account_id(string), status(string e.g. active) or null if not found
    • retrievePhoneUsers

      public static Map<String,Map<String,Object>> retrievePhoneUsers(String configId, String endpointString)
      Parameters:
      configId -
      endpointString -
      Returns:
      map key is email, and value with id(string), first_name(string), last_name(string), email(string) or null if not found
    • retrieveRoles

      public static Map<String,Map<String,Object>> retrieveRoles(String configId)
      Parameters:
      configId -
      Returns:
      map from group name to map with id(string), name(string), and total_members(int)
    • retrieveGroupMemberships

      public static List<Map<String,Object>> retrieveGroupMemberships(String configId, String groupId)
      Parameters:
      configId -
      groupId -
      Returns:
      list of maps with id(string), first_name(string), last_name(string), email(string), type(int), primary_group(boolean)
    • createGroup

      public static Map<String,Object> createGroup(String configId, String name)
      Parameters:
      configId -
      name - is group name which is generally just the extension
      Returns:
      map with id(string), name(string), and total_members(int)
    • addGroupMembership

      public static void addGroupMembership(String configId, String groupId, String memberId)
      Parameters:
      configId -
      groupId -
      memberId -
    • deleteGroup

      public static void deleteGroup(String configId, String groupId)
      Parameters:
      configId -
      groupId - is group id
    • removeGroupMembership

      public static void removeGroupMembership(String configId, String groupId, String memberId)
      Parameters:
      configId -
      groupId -
      memberId -
    • createUser

      public static Map<String,Object> createUser(String configId, String email, String firstName, String lastName, int type)
      Parameters:
      configId -
      email -
      firstName -
      lastName -
      type - 1 basic, 2 licensed, 3, on-prem
      Returns:
      map with id(string), name(string), and total_members(int)
    • retrieveRoleMemberships

      public static List<Map<String,Object>> retrieveRoleMemberships(String configId, String roleId)
      Parameters:
      configId -
      roleId -
      Returns:
      list of maps with id(string), first_name(string), last_name(string), email(string), type(int), department(string)
    • retrieveGroups

      public static Map<String,Map<String,Object>> retrieveGroups(String configId)
      Parameters:
      configId -
      Returns:
      map from group name to map with id(string), name(string), and total_members(int)
    • deleteUser

      public static void deleteUser(String configId, String userIdOrEmail)
      Parameters:
      configId -
      userIdOrEmail - is user id or email
    • addRoleMembership

      public static void addRoleMembership(String configId, String roleId, String memberId)
      Parameters:
      configId -
      roleId -
      memberId -
    • removeRoleMembership

      public static void removeRoleMembership(String configId, String roleId, String memberId)
      Parameters:
      configId -
      groupId -
      memberId -
    • userChangeStatus

      public static void userChangeStatus(String configId, String email, boolean activate)
      Parameters:
      configId -
      email -
      activate - true to activate, false to deactivate
    • userChangeType

      public static void userChangeType(String configId, String email, int type)
      Parameters:
      configId -
      email -
      type - 1 = basic, 2 = licensed, 3 on prem, 99 none
    • userChangePhoneLicense

      public static void userChangePhoneLicense(String configId, String email, Boolean activate)
      Parameters:
      configId -
      email -
      activate -
    • retrieveAccounts

      public static Map<String,Map<String,Object>> retrieveAccounts(String configId)
      Parameters:
      configId -
      Returns:
      map key is id, and value with id(string), account_name(string), owner_email(string), account_type(string), seats(int), subscription_start_time(string), subscription_end_time(string), created_at(string)
    • retrieveSubaccountUsers

      public static Map<String,Map<String,Object>> retrieveSubaccountUsers(String configId, String subaccountId)
      Parameters:
      configId -
      subaccountId -
      Returns:
      map key is email, and value with id(string), first_name(string), last_name(string), email(string), type(int), role_name(string), personal_meeting_url(string), timezone(string), verified(int), group_ids (array[string]), account_id(string), status(string e.g. active) or null if not found