Class GoogleGrouperConnector

java.lang.Object
edu.internet2.middleware.changelogconsumer.googleapps.GoogleGrouperConnector

public class GoogleGrouperConnector extends Object
Contains methods used by both the ChangeLogConsumer and the FullSync classes.
  • Field Details

  • Constructor Details

    • GoogleGrouperConnector

      public GoogleGrouperConnector()
  • Method Details

    • initialize

      public void initialize(String consumerName, GoogleAppsSyncProperties properties) throws GeneralSecurityException, IOException
      Throws:
      GeneralSecurityException
      IOException
    • populateGoogleCache

      public void populateGoogleCache()
      populates the Google user and group caches.
    • populateGooUsersCache

      public void populateGooUsersCache(com.google.api.services.admin.directory.Directory directory)
    • populateGooGroupsCache

      public void populateGooGroupsCache(com.google.api.services.admin.directory.Directory directory)
    • fetchGooGroup

      public com.google.api.services.admin.directory.model.Group fetchGooGroup(String groupKey) throws IOException
      Throws:
      IOException
    • fetchGooUser

      public com.google.api.services.admin.directory.model.User fetchGooUser(String userKey)
    • fetchGrouperGroup

      public Group fetchGrouperGroup(String groupName)
    • fetchGrouperSubject

      public Subject fetchGrouperSubject(String sourceId, String subjectId)
    • createGooUser

      public com.google.api.services.admin.directory.model.User createGooUser(Subject subject) throws IOException
      Throws:
      IOException
    • createGooMember

      public void createGooMember(com.google.api.services.admin.directory.model.Group group, com.google.api.services.admin.directory.model.User user, String role) throws IOException
      Throws:
      IOException
    • createGooGroupIfNecessary

      public void createGooGroupIfNecessary(Group grouperGroup) throws IOException
      Throws:
      IOException
    • determineRole

      public String determineRole(Member member, Group group)
    • unarchiveGooGroupIfNecessary

      public void unarchiveGooGroupIfNecessary(com.google.api.services.admin.directory.model.Group group) throws IOException
      Throws:
      IOException
    • deleteGooGroup

      public void deleteGooGroup(Group group) throws IOException
      Throws:
      IOException
    • deleteGooGroup

      public void deleteGooGroup(PITGroup group) throws IOException
      Throws:
      IOException
    • deleteGooGroupByName

      public void deleteGooGroupByName(String groupName) throws IOException
      Throws:
      IOException
    • deleteGooGroupByName

      public void deleteGooGroupByName(String groupName, String groupId) throws IOException
      Throws:
      IOException
    • deleteGooGroupByEmail

      public void deleteGooGroupByEmail(String groupKey) throws IOException
      Throws:
      IOException
    • getGoogleSyncAttribute

      public AttributeDefName getGoogleSyncAttribute()
      Finds the AttributeDefName specific to this GoogleApps ChangeLog Consumer instance.
      Returns:
      The AttributeDefName for this GoogleApps ChangeLog Consumer
    • shouldSyncGroup

      public boolean shouldSyncGroup(Group group)
    • shouldSyncStem

      public boolean shouldSyncStem(Stem stem)
    • shouldSyncStem

      public boolean shouldSyncStem(String stemName)
    • cacheSyncedGroupsAndStems

      public void cacheSyncedGroupsAndStems()
    • cacheSyncedGroupsAndStems

      public void cacheSyncedGroupsAndStems(boolean fullyPopulate)
    • removeGooMembership

      public void removeGooMembership(String groupName, Subject subject) throws IOException
      Throws:
      IOException
    • removeGooMembership

      public void removeGooMembership(String groupName, String groupId, Subject subject) throws IOException
      Throws:
      IOException
    • removeGooMembership

      public void removeGooMembership(String groupKey, String subjectEmail) throws IOException
      Throws:
      IOException
    • updateGooGroup

      public com.google.api.services.admin.directory.model.Group updateGooGroup(String groupKey, com.google.api.services.admin.directory.model.Group group) throws IOException
      Throws:
      IOException
    • getGooMembership

      public List<com.google.api.services.admin.directory.model.Member> getGooMembership(String groupKey) throws IOException
      Throws:
      IOException
    • getAddressFormatter

      public AddressFormatter getAddressFormatter()
    • getSyncedGroupsAndStems

      public HashMap<String,String> getSyncedGroupsAndStems()
    • createGooMember

      public void createGooMember(Group group, Subject subject, String role) throws IOException
      Throws:
      IOException
    • updateGooMember

      public void updateGooMember(Group group, Subject subject, String role) throws IOException
      Throws:
      IOException