public class GroupsResource extends AbstractResource
MAX_RESULTS_PARAM, request, START_INDEX_PARAM, uriInfo
Constructor and Description |
---|
GroupsResource(GroupsController groupsController,
MembershipsController membershipsController) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
addDirectChildGroup(String groupName,
GroupEntity childGroup) |
javax.ws.rs.core.Response |
addDirectParentGroup(String groupName,
GroupEntity parentGroup) |
javax.ws.rs.core.Response |
addDirectUser(String groupName,
UserEntity user) |
javax.ws.rs.core.Response |
addGroup(GroupEntity restGroup)
Adds a new group.
|
javax.ws.rs.core.Response |
deleteDirectChildGroup(String groupName,
String childGroupName) |
javax.ws.rs.core.Response |
deleteDirectUser(String groupName,
String username) |
javax.ws.rs.core.Response |
deleteGroupAttribute(String groupname,
String attributeName) |
javax.ws.rs.core.Response |
getDirectChildGroups(String groupName,
String childGroupName,
int startIndex,
int maxResults) |
javax.ws.rs.core.Response |
getDirectParentGroups(String groupName,
String childGroupName,
int startIndex,
int maxResults) |
javax.ws.rs.core.Response |
getDirectUsers(String groupName,
String username,
int startIndex,
int maxResults) |
javax.ws.rs.core.Response |
getGroup(String groupName) |
javax.ws.rs.core.Response |
getGroupAttributes(String groupName) |
javax.ws.rs.core.Response |
getMemberships(javax.ws.rs.core.Request request)
This method will only return XML, not JSON.
|
javax.ws.rs.core.Response |
getNestedChildGroups(String groupName,
String childGroupName,
int startIndex,
int maxResults) |
javax.ws.rs.core.Response |
getNestedParentGroups(String groupName,
String parentGroupName,
int startIndex,
int maxResults) |
javax.ws.rs.core.Response |
getNestedUsers(String groupName,
String username,
int startIndex,
int maxResults) |
javax.ws.rs.core.Response |
removeGroup(String groupname) |
javax.ws.rs.core.Response |
storeGroupAttributes(String groupname,
MultiValuedAttributeEntityList attributes)
Stores the group attributes
|
javax.ws.rs.core.Response |
updateGroup(String groupName,
GroupEntity restGroup)
Updates an existing group.
|
getApplicationName, getBaseUri, setApplicationName, setRequest, setUriInfo
public GroupsResource(GroupsController groupsController, MembershipsController membershipsController)
public javax.ws.rs.core.Response getGroup(String groupName) throws GroupNotFoundException, OperationFailedException
public javax.ws.rs.core.Response addGroup(GroupEntity restGroup) throws GroupNotFoundException, InvalidGroupException, ApplicationPermissionException, OperationFailedException
restGroup
- the group to createGroupNotFoundException
InvalidGroupException
ApplicationPermissionException
OperationFailedException
public javax.ws.rs.core.Response updateGroup(String groupName, GroupEntity restGroup) throws GroupNotFoundException, InvalidGroupException, ApplicationPermissionException, OperationFailedException
restGroup
- the group to updateGroupNotFoundException
InvalidGroupException
ApplicationPermissionException
OperationFailedException
public javax.ws.rs.core.Response removeGroup(String groupname) throws GroupNotFoundException, ApplicationPermissionException, OperationFailedException
public javax.ws.rs.core.Response getGroupAttributes(String groupName) throws GroupNotFoundException, OperationFailedException
public javax.ws.rs.core.Response storeGroupAttributes(String groupname, MultiValuedAttributeEntityList attributes) throws GroupNotFoundException, ApplicationPermissionException, OperationFailedException
groupname
- name of the groupattributes
- group attributesGroupNotFoundException
ApplicationPermissionException
OperationFailedException
public javax.ws.rs.core.Response deleteGroupAttribute(String groupname, String attributeName) throws GroupNotFoundException, ApplicationPermissionException, OperationFailedException
public javax.ws.rs.core.Response getDirectUsers(String groupName, String username, int startIndex, int maxResults) throws MembershipNotFoundException, OperationFailedException
public javax.ws.rs.core.Response addDirectUser(String groupName, UserEntity user) throws GroupNotFoundException, OperationFailedException, ApplicationPermissionException, MembershipAlreadyExistsException
public javax.ws.rs.core.Response deleteDirectUser(String groupName, String username) throws GroupNotFoundException, MembershipNotFoundException, UserNotFoundException, OperationFailedException, ApplicationPermissionException
public javax.ws.rs.core.Response getNestedUsers(String groupName, String username, int startIndex, int maxResults) throws MembershipNotFoundException, OperationFailedException
public javax.ws.rs.core.Response getDirectParentGroups(String groupName, String childGroupName, int startIndex, int maxResults) throws MembershipNotFoundException, OperationFailedException
public javax.ws.rs.core.Response addDirectParentGroup(String groupName, GroupEntity parentGroup) throws InvalidMembershipException, OperationFailedException, ApplicationPermissionException, MembershipAlreadyExistsException
public javax.ws.rs.core.Response getNestedParentGroups(String groupName, String parentGroupName, int startIndex, int maxResults) throws MembershipNotFoundException, OperationFailedException
public javax.ws.rs.core.Response getDirectChildGroups(String groupName, String childGroupName, int startIndex, int maxResults) throws MembershipNotFoundException, OperationFailedException
public javax.ws.rs.core.Response addDirectChildGroup(String groupName, GroupEntity childGroup) throws InvalidMembershipException, ApplicationPermissionException, OperationFailedException, MembershipAlreadyExistsException
public javax.ws.rs.core.Response deleteDirectChildGroup(String groupName, String childGroupName) throws MembershipNotFoundException, GroupNotFoundException, ApplicationPermissionException, OperationFailedException
public javax.ws.rs.core.Response getNestedChildGroups(String groupName, String childGroupName, int startIndex, int maxResults) throws MembershipNotFoundException, OperationFailedException
public javax.ws.rs.core.Response getMemberships(@Context javax.ws.rs.core.Request request) throws GroupNotFoundException, NoSuchAlgorithmException
Copyright © 2016 Atlassian. All rights reserved.