|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.crowd.plugin.rest.service.controller.GroupsController
public class GroupsController
Controller for the Group resource.
Constructor Summary | |
---|---|
GroupsController(ApplicationService applicationService,
ApplicationManager applicationManager)
|
Method Summary | |
---|---|
void |
addDirectChildGroup(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String childGroupName)
Adds a direct child group membership. |
void |
addDirectParentGroup(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String parentGroupName)
Adds a direct parent group membership. |
void |
addDirectUser(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String username)
Adds user as direct member of group. |
java.lang.String |
addGroup(java.lang.String applicationName,
GroupEntity group)
Adds a new group. |
void |
deleteDirectChildGroup(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String childGroupName)
Deletes a child group membership. |
void |
deleteDirectUser(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String username)
Removes the user membership. |
GroupEntity |
findGroupByName(java.lang.String applicationName,
java.lang.String name,
boolean expandAttributes,
java.net.URI baseURI)
Returns the group specified by the name. |
GroupEntity |
getDirectChildGroup(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String childGroupName,
java.net.URI baseUri)
Retrieves the group that is a direct child of the specified group. |
GroupEntityList |
getDirectChildGroups(java.lang.String applicationName,
java.lang.String groupName,
boolean expandGroups,
int maxResults,
int startIndex,
java.net.URI baseUri)
Retrieves the groups that are direct members of the specified group. |
GroupEntity |
getDirectParentGroup(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String parentGroupName,
java.net.URI baseUri)
Retrieves the group that is a direct parent of the specified group. |
GroupEntityList |
getDirectParentGroups(java.lang.String applicationName,
java.lang.String groupName,
boolean expandGroups,
int maxResults,
int startIndex,
java.net.URI baseUri)
Retrieves the groups that are direct parents of the specified group. |
UserEntity |
getDirectUser(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String username,
java.net.URI baseUri)
Retrieves the user that is a direct member of the specified group. |
UserEntityList |
getDirectUsers(java.lang.String applicationName,
java.lang.String groupName,
boolean expandUsers,
int maxResults,
int startIndex,
java.net.URI baseUri)
Retrieves the users that are direct members of the specified group. |
GroupEntity |
getNestedChildGroup(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String childGroupName,
java.net.URI baseUri)
Retrieves the group that is a nested child of the specified group. |
GroupEntityList |
getNestedChildGroups(java.lang.String applicationName,
java.lang.String groupName,
boolean expandGroups,
int maxResults,
int startIndex,
java.net.URI baseUri)
Retrieves the groups that are nested children of the specified group. |
GroupEntity |
getNestedParentGroup(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String parentGroupName,
java.net.URI baseUri)
Retrieves the group that is a nested parent of the specified group. |
GroupEntityList |
getNestedParentGroups(java.lang.String applicationName,
java.lang.String groupName,
boolean expandGroups,
int maxResults,
int startIndex,
java.net.URI baseUri)
Retrieves the groups that are nested parents of the specified group. |
UserEntity |
getNestedUser(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String username,
java.net.URI baseUri)
Retrieves the user that is a nested member of the specified group. |
UserEntityList |
getNestedUsers(java.lang.String applicationName,
java.lang.String groupName,
boolean expandUsers,
int maxResults,
int startIndex,
java.net.URI baseUri)
Retrieves the users that are nested members of the specified group. |
void |
removeGroup(java.lang.String applicationName,
java.lang.String groupName)
Removes a group. |
void |
removeGroupAttributes(java.lang.String applicationName,
java.lang.String groupName,
java.lang.String attributeName)
Removes a group's attribute. |
void |
storeGroupAttributes(java.lang.String applicationName,
java.lang.String groupName,
AttributeEntityList attributes)
Stores the attributes for a group. |
GroupEntity |
updateGroup(java.lang.String applicationName,
GroupEntity group,
java.net.URI baseURI)
Updates a group. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GroupsController(ApplicationService applicationService, ApplicationManager applicationManager)
Method Detail |
---|
public GroupEntity findGroupByName(java.lang.String applicationName, java.lang.String name, boolean expandAttributes, java.net.URI baseURI)
applicationName
- name of the applicationname
- name of the group to returnexpandAttributes
- should attributes be expandedbaseURI
- base URI
public java.lang.String addGroup(java.lang.String applicationName, GroupEntity group) throws ApplicationPermissionException, OperationFailedException
applicationName
- name of the applicationgroup
- group to add
ApplicationPermissionException
- if none of the application's underlying directories are allowed to create
a group
OperationFailedException
- if the operation failed for any other reasonpublic GroupEntity updateGroup(java.lang.String applicationName, GroupEntity group, java.net.URI baseURI) throws ApplicationPermissionException, OperationFailedException
applicationName
- name of the applicationgroup
- group to updatebaseURI
- base URI
InvalidGroupException
- if the group already exists in ANY associated directory or the group template does not have the required properties populated.
OperationFailedException
- underlying directory implementation failed to execute the operation.
ApplicationPermissionException
- if none of the application's associated directories are allowed to perform operations of type OperationType.UPDATE_GROUP
.
GroupNotFoundException
- group does not exist in any of the associated directories of the application.public void removeGroup(java.lang.String applicationName, java.lang.String groupName) throws ApplicationPermissionException, OperationFailedException
applicationName
- name of the applicationgroupName
- name of the group
OperationFailedException
- underlying directory implementation failed to execute the operation.
GroupNotFoundException
- if group with given name does not exist in ANY assigned directory.
ApplicationPermissionException
- if none of the application's associated directories are allowed to perform operations of type OperationType.DELETE_GROUP
.public void storeGroupAttributes(java.lang.String applicationName, java.lang.String groupName, AttributeEntityList attributes) throws ApplicationPermissionException, OperationFailedException
applicationName
- name of the applicationgroupName
- name of the groupattributes
- attributes to add/update
GroupNotFoundException
- if the group with the supplied groupname does not exist in ANY assigned directory.
OperationFailedException
- underlying directory implementation failed to execute the operation.
ApplicationPermissionException
- if none of the application's associated directories are allowed to perform operations of type OperationType.UPDATE_GROUP
.public void removeGroupAttributes(java.lang.String applicationName, java.lang.String groupName, java.lang.String attributeName) throws ApplicationPermissionException, OperationFailedException
applicationName
- name of the applicationgroupName
- name of the groupattributeName
- attribute to remove
GroupNotFoundException
- if the group with the supplied groupname does not exist in ANY assigned directory.
OperationFailedException
- underlying directory implementation failed to execute the operation.
ApplicationPermissionException
- if none of the application's associated directories are allowed to perform operations of type OperationType.UPDATE_GROUP
.public UserEntityList getDirectUsers(java.lang.String applicationName, java.lang.String groupName, boolean expandUsers, int maxResults, int startIndex, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupexpandUsers
- should users be expandedmaxResults
- maximum number of results returned. If -1, then all the results are returned.startIndex
- starting index of the resultsbaseUri
- base URI
public void addDirectUser(java.lang.String applicationName, java.lang.String groupName, java.lang.String username) throws ApplicationPermissionException
applicationName
- name of the applicationgroupName
- name of the groupusername
- name of the child group
ApplicationPermissionException
- if none of the application's associated directories are allowed to perform operations of type OperationType.UPDATE_GROUP
.public UserEntity getDirectUser(java.lang.String applicationName, java.lang.String groupName, java.lang.String username, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupusername
- name of the child groupbaseUri
- base URI
public void deleteDirectUser(java.lang.String applicationName, java.lang.String groupName, java.lang.String username) throws ApplicationPermissionException
applicationName
- name of the applicationgroupName
- name of the groupusername
- name of the user
ApplicationPermissionException
- if none of the application's associated directories are allowed to perform operations of type OperationType.UPDATE_GROUP
.public UserEntityList getNestedUsers(java.lang.String applicationName, java.lang.String groupName, boolean expandUsers, int maxResults, int startIndex, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupexpandUsers
- should groups be expandedmaxResults
- maximum number of results returned. If -1, then all the results are returned.startIndex
- starting index of the resultsbaseUri
- base URI
public UserEntity getNestedUser(java.lang.String applicationName, java.lang.String groupName, java.lang.String username, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupusername
- name of the userbaseUri
- base URI
public GroupEntityList getDirectParentGroups(java.lang.String applicationName, java.lang.String groupName, boolean expandGroups, int maxResults, int startIndex, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupexpandGroups
- should groups be expandedmaxResults
- maximum number of results returned. If -1, then all the results are returned.startIndex
- starting index of the resultsbaseUri
- base URI
public void addDirectParentGroup(java.lang.String applicationName, java.lang.String groupName, java.lang.String parentGroupName) throws ApplicationPermissionException
applicationName
- name of the applicationgroupName
- name of the groupparentGroupName
- name of the parent group
ApplicationPermissionException
- if none of the application's associated directories are allowed to perform operations of type OperationType.UPDATE_GROUP
.public GroupEntity getDirectParentGroup(java.lang.String applicationName, java.lang.String groupName, java.lang.String parentGroupName, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupparentGroupName
- name of the child groupbaseUri
- base URI
public GroupEntityList getNestedParentGroups(java.lang.String applicationName, java.lang.String groupName, boolean expandGroups, int maxResults, int startIndex, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupexpandGroups
- should groups be expandedmaxResults
- maximum number of results returned. If -1, then all the results are returned.startIndex
- starting index of the resultsbaseUri
- base URI
public GroupEntity getNestedParentGroup(java.lang.String applicationName, java.lang.String groupName, java.lang.String parentGroupName, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupparentGroupName
- name of the parent groupbaseUri
- base URI
public GroupEntityList getDirectChildGroups(java.lang.String applicationName, java.lang.String groupName, boolean expandGroups, int maxResults, int startIndex, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupexpandGroups
- should groups be expandedmaxResults
- maximum number of results returned. If -1, then all the results are returned.startIndex
- starting index of the resultsbaseUri
- base URI
public void addDirectChildGroup(java.lang.String applicationName, java.lang.String groupName, java.lang.String childGroupName) throws ApplicationPermissionException
applicationName
- name of the applicationgroupName
- name of the groupchildGroupName
- name of the child group
ApplicationPermissionException
- if none of the application's associated directories are allowed to perform operations of type OperationType.UPDATE_GROUP
.public GroupEntity getDirectChildGroup(java.lang.String applicationName, java.lang.String groupName, java.lang.String childGroupName, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupchildGroupName
- name of the child groupbaseUri
- base URI
public void deleteDirectChildGroup(java.lang.String applicationName, java.lang.String groupName, java.lang.String childGroupName) throws ApplicationPermissionException
applicationName
- name of the applicationgroupName
- name of the groupchildGroupName
- name of the child group
ApplicationPermissionException
- if none of the application's associated directories are allowed to perform operations of type OperationType.UPDATE_GROUP
.public GroupEntityList getNestedChildGroups(java.lang.String applicationName, java.lang.String groupName, boolean expandGroups, int maxResults, int startIndex, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupexpandGroups
- should groups be expandedmaxResults
- maximum number of results returned. If -1, then all the results are returned.startIndex
- starting index of the resultsbaseUri
- base URI
public GroupEntity getNestedChildGroup(java.lang.String applicationName, java.lang.String groupName, java.lang.String childGroupName, java.net.URI baseUri)
applicationName
- name of the applicationgroupName
- name of the groupchildGroupName
- name of the child groupbaseUri
- base URI
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |