@Test public void testGetWrappedGroupMembers() { requestHandler.setResource(new ClassPathResource("multiple-wrapped-teammembers.json")); List<Person> groupMembers = this.client.getGroupMembers(GROUP_ID, USER_ID); assertEquals(12, groupMembers.size()); }
@Override public List<Person> getGroupMembers(String groupId, String onBehalfOf) { if (!StringUtils.hasText(onBehalfOf)) { throw new IllegalArgumentException( "For retrieving group members the onBehalfOf may not be empty"); } OAuthRequest request = new OAuthRequest(Verb.GET, environment.getEndpointBaseUrl() + "social/rest/people/" + onBehalfOf + "/" + groupId); InputStream in = execute(onBehalfOf, request); return parser.parseTeamMembers(in).getEntry(); }
OpenConextOAuthClientImpl implements OpenConextOAuthClient, InitializingBean { @Override public List<Person> getGroupMembers(String groupId, String onBehalfOf) { if (!StringUtils.hasText(onBehalfOf)) { throw new IllegalArgumentException( "For retrieving group members the onBehalfOf may not be empty"); } OAuthRequest request = new OAuthRequest(Verb.GET, environment.getEndpointBaseUrl() + "social/rest/people/" + onBehalfOf + "/" + groupId); InputStream in = execute(onBehalfOf, request); return parser.parseTeamMembers(in).getEntry(); } }
OpenConextOAuthClientImpl implements OpenConextOAuthClient, InitializingBean { @Override public List<Person> getGroupMembers(String groupId, String onBehalfOf) { if (!StringUtils.hasText(onBehalfOf)) { throw new IllegalArgumentException( "For retrieving group members the onBehalfOf may not be empty"); } OAuthRequest request = new OAuthRequest(Verb.GET, environment.getEndpointBaseUrl() + "social/rest/people/" + onBehalfOf + "/" + groupId); InputStream in = execute(onBehalfOf, request); return parser.parseTeamMembers(in).getEntry(); } OpenConextOAuthClientImpl(); }
OpenConextOAuthClientImpl implements OpenConextOAuthClient, InitializingBean { @Override public List<Person> getGroupMembers(String groupId, String onBehalfOf) { if (!StringUtils.hasText(onBehalfOf)) { throw new IllegalArgumentException( "For retrieving group members the onBehalfOf may not be empty"); } OAuthRequest request = new OAuthRequest(Verb.GET, environment.getEndpointBaseUrl() + "social/rest/people/" + onBehalfOf + "/" + groupId); InputStream in = execute(onBehalfOf, request); return parser.parseTeamMembers(in).getEntry(); } OpenConextOAuthClientImpl(); @Override boolean isAccessTokenGranted(String userId); @Override String getAuthorizationUrl(); @Override void oauthCallback(HttpServletRequest request, String onBehalfOf); @Override Person getPerson(String userId, String onBehalfOf); @Override List<Person> getGroupMembers(String groupId, String onBehalfOf); @Override List<Group> getGroups(String userId, String onBehalfOf); @Override List<Group20> getGroups20(String userId, String onBehalfOf); @Override Group20 getGroup20(String userId, String groupId, String onBehalfOf); void setCallbackUrl(String url); void setConsumerSecret(String secret); void setConsumerKey(String key); void setEndpointBaseUrl(String url); void setVersion(OAuthVersion v); @Override void afterPropertiesSet(); void setRepository(OAuthRepository repository); void getClientAccessToken(); }
OpenConextOAuthClientImpl implements OpenConextOAuthClient, InitializingBean { @Override public List<Person> getGroupMembers(String groupId, String onBehalfOf) { if (!StringUtils.hasText(onBehalfOf)) { throw new IllegalArgumentException( "For retrieving group members the onBehalfOf may not be empty"); } OAuthRequest request = new OAuthRequest(Verb.GET, environment.getEndpointBaseUrl() + "social/rest/people/" + onBehalfOf + "/" + groupId); InputStream in = execute(onBehalfOf, request); return parser.parseTeamMembers(in).getEntry(); } OpenConextOAuthClientImpl(); @Override boolean isAccessTokenGranted(String userId); @Override String getAuthorizationUrl(); @Override void oauthCallback(HttpServletRequest request, String onBehalfOf); @Override Person getPerson(String userId, String onBehalfOf); @Override List<Person> getGroupMembers(String groupId, String onBehalfOf); @Override List<Group> getGroups(String userId, String onBehalfOf); @Override List<Group20> getGroups20(String userId, String onBehalfOf); @Override Group20 getGroup20(String userId, String groupId, String onBehalfOf); void setCallbackUrl(String url); void setConsumerSecret(String secret); void setConsumerKey(String key); void setEndpointBaseUrl(String url); void setVersion(OAuthVersion v); @Override void afterPropertiesSet(); void setRepository(OAuthRepository repository); void getClientAccessToken();  }