@Path(value="group")
@Consumes(value={"application/xml","application/json"})
@Produces(value={"application/xml","application/json"})
public class GroupsResource
extends AbstractResource
request, uriInfo| Constructor and Description |
|---|
GroupsResource(GroupsController groupsController,
MembershipsController membershipsController) |
| Modifier and Type | Method and Description |
|---|---|
javax.ws.rs.core.Response |
addDirectChildGroupMembership(String groupName,
GroupEntity childGroup)
Adds a direct child group membership.
|
javax.ws.rs.core.Response |
addDirectParentGroupMembership(String groupName,
GroupEntity parentGroup)
Adds a direct parent group membership.
|
javax.ws.rs.core.Response |
addGroup(GroupEntity restGroup)
Adds a new group.
|
javax.ws.rs.core.Response |
addUserAsDirectGroupMember(String groupName,
UserEntity user)
Adds a user as a direct member of the specified group.
|
javax.ws.rs.core.Response |
deleteGroupAttribute(String groupname,
String attributeName)
Deletes a group attribute.
|
javax.ws.rs.core.Response |
getAllMemberships(javax.ws.rs.core.Request request)
Retrieves full details of all group memberships, with users and nested groups.
|
javax.ws.rs.core.Response |
getDirectChildrenOfGroup(String groupName,
String childGroupName,
int startIndex,
int maxResults)
Retrieves the groups that are direct children of the specified group or a single direct child of that group with the specified name.
|
javax.ws.rs.core.Response |
getDirectMembersOfGroup(String groupName,
String username,
int startIndex,
int maxResults)
Retrieves the users that are direct members of the specified group or a specified user who is a direct member of that group.
|
javax.ws.rs.core.Response |
getDirectParentsOfGroup(String groupName,
String childGroupName,
int startIndex,
int maxResults)
Retrieves the groups that are direct parents of the specified group or a direct parent group of the specified child group.
|
javax.ws.rs.core.Response |
getGroup(String groupName)
Retrieves a group.
|
javax.ws.rs.core.Response |
getGroupAttributes(String groupName)
Retrieves a list of group attributes.
|
javax.ws.rs.core.Response |
getNestedChildrenOfGroup(String groupName,
String childGroupName,
int startIndex,
int maxResults)
Retrieves nested children of the specified group or a single nested child of that group with the specified name.
|
javax.ws.rs.core.Response |
getNestedMembersOfGroup(String groupName,
String username,
int startIndex,
int maxResults)
Retrieves the users that are nested members of the specified group or a single user who is a nested member of the specified group.
|
javax.ws.rs.core.Response |
getNestedParentGroups(String groupName,
String parentGroupName,
int startIndex,
int maxResults)
Retrieves the groups that are nested parents of the specified group or a single nested parent of that group with the specified name.
|
javax.ws.rs.core.Response |
removeDirectChildGroupMembership(String groupName,
String childGroupName)
Deletes a child group membership.
|
javax.ws.rs.core.Response |
removeDirectGroupMembership(String groupName,
String username)
Removes the user membership.
|
javax.ws.rs.core.Response |
removeGroup(String groupname)
Deletes a group.
|
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, setUriInfopublic GroupsResource(GroupsController groupsController, MembershipsController membershipsController)
@GET
public javax.ws.rs.core.Response getGroup(@QueryParam(value="groupname")
String groupName)
throws GroupNotFoundException
groupName - Name of the group to retrieve.GroupNotFoundException@POST public javax.ws.rs.core.Response addGroup(GroupEntity restGroup) throws GroupNotFoundException, InvalidGroupException, ApplicationPermissionException, OperationFailedException
restGroup - the group to create.GroupNotFoundExceptionInvalidGroupExceptionApplicationPermissionExceptionOperationFailedException@PUT
public javax.ws.rs.core.Response updateGroup(@QueryParam(value="groupname")
String groupName,
GroupEntity restGroup)
throws GroupNotFoundException,
InvalidGroupException,
ApplicationPermissionException,
OperationFailedException
groupName - the name of the group to update.restGroup - the update data.GroupNotFoundExceptionInvalidGroupExceptionApplicationPermissionExceptionOperationFailedException@DELETE
public javax.ws.rs.core.Response removeGroup(@QueryParam(value="groupname")
String groupname)
throws GroupNotFoundException,
ApplicationPermissionException,
OperationFailedException
groupname - Name of the group to delete.GroupNotFoundExceptionApplicationPermissionExceptionOperationFailedException@GET
@Path(value="attribute")
public javax.ws.rs.core.Response getGroupAttributes(@QueryParam(value="groupname")
String groupName)
throws GroupNotFoundException
groupName - Name of the group to fetch attributes from.GroupNotFoundException@POST
@Path(value="attribute")
public javax.ws.rs.core.Response storeGroupAttributes(@QueryParam(value="groupname")
String groupname,
MultiValuedAttributeEntityList attributes)
throws GroupNotFoundException,
ApplicationPermissionException,
OperationFailedException
groupname - name of the group.attributes - the attributes to store.GroupNotFoundExceptionApplicationPermissionExceptionOperationFailedException@DELETE
@Path(value="attribute")
public javax.ws.rs.core.Response deleteGroupAttribute(@QueryParam(value="groupname")
String groupname,
@QueryParam(value="attributename")
String attributeName)
throws GroupNotFoundException,
ApplicationPermissionException,
OperationFailedException
groupname - name of the group.attributeName - name of the attribute to delete.GroupNotFoundExceptionApplicationPermissionExceptionOperationFailedException@GET
@Path(value="user/direct")
public javax.ws.rs.core.Response getDirectMembersOfGroup(@QueryParam(value="groupname")
String groupName,
@QueryParam(value="username")
String username,
@DefaultValue(value="0") @QueryParam(value="start-index")
int startIndex,
@DefaultValue(value="1000") @QueryParam(value="max-results")
int maxResults)
throws MembershipNotFoundException,
GroupNotFoundException
groupName - name of the group.username - if specified it will return a single user if the user is a direct member of the specified group.startIndex - start index if using paged queries, only applicable when username is not provided.maxResults - maximum amount of results to return, only applicable when username is not provided.MembershipNotFoundExceptionGroupNotFoundException@POST
@Path(value="user/direct")
public javax.ws.rs.core.Response addUserAsDirectGroupMember(@QueryParam(value="groupname")
String groupName,
UserEntity user)
throws GroupNotFoundException,
OperationFailedException,
ApplicationPermissionException,
MembershipAlreadyExistsException
groupName - name of the group to which the user will be added.user - the user to add to the group.GroupNotFoundExceptionOperationFailedExceptionApplicationPermissionExceptionMembershipAlreadyExistsException@DELETE
@Path(value="user/direct")
public javax.ws.rs.core.Response removeDirectGroupMembership(@QueryParam(value="groupname")
String groupName,
@QueryParam(value="username")
String username)
throws GroupNotFoundException,
MembershipNotFoundException,
UserNotFoundException,
OperationFailedException,
ApplicationPermissionException
groupName - name of the group from which the user membership will be removed.username - name the user to have their membership removed.GroupNotFoundExceptionMembershipNotFoundExceptionUserNotFoundExceptionOperationFailedExceptionApplicationPermissionException@GET
@Path(value="user/nested")
public javax.ws.rs.core.Response getNestedMembersOfGroup(@QueryParam(value="groupname")
String groupName,
@QueryParam(value="username")
String username,
@DefaultValue(value="0") @QueryParam(value="start-index")
int startIndex,
@DefaultValue(value="1000") @QueryParam(value="max-results")
int maxResults)
throws MembershipNotFoundException,
GroupNotFoundException
groupName - name of the group.username - if specified it will return a single user if the user is a nested member of the specified group.startIndex - start index if using paged queries, only applicable when username is not provided.maxResults - maximum amount of results to return, only applicable when username is not provided.MembershipNotFoundExceptionGroupNotFoundException@GET
@Path(value="parent-group/direct")
public javax.ws.rs.core.Response getDirectParentsOfGroup(@QueryParam(value="groupname")
String groupName,
@QueryParam(value="child-groupname")
String childGroupName,
@DefaultValue(value="0") @QueryParam(value="start-index")
int startIndex,
@DefaultValue(value="1000") @QueryParam(value="max-results")
int maxResults)
throws MembershipNotFoundException
groupName - if child-groupname is specified then the direct parents of this group will be returned. Otherwise this is the direct parent group.childGroupName - if specified this will return a single direct parent group of this group with the name groupname.startIndex - start index if using paged queries, only applicable when child-groupname is not provided.maxResults - maximum amount of results to return, only applicable when child-groupname is not provided.MembershipNotFoundException@POST
@Path(value="parent-group/direct")
public javax.ws.rs.core.Response addDirectParentGroupMembership(@QueryParam(value="groupname")
String groupName,
GroupEntity parentGroup)
throws InvalidMembershipException,
OperationFailedException,
ApplicationPermissionException,
MembershipAlreadyExistsException
groupName - name of the child group.parentGroup - the parent group.InvalidMembershipExceptionOperationFailedExceptionApplicationPermissionExceptionMembershipAlreadyExistsException@GET
@Path(value="parent-group/nested")
public javax.ws.rs.core.Response getNestedParentGroups(@QueryParam(value="groupname")
String groupName,
@QueryParam(value="parent-groupname")
String parentGroupName,
@DefaultValue(value="0") @QueryParam(value="start-index")
int startIndex,
@DefaultValue(value="1000") @QueryParam(value="max-results")
int maxResults)
throws MembershipNotFoundException
groupName - name of the group of which the nested parents will be returned.parentGroupName - if specified then the single nested parent group with this name of the group specified by groupname will be returned.startIndex - start index if using paged queries, only applicable when parent-groupname is not provided.maxResults - maximum amount of results to return, only applicable when parent-groupname is not provided.MembershipNotFoundException@GET
@Path(value="child-group/direct")
public javax.ws.rs.core.Response getDirectChildrenOfGroup(@QueryParam(value="groupname")
String groupName,
@QueryParam(value="child-groupname")
String childGroupName,
@DefaultValue(value="0") @QueryParam(value="start-index")
int startIndex,
@DefaultValue(value="1000") @QueryParam(value="max-results")
int maxResults)
throws MembershipNotFoundException
groupName - Name of the parent group which will have its children fetched.childGroupName - If specified then only the direct child group with this name will be returned.startIndex - start index if using paged queries, only applicable when child-groupname is not provided.maxResults - maximum amount of results to return, only applicable when child-groupname is not provided.MembershipNotFoundException@POST
@Path(value="child-group/direct")
public javax.ws.rs.core.Response addDirectChildGroupMembership(@QueryParam(value="groupname")
String groupName,
GroupEntity childGroup)
throws InvalidMembershipException,
ApplicationPermissionException,
OperationFailedException,
MembershipAlreadyExistsException
groupName - Name of the parent group to which the direct child group will be added.childGroup - The child group.InvalidMembershipExceptionApplicationPermissionExceptionOperationFailedExceptionMembershipAlreadyExistsException@DELETE
@Path(value="child-group/direct")
public javax.ws.rs.core.Response removeDirectChildGroupMembership(@QueryParam(value="groupname")
String groupName,
@QueryParam(value="child-groupname")
String childGroupName)
throws MembershipNotFoundException,
GroupNotFoundException,
ApplicationPermissionException,
OperationFailedException
groupName - Name of the parent group.childGroupName - Name of the child group.MembershipNotFoundExceptionGroupNotFoundExceptionApplicationPermissionExceptionOperationFailedException@GET
@Path(value="child-group/nested")
public javax.ws.rs.core.Response getNestedChildrenOfGroup(@QueryParam(value="groupname")
String groupName,
@QueryParam(value="child-groupname")
String childGroupName,
@DefaultValue(value="0") @QueryParam(value="start-index")
int startIndex,
@DefaultValue(value="1000") @QueryParam(value="max-results")
int maxResults)
throws MembershipNotFoundException
groupName - Name of the parent group which will have its nested children fetched.childGroupName - If provided then only a single nested child group with this name will be fetched from the group specified by groupname.startIndex - start index if using paged queries, only applicable when child-groupname is not provided.maxResults - maximum amount of results to return, only applicable when child-groupname is not provided.MembershipNotFoundException@GET
@Path(value="membership")
@Produces(value="application/xml")
public javax.ws.rs.core.Response getAllMemberships(@Context
javax.ws.rs.core.Request request)
throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionCopyright © 2021 Atlassian. All rights reserved.