diff --git a/src/main/java/voot/provider/InviteProvider.java b/src/main/java/voot/provider/InviteProvider.java index 0dd1dda..d8ad00a 100644 --- a/src/main/java/voot/provider/InviteProvider.java +++ b/src/main/java/voot/provider/InviteProvider.java @@ -1,9 +1,10 @@ package voot.provider; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpMethod; import org.springframework.http.RequestEntity; -import org.springframework.http.ResponseEntity; import voot.model.Group; import voot.model.Member; import voot.model.Membership; @@ -14,6 +15,8 @@ public class InviteProvider extends AbstractProvider { + private static final Logger LOG = LoggerFactory.getLogger(InviteProvider.class); + private final String groupMembershipsUrlTemplate; public InviteProvider(Configuration configuration) { @@ -26,8 +29,16 @@ public boolean shouldBeQueriedForMemberships(String schacHomeOrganization) { return true; } + @Override + public boolean isExternalGroupProvider() { + return false; + } + + @Override public Set getGroupMemberships(String uid) { + LOG.debug("Calling getGroupMemberships for " + uid); + String uri = String.format(groupMembershipsUrlTemplate, configuration.url, uid); RequestEntity>> requestEntity = new RequestEntity<>(HttpMethod.GET, URI.create(uri)); return restTemplate.exchange(requestEntity, new ParameterizedTypeReference>>() {