org.opennms.acl.repository
Interface AuthorityRepository

All Known Implementing Classes:
AuthorityRepositoryIbatis

public interface AuthorityRepository

Contract to insert/update/read/delete the authorities

Since:
jdk 1.5.0
Author:
Massimiliano Dessì (desmax74@yahoo.it)

Method Summary
 Boolean deleteUserGroups(String username)
          Delete all user's groups
 List<AuthorityDTO> getAuthorities()
           
 List<AuthorityDTO> getAuthorities(Pager pager)
           
 Integer getAuthoritiesNumber()
           
 AuthorityDTO getAuthority(Integer id)
          Retrieve an authority by id
 List<AuthorityDTO> getFreeAuthorities(String username)
           
 List<AuthorityDTO> getFreeAuthoritiesForGroup()
           
 List<AuthorityDTO> getGroupAuthorities(Integer id)
           
 List<Integer> getIdItemsAuthority(Integer id)
           
 List<AuthorityDTO> getUserAuthorities(String username)
           
 Boolean removeAuthority(Integer id)
          Remove an authority by id
 Boolean removeGroupFromAuthorities(Integer id)
           
 Boolean save(AuthorityDTO authority)
          Save an authorityDTO
 Boolean saveAuthorities(Integer id, List<Integer> authorities)
          Save a list of authorities for a given group
 

Method Detail

save

Boolean save(AuthorityDTO authority)
Save an authorityDTO

Parameters:
authority -
Returns:
the result of the operation

getAuthority

AuthorityDTO getAuthority(Integer id)
Retrieve an authority by id

Parameters:
id -
Returns:
authority

removeAuthority

Boolean removeAuthority(Integer id)
Remove an authority by id

Parameters:
id -
Returns:
the result of the operation

getAuthorities

List<AuthorityDTO> getAuthorities(Pager pager)
Parameters:
pager -
Returns:
paginated list of authorities

getAuthorities

List<AuthorityDTO> getAuthorities()
Returns:
list of all authorities

getAuthoritiesNumber

Integer getAuthoritiesNumber()
Returns:
numbers of authorities present in the system

getUserAuthorities

List<AuthorityDTO> getUserAuthorities(String username)
Parameters:
username -
Returns:
the list of user's authorities by username

getFreeAuthorities

List<AuthorityDTO> getFreeAuthorities(String username)
Parameters:
username -
Returns:
the list of authorities that user doesn't have

getFreeAuthoritiesForGroup

List<AuthorityDTO> getFreeAuthoritiesForGroup()
Parameters:
username -
Returns:
the list of authorities that Group doesn't have

saveAuthorities

Boolean saveAuthorities(Integer id,
                        List<Integer> authorities)
Save a list of authorities for a given group

Parameters:
username -
authorities -
Returns:
the result of operation

deleteUserGroups

Boolean deleteUserGroups(String username)
Delete all user's groups

Parameters:
username -
Returns:
the result of the operation

getIdItemsAuthority

List<Integer> getIdItemsAuthority(Integer id)
Parameters:
id -
Returns:

getGroupAuthorities

List<AuthorityDTO> getGroupAuthorities(Integer id)

removeGroupFromAuthorities

Boolean removeGroupFromAuthorities(Integer id)


Copyright © 2009. All Rights Reserved.