Class GroupsResource
java.lang.Object
com.atlassian.crowd.plugin.rest.service.resource.AbstractResource
com.atlassian.crowd.plugin.rest.service.resource.usermanagement.GroupsResource
@Path("group")
@Consumes({"application/xml","application/json"})
@Produces({"application/xml","application/json"})
public class GroupsResource
extends AbstractResource
-
Field Summary
Fields inherited from class com.atlassian.crowd.plugin.rest.service.resource.AbstractResource
request, uriInfo
-
Constructor Summary
ConstructorsConstructorDescriptionGroupsResource
(GroupsController groupsController, MembershipsController membershipsController) -
Method Summary
Modifier and TypeMethodDescriptionjavax.ws.rs.core.Response
addDirectChildGroupMembership
(String groupName, GroupEntity childGroup) javax.ws.rs.core.Response
addDirectParentGroupMembership
(String groupName, GroupEntity parentGroup) javax.ws.rs.core.Response
addGroup
(GroupEntity restGroup) javax.ws.rs.core.Response
addUserAsDirectGroupMember
(String groupName, UserEntity user) javax.ws.rs.core.Response
deleteGroupAttribute
(String groupname, String attributeName) javax.ws.rs.core.Response
getAllMemberships
(javax.ws.rs.core.Request request) javax.ws.rs.core.Response
getDirectChildrenOfGroup
(String groupName, String childGroupName, int startIndex, int maxResults) javax.ws.rs.core.Response
getDirectMembersOfGroup
(String groupName, String username, int startIndex, int maxResults) javax.ws.rs.core.Response
getDirectParentsOfGroup
(String groupName, String childGroupName, int startIndex, int maxResults) javax.ws.rs.core.Response
javax.ws.rs.core.Response
getGroupAttributes
(String groupName) javax.ws.rs.core.Response
getNestedChildrenOfGroup
(String groupName, String childGroupName, int startIndex, int maxResults) javax.ws.rs.core.Response
getNestedMembersOfGroup
(String groupName, String username, int startIndex, int maxResults) javax.ws.rs.core.Response
getNestedParentGroups
(String groupName, String parentGroupName, int startIndex, int maxResults) javax.ws.rs.core.Response
removeDirectChildGroupMembership
(String groupName, String childGroupName) javax.ws.rs.core.Response
removeDirectGroupMembership
(String groupName, String username) javax.ws.rs.core.Response
removeGroup
(String groupname) javax.ws.rs.core.Response
storeGroupAttributes
(String groupname, MultiValuedAttributeEntityList attributes) javax.ws.rs.core.Response
updateGroup
(String groupName, GroupEntity restGroup) Methods inherited from class com.atlassian.crowd.plugin.rest.service.resource.AbstractResource
getApplicationName, getBaseUri, setApplicationName, setRequest, setUriInfo
-
Constructor Details
-
GroupsResource
@Inject public GroupsResource(GroupsController groupsController, MembershipsController membershipsController)
-
-
Method Details
-
getGroup
@GET public javax.ws.rs.core.Response getGroup(@QueryParam("groupname") String groupName) throws GroupNotFoundException - Throws:
GroupNotFoundException
-
addGroup
@POST public javax.ws.rs.core.Response addGroup(GroupEntity restGroup) throws GroupNotFoundException, InvalidGroupException, ApplicationPermissionException, OperationFailedException -
updateGroup
@PUT public javax.ws.rs.core.Response updateGroup(@QueryParam("groupname") String groupName, GroupEntity restGroup) throws GroupNotFoundException, InvalidGroupException, ApplicationPermissionException, OperationFailedException -
removeGroup
@DELETE public javax.ws.rs.core.Response removeGroup(@QueryParam("groupname") String groupname) throws GroupNotFoundException, ApplicationPermissionException, OperationFailedException -
getGroupAttributes
@GET @Path("attribute") public javax.ws.rs.core.Response getGroupAttributes(@QueryParam("groupname") String groupName) throws GroupNotFoundException - Throws:
GroupNotFoundException
-
storeGroupAttributes
@POST @Path("attribute") public javax.ws.rs.core.Response storeGroupAttributes(@QueryParam("groupname") String groupname, MultiValuedAttributeEntityList attributes) throws GroupNotFoundException, ApplicationPermissionException, OperationFailedException -
deleteGroupAttribute
@DELETE @Path("attribute") public javax.ws.rs.core.Response deleteGroupAttribute(@QueryParam("groupname") String groupname, @QueryParam("attributename") String attributeName) throws GroupNotFoundException, ApplicationPermissionException, OperationFailedException -
getDirectMembersOfGroup
@GET @Path("user/direct") public javax.ws.rs.core.Response getDirectMembersOfGroup(@QueryParam("groupname") String groupName, @QueryParam("username") String username, @DefaultValue("0") @QueryParam("start-index") int startIndex, @DefaultValue("1000") @QueryParam("max-results") int maxResults) throws MembershipNotFoundException, GroupNotFoundException -
addUserAsDirectGroupMember
@POST @Path("user/direct") public javax.ws.rs.core.Response addUserAsDirectGroupMember(@QueryParam("groupname") String groupName, UserEntity user) throws GroupNotFoundException, OperationFailedException, ApplicationPermissionException, MembershipAlreadyExistsException -
removeDirectGroupMembership
@DELETE @Path("user/direct") public javax.ws.rs.core.Response removeDirectGroupMembership(@QueryParam("groupname") String groupName, @QueryParam("username") String username) throws GroupNotFoundException, MembershipNotFoundException, UserNotFoundException, OperationFailedException, ApplicationPermissionException -
getNestedMembersOfGroup
@GET @Path("user/nested") public javax.ws.rs.core.Response getNestedMembersOfGroup(@QueryParam("groupname") String groupName, @QueryParam("username") String username, @DefaultValue("0") @QueryParam("start-index") int startIndex, @DefaultValue("1000") @QueryParam("max-results") int maxResults) throws MembershipNotFoundException, GroupNotFoundException -
getDirectParentsOfGroup
@GET @Path("parent-group/direct") public javax.ws.rs.core.Response getDirectParentsOfGroup(@QueryParam("groupname") String groupName, @QueryParam("child-groupname") String childGroupName, @DefaultValue("0") @QueryParam("start-index") int startIndex, @DefaultValue("1000") @QueryParam("max-results") int maxResults) throws MembershipNotFoundException - Throws:
MembershipNotFoundException
-
addDirectParentGroupMembership
@POST @Path("parent-group/direct") public javax.ws.rs.core.Response addDirectParentGroupMembership(@QueryParam("groupname") String groupName, GroupEntity parentGroup) throws InvalidMembershipException, OperationFailedException, ApplicationPermissionException, MembershipAlreadyExistsException -
getNestedParentGroups
@GET @Path("parent-group/nested") public javax.ws.rs.core.Response getNestedParentGroups(@QueryParam("groupname") String groupName, @QueryParam("parent-groupname") String parentGroupName, @DefaultValue("0") @QueryParam("start-index") int startIndex, @DefaultValue("1000") @QueryParam("max-results") int maxResults) throws MembershipNotFoundException - Throws:
MembershipNotFoundException
-
getDirectChildrenOfGroup
@GET @Path("child-group/direct") public javax.ws.rs.core.Response getDirectChildrenOfGroup(@QueryParam("groupname") String groupName, @QueryParam("child-groupname") String childGroupName, @DefaultValue("0") @QueryParam("start-index") int startIndex, @DefaultValue("1000") @QueryParam("max-results") int maxResults) throws MembershipNotFoundException - Throws:
MembershipNotFoundException
-
addDirectChildGroupMembership
@POST @Path("child-group/direct") public javax.ws.rs.core.Response addDirectChildGroupMembership(@QueryParam("groupname") String groupName, GroupEntity childGroup) throws InvalidMembershipException, ApplicationPermissionException, OperationFailedException, MembershipAlreadyExistsException -
removeDirectChildGroupMembership
@DELETE @Path("child-group/direct") public javax.ws.rs.core.Response removeDirectChildGroupMembership(@QueryParam("groupname") String groupName, @QueryParam("child-groupname") String childGroupName) throws MembershipNotFoundException, GroupNotFoundException, ApplicationPermissionException, OperationFailedException -
getNestedChildrenOfGroup
@GET @Path("child-group/nested") public javax.ws.rs.core.Response getNestedChildrenOfGroup(@QueryParam("groupname") String groupName, @QueryParam("child-groupname") String childGroupName, @DefaultValue("0") @QueryParam("start-index") int startIndex, @DefaultValue("1000") @QueryParam("max-results") int maxResults) throws MembershipNotFoundException - Throws:
MembershipNotFoundException
-
getAllMemberships
@GET @Path("membership") @Produces("application/xml") public javax.ws.rs.core.Response getAllMemberships(@Context javax.ws.rs.core.Request request) throws NoSuchAlgorithmException - Throws:
NoSuchAlgorithmException
-