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
Version:
$Id: $
Author:
Massimiliano Dessì (desmax74@yahoo.it)

Method Summary
 Boolean deleteUserGroups(String username)
          Delete all user's groups
 List<AuthorityDTO> getAuthorities()
          getAuthorities
 List<AuthorityDTO> getAuthorities(Pager pager)
          getAuthorities
 Integer getAuthoritiesNumber()
          getAuthoritiesNumber
 AuthorityDTO getAuthority(Integer id)
          Retrieve an authority by id
 List<AuthorityDTO> getFreeAuthorities(String username)
          getFreeAuthorities
 List<AuthorityDTO> getFreeAuthoritiesForGroup()
          getFreeAuthoritiesForGroup
 List<AuthorityDTO> getGroupAuthorities(Integer id)
          getGroupAuthorities
 List<Integer> getIdItemsAuthority(Integer id)
          getIdItemsAuthority
 List<AuthorityDTO> getUserAuthorities(String username)
          getUserAuthorities
 Boolean removeAuthority(Integer id)
          Remove an authority by id
 Boolean removeGroupFromAuthorities(Integer id)
          removeGroupFromAuthorities
 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 - a AuthorityDTO object.
Returns:
the result of the operation

getAuthority

AuthorityDTO getAuthority(Integer id)
Retrieve an authority by id

Parameters:
id - a Integer object.
Returns:
authority

removeAuthority

Boolean removeAuthority(Integer id)
Remove an authority by id

Parameters:
id - a Integer object.
Returns:
the result of the operation

getAuthorities

List<AuthorityDTO> getAuthorities(Pager pager)

getAuthorities

Parameters:
pager - a Pager object.
Returns:
paginated list of authorities

getAuthorities

List<AuthorityDTO> getAuthorities()

getAuthorities

Returns:
list of all authorities

getAuthoritiesNumber

Integer getAuthoritiesNumber()

getAuthoritiesNumber

Returns:
numbers of authorities present in the system

getUserAuthorities

List<AuthorityDTO> getUserAuthorities(String username)

getUserAuthorities

Parameters:
username - a String object.
Returns:
the list of user's authorities by username

getFreeAuthorities

List<AuthorityDTO> getFreeAuthorities(String username)

getFreeAuthorities

Parameters:
username - a String object.
Returns:
the list of authorities that user doesn't have

getFreeAuthoritiesForGroup

List<AuthorityDTO> getFreeAuthoritiesForGroup()

getFreeAuthoritiesForGroup

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:
authorities - a List object.
id - a Integer object.
Returns:
the result of operation

deleteUserGroups

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

Parameters:
username - a String object.
Returns:
the result of the operation

getIdItemsAuthority

List<Integer> getIdItemsAuthority(Integer id)

getIdItemsAuthority

Parameters:
id - a Integer object.
Returns:
a List object.

getGroupAuthorities

List<AuthorityDTO> getGroupAuthorities(Integer id)

getGroupAuthorities

Parameters:
id - a Integer object.
Returns:
a List object.

removeGroupFromAuthorities

Boolean removeGroupFromAuthorities(Integer id)

removeGroupFromAuthorities

Parameters:
id - a Integer object.
Returns:
a Boolean object.


Copyright © 2011. All Rights Reserved.