Class GrouperZoomCommands
java.lang.Object
edu.internet2.middleware.grouper.app.zoom.GrouperZoomCommands
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addGroupMembership
(String configId, String groupId, String memberId) static void
addRoleMembership
(String configId, String roleId, String memberId) static ExpirableCache<Boolean,
String> get the cache based on how long to cache.createGroup
(String configId, String name) createUser
(String configId, String email, String firstName, String lastName, int type) static void
deleteGroup
(String configId, String groupId) static void
deleteUser
(String configId, String userIdOrEmail) static void
static void
removeGroupMembership
(String configId, String groupId, String memberId) static void
removeRoleMembership
(String configId, String roleId, String memberId) retrieveAccounts
(String configId) static String
retrieveBearerTokenFresh
(String configId) get a cached or fresh bearer tokenstatic String
retrieveBearerTokenFromCacheOrFresh
(String configId) get a cached or fresh bearer tokenretrieveGroupMemberships
(String configId, String groupId) retrieveGroups
(String configId) retrievePhoneUsers
(String configId, String endpointString) retrieveRoleMemberships
(String configId, String roleId) retrieveRoles
(String configId) retrieveSubaccountUsers
(String configId, String subaccountId) retrieveUser
(String configId, String email) retrieveUserFromJsonObject
(com.fasterxml.jackson.databind.JsonNode jsonObject) retrieveUsers
(String configId) static void
test_printUsersPerSubaccount
(String configId) static void
userChangePhoneLicense
(String configId, String email, Boolean activate) static void
userChangeStatus
(String configId, String email, boolean activate) static void
userChangeType
(String configId, String email, int type)
-
Constructor Details
-
GrouperZoomCommands
public GrouperZoomCommands()
-
-
Method Details
-
main
-
test_printUsersPerSubaccount
- Parameters:
configId
-
-
retrieveBearerTokenFromCacheOrFresh
get a cached or fresh bearer token- Parameters:
configId
-- Returns:
- the bearer token
-
retrieveBearerTokenFresh
get a cached or fresh bearer token- Parameters:
configId
-- Returns:
- the bearer token
-
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
- 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
- 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, retrievePhoneUsersObject>> (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
- Parameters:
configId
-- Returns:
- map from group name to map with id(string), name(string), and total_members(int)
-
retrieveGroupMemberships
- Parameters:
configId
-groupId
-- Returns:
- list of maps with id(string), first_name(string), last_name(string), email(string), type(int), primary_group(boolean)
-
createGroup
- Parameters:
configId
-name
- is group name which is generally just the extension- Returns:
- map with id(string), name(string), and total_members(int)
-
addGroupMembership
- Parameters:
configId
-groupId
-memberId
-
-
deleteGroup
- Parameters:
configId
-groupId
- is group id
-
removeGroupMembership
- 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
- Parameters:
configId
-roleId
-- Returns:
- list of maps with id(string), first_name(string), last_name(string), email(string), type(int), department(string)
-
retrieveGroups
- Parameters:
configId
-- Returns:
- map from group name to map with id(string), name(string), and total_members(int)
-
deleteUser
- Parameters:
configId
-userIdOrEmail
- is user id or email
-
addRoleMembership
- Parameters:
configId
-roleId
-memberId
-
-
removeRoleMembership
- Parameters:
configId
-groupId
-memberId
-
-
userChangeStatus
- Parameters:
configId
-email
-activate
- true to activate, false to deactivate
-
userChangeType
- Parameters:
configId
-email
-type
- 1 = basic, 2 = licensed, 3 on prem, 99 none
-
userChangePhoneLicense
- Parameters:
configId
-email
-activate
-
-
retrieveAccounts
- 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, retrieveSubaccountUsersObject>> (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
-