Class GrouperGoogleApiCommands
java.lang.Object
edu.internet2.middleware.grouper.app.google.GrouperGoogleApiCommands
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GrouperGoogleGroup
createGoogleGroup
(String configId, GrouperGoogleGroup grouperGoogleGroup, Set<String> fieldsToInsert) create a groupstatic void
createGoogleMembership
(String configId, String groupId, String userId) create a membershipstatic void
createGoogleRoleMembership
(String configId, String groupId, String userId, String role) create a membershipstatic GrouperGoogleUser
createGoogleUser
(String configId, GrouperGoogleUser grouperGoogleUser) create a userstatic void
deleteGoogleGroup
(String configId, String groupId) static void
deleteGoogleMembership
(String configId, String groupId, String userId) delete membershipstatic void
deleteGoogleRoleMembership
(String configId, String groupId, String userId, String role, boolean addBackManager, boolean addBackMember) delete membership rolestatic void
deleteGoogleUser
(String configId, String userId) static com.fasterxml.jackson.databind.JsonNode
executeGetMethod
(Map<String, Object> debugMap, String configId, String urlSuffix, boolean useSettingsBearerToken) static com.fasterxml.jackson.databind.JsonNode
executeMethod
(Map<String, Object> debugMap, String httpMethodName, String configId, String urlSuffix, Set<Integer> allowedReturnCodes, int[] returnCode, String body, boolean useSettingsBearerToken) static String
retrieveBearerTokenForGoogleSettingsConfigId
(Map<String, Object> debugMap, String configId) get bearer token for google settings config idstatic GrouperGoogleGroup
retrieveGoogleGroup
(String configId, String id, boolean lookupManagers, boolean lookupOwners) retrieveGoogleGroupMembers
(String configId, String groupId) return user ids in the groupretrieveGoogleGroupMembersIds
(String configId, String groupId, String role) return user ids in the groupstatic List<GrouperGoogleGroup>
retrieveGoogleGroups
(String configId, String fieldToSearchFor, String fieldValue, boolean lookupManagers, boolean lookupOwners) static String
retrieveGoogleMembershipRole
(String configId, String groupId, String memberId) static GrouperGoogleUser
retrieveGoogleUser
(String configId, String id) static List<GrouperGoogleUser>
retrieveGoogleUsers
(String configId) static GrouperGoogleGroup
updateGoogleGroup
(String configId, GrouperGoogleGroup grouperGoogleGroup, Set<String> fieldsToUpdate) update a group except the managers and owners of the groupstatic void
updateGoogleRoleMembership
(String configId, String groupId, String userId, String role) create a membershipstatic GrouperGoogleUser
updateGoogleUser
(String configId, GrouperGoogleUser grouperGoogleUser, Set<String> fieldsToUpdate) update a user
-
Constructor Details
-
GrouperGoogleApiCommands
public GrouperGoogleApiCommands()
-
-
Method Details
-
retrieveBearerTokenForGoogleSettingsConfigId
public static String retrieveBearerTokenForGoogleSettingsConfigId(Map<String, Object> debugMap, String configId) get bearer token for google settings config id- Parameters:
configId
-- Returns:
- the bearer token
-
executeGetMethod
-
executeMethod
-
createGoogleGroup
public static GrouperGoogleGroup createGoogleGroup(String configId, GrouperGoogleGroup grouperGoogleGroup, Set<String> fieldsToInsert) create a group- Parameters:
grouperGoogleGroup
-- Returns:
- the result
-
createGoogleUser
public static GrouperGoogleUser createGoogleUser(String configId, GrouperGoogleUser grouperGoogleUser) create a user- Parameters:
configId
-grouperGoogleUser
-- Returns:
-
createGoogleMembership
create a membership- Parameters:
configId
-groupId
-userId
-
-
createGoogleRoleMembership
public static void createGoogleRoleMembership(String configId, String groupId, String userId, String role) create a membership- Parameters:
grouperGoogleGroup
-
-
updateGoogleRoleMembership
public static void updateGoogleRoleMembership(String configId, String groupId, String userId, String role) create a membership- Parameters:
grouperGoogleGroup
-
-
deleteGoogleUser
-
updateGoogleGroup
public static GrouperGoogleGroup updateGoogleGroup(String configId, GrouperGoogleGroup grouperGoogleGroup, Set<String> fieldsToUpdate) update a group except the managers and owners of the group- Parameters:
grouperGoogleGroup
-- Returns:
- the result
-
updateGoogleUser
public static GrouperGoogleUser updateGoogleUser(String configId, GrouperGoogleUser grouperGoogleUser, Set<String> fieldsToUpdate) update a user- Parameters:
grouperGoogleUser
-- Returns:
- the result
-
deleteGoogleGroup
-
retrieveGoogleGroups
public static List<GrouperGoogleGroup> retrieveGoogleGroups(String configId, String fieldToSearchFor, String fieldValue, boolean lookupManagers, boolean lookupOwners) -
retrieveGoogleUsers
-
retrieveGoogleUser
- Parameters:
configId
-id
- of the user- Returns:
- google user
-
retrieveGoogleMembershipRole
- Parameters:
configId
-id
- of the user- Returns:
- google user
-
retrieveGoogleGroupMembers
return user ids in the group- Parameters:
configId
-groupId
-- Returns:
- user ids
-
retrieveGoogleGroupMembersIds
public static Set<String> retrieveGoogleGroupMembersIds(String configId, String groupId, String role) return user ids in the group- Parameters:
configId
-groupId
-- Returns:
- user ids
-
retrieveGoogleGroup
public static GrouperGoogleGroup retrieveGoogleGroup(String configId, String id, boolean lookupManagers, boolean lookupOwners) - Parameters:
configId
-id
- is the group id- Returns:
- the google group
-
deleteGoogleMembership
delete membership- Parameters:
grouperGoogleGroup
-
-
deleteGoogleRoleMembership
public static void deleteGoogleRoleMembership(String configId, String groupId, String userId, String role, boolean addBackManager, boolean addBackMember) delete membership role- Parameters:
configId
-groupId
-userId
-role
-
-