org.opennms.acl.service
Class AuthorityServiceImpl

java.lang.Object
  extended by org.opennms.acl.service.AuthorityServiceImpl
All Implemented Interfaces:
AuthorityService, PagerService

@Service(value="authorityService")
public class AuthorityServiceImpl
extends Object
implements AuthorityService

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

Constructor Summary
AuthorityServiceImpl()
           
 
Method Summary
 List<AuthorityDTO> getAuthorities()
           
 List<AuthorityDTO> getAuthorities(Pager pager)
           
 Integer getAuthoritiesNumber()
           
 AuthorityDTO getAuthority(Integer id)
           
 List<AuthorityDTO> getFreeAuthorities(String username)
           
 List<AuthorityDTO> getFreeAuthoritiesForGroup()
           
 List<AuthorityDTO> getGroupAuthorities(Integer id)
           
 List<Integer> getIdItemsAuthority(Integer id)
           
 Integer getTotalItemsNumber()
           
 List<AuthorityDTO> getUserAuthorities(String username)
           
 boolean insertGroupAuthorities(Integer id, List<Integer> authorities)
          Insert a list of authorities assigned to a group
 boolean removeAuthority(Integer id)
           
 boolean save(AuthorityDTO authority)
          store an authority
 void setAuthorityRepository(AuthorityRepository authorityRepository)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthorityServiceImpl

public AuthorityServiceImpl()
Method Detail

getGroupAuthorities

public List<AuthorityDTO> getGroupAuthorities(Integer id)
Specified by:
getGroupAuthorities in interface AuthorityService
Returns:
the list of authorities that Group have

getFreeAuthoritiesForGroup

public List<AuthorityDTO> getFreeAuthoritiesForGroup()
Specified by:
getFreeAuthoritiesForGroup in interface AuthorityService
Returns:
the list of authorities that Group doesn't have

getAuthorities

public List<AuthorityDTO> getAuthorities()
Specified by:
getAuthorities in interface AuthorityService
Returns:
list of all authorities

insertGroupAuthorities

public boolean insertGroupAuthorities(Integer id,
                                      List<Integer> authorities)
Description copied from interface: AuthorityService
Insert a list of authorities assigned to a group

Specified by:
insertGroupAuthorities in interface AuthorityService
Returns:
result of

getFreeAuthorities

public List<AuthorityDTO> getFreeAuthorities(String username)
Specified by:
getFreeAuthorities in interface AuthorityService
Returns:
unallocated authorities

getUserAuthorities

public List<AuthorityDTO> getUserAuthorities(String username)
Specified by:
getUserAuthorities in interface AuthorityService
Returns:
the list of user's authorities

getTotalItemsNumber

public Integer getTotalItemsNumber()
Specified by:
getTotalItemsNumber in interface PagerService

getAuthority

public AuthorityDTO getAuthority(Integer id)
Specified by:
getAuthority in interface AuthorityService
Returns:
authority

getAuthorities

public List<AuthorityDTO> getAuthorities(Pager pager)
Specified by:
getAuthorities in interface AuthorityService
Returns:
paginated list authorities

removeAuthority

public boolean removeAuthority(Integer id)
Specified by:
removeAuthority in interface AuthorityService
Returns:
the result of removal

save

public boolean save(AuthorityDTO authority)
Description copied from interface: AuthorityService
store an authority

Specified by:
save in interface AuthorityService
Returns:
outcome of the store action

getAuthoritiesNumber

public Integer getAuthoritiesNumber()
Specified by:
getAuthoritiesNumber in interface AuthorityService
Returns:
authorities number

getIdItemsAuthority

public List<Integer> getIdItemsAuthority(Integer id)
Specified by:
getIdItemsAuthority in interface AuthorityService
Returns:
list of items id

setAuthorityRepository

public void setAuthorityRepository(AuthorityRepository authorityRepository)


Copyright © 2009. All Rights Reserved.