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 GroupService
LDAP 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.Response
addGroupMapping(GroupMapping ldapGroupMapping, javax.ws.rs.core.UriInfo uriInfo)
javax.ws.rs.core.Response
addRolesToGroupMapping(String groupName, String roleId)
protected void
closeContext(DirContext context)
protected void
closeLdapConnection(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)
void
removeGroupMapping(String group)
javax.ws.rs.core.Response
updateGroupMapping(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:
getGroups
in 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:
getGroupMappings
in 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:
addGroupMapping
in interfaceGroupService
- Throws:
RedbackServiceException
-
removeGroupMapping
public void removeGroupMapping(String group) throws RedbackServiceException
- Specified by:
removeGroupMapping
in interfaceGroupService
- Throws:
RedbackServiceException
-
updateGroupMapping
public javax.ws.rs.core.Response updateGroupMapping(String groupName, List<String> roles) throws RedbackServiceException
- Specified by:
updateGroupMapping
in interfaceGroupService
- Throws:
RedbackServiceException
-
getGroupMapping
public List<String> getGroupMapping(String groupName) throws RedbackServiceException
- Specified by:
getGroupMapping
in interfaceGroupService
- Throws:
RedbackServiceException
-
addRolesToGroupMapping
public javax.ws.rs.core.Response addRolesToGroupMapping(String groupName, String roleId) throws RedbackServiceException
- Specified by:
addRolesToGroupMapping
in interfaceGroupService
- Throws:
RedbackServiceException
-
closeLdapConnection
protected void closeLdapConnection(LdapConnection ldapConnection)
-
closeContext
protected void closeContext(DirContext context)
-
-