Class DefaultGroupService
- java.lang.Object
-
- org.apache.archiva.redback.rest.services.v2.DefaultGroupService
-
- All Implemented Interfaces:
GroupService
@Service("v2.groupService#rest") public class DefaultGroupService extends Object implements GroupServiceLDAP implementation of the group service- Since:
- 3.0
- Author:
- Olivier Lamy, Martin Stockhammer
-
-
Constructor Summary
Constructors Constructor Description DefaultGroupService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.ResponseaddGroupMapping(GroupMapping ldapGroupMapping, javax.ws.rs.core.UriInfo uriInfo)javax.ws.rs.core.ResponseaddRolesToGroupMapping(String groupName, String roleId)protected voidcloseContext(DirContext context)protected voidcloseLdapConnection(LdapConnection ldapConnection)List<String>getGroupMapping(String groupName)List<GroupMapping>getGroupMappings()Tries to retrieve the LDAP group for the mapping to add the unique name.org.apache.archiva.components.rest.model.PagedResult<Group>getGroups(String searchTerm, Integer offset, Integer limit, List<String> orderBy, String order)voidremoveGroupMapping(String group)javax.ws.rs.core.ResponseupdateGroupMapping(String groupName, List<String> roles)
-
-
-
Constructor Detail
-
DefaultGroupService
public DefaultGroupService()
-
-
Method Detail
-
getGroups
public org.apache.archiva.components.rest.model.PagedResult<Group> getGroups(String searchTerm, Integer offset, Integer limit, List<String> orderBy, String order) throws RedbackServiceException
- Specified by:
getGroupsin interfaceGroupService- Throws:
RedbackServiceException
-
getGroupMappings
public List<GroupMapping> getGroupMappings() throws RedbackServiceException
Tries to retrieve the LDAP group for the mapping to add the unique name. If the group cannot be found, it will set "" for the uniqueName- Specified by:
getGroupMappingsin interfaceGroupService- Returns:
- the list of mapping
- Throws:
RedbackServiceException- if there was an error retrieving the mapping data
-
addGroupMapping
public javax.ws.rs.core.Response addGroupMapping(GroupMapping ldapGroupMapping, javax.ws.rs.core.UriInfo uriInfo) throws RedbackServiceException
- Specified by:
addGroupMappingin interfaceGroupService- Throws:
RedbackServiceException
-
removeGroupMapping
public void removeGroupMapping(String group) throws RedbackServiceException
- Specified by:
removeGroupMappingin interfaceGroupService- Throws:
RedbackServiceException
-
updateGroupMapping
public javax.ws.rs.core.Response updateGroupMapping(String groupName, List<String> roles) throws RedbackServiceException
- Specified by:
updateGroupMappingin interfaceGroupService- Throws:
RedbackServiceException
-
getGroupMapping
public List<String> getGroupMapping(String groupName) throws RedbackServiceException
- Specified by:
getGroupMappingin interfaceGroupService- Throws:
RedbackServiceException
-
addRolesToGroupMapping
public javax.ws.rs.core.Response addRolesToGroupMapping(String groupName, String roleId) throws RedbackServiceException
- Specified by:
addRolesToGroupMappingin interfaceGroupService- Throws:
RedbackServiceException
-
closeLdapConnection
protected void closeLdapConnection(LdapConnection ldapConnection)
-
closeContext
protected void closeContext(DirContext context)
-
-