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

AuthorityServiceImpl class.

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

Constructor Summary
AuthorityServiceImpl()
           
 
Method Summary
 List<AuthorityDTO> getAuthorities()
          getAuthorities
 List<AuthorityDTO> getAuthorities(Pager pager)
          getAuthorities
 Integer getAuthoritiesNumber()
          getAuthoritiesNumber
 AuthorityDTO getAuthority(Integer id)
          getAuthority
 List<AuthorityDTO> getFreeAuthorities(String username)
          getFreeAuthorities
 List<AuthorityDTO> getFreeAuthoritiesForGroup()
          getFreeAuthoritiesForGroup
 List<AuthorityDTO> getGroupAuthorities(Integer id)
          getGroupAuthorities
 List<Integer> getIdItemsAuthority(Integer id)
          getIdItemsAuthority
 Integer getTotalItemsNumber()
          getTotalItemsNumber
 List<AuthorityDTO> getUserAuthorities(String username)
          getUserAuthorities
 boolean insertGroupAuthorities(Integer id, List<Integer> authorities)
          Insert a list of authorities assigned to a group
 boolean removeAuthority(Integer id)
          removeAuthority
 boolean save(AuthorityDTO authority)
          store an authority
 void setAuthorityRepository(AuthorityRepository authorityRepository)
          Setter for the field 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)

getGroupAuthorities

Specified by:
getGroupAuthorities in interface AuthorityService
Parameters:
id - a Integer object.
Returns:
the list of authorities that Group have

getFreeAuthoritiesForGroup

public List<AuthorityDTO> getFreeAuthoritiesForGroup()

getFreeAuthoritiesForGroup

Specified by:
getFreeAuthoritiesForGroup in interface AuthorityService
Returns:
a List object.

getAuthorities

public List<AuthorityDTO> getAuthorities()

getAuthorities

Specified by:
getAuthorities in interface AuthorityService
Returns:
a List object.

insertGroupAuthorities

public boolean insertGroupAuthorities(Integer id,
                                      List<Integer> authorities)
Insert a list of authorities assigned to a group

Specified by:
insertGroupAuthorities in interface AuthorityService
Parameters:
id - a Integer object.
authorities - a List object.
Returns:
result of

getFreeAuthorities

public List<AuthorityDTO> getFreeAuthorities(String username)

getFreeAuthorities

Specified by:
getFreeAuthorities in interface AuthorityService
Parameters:
username - a String object.
Returns:
unallocated authorities

getUserAuthorities

public List<AuthorityDTO> getUserAuthorities(String username)

getUserAuthorities

Specified by:
getUserAuthorities in interface AuthorityService
Parameters:
username - a String object.
Returns:
the list of user's authorities

getTotalItemsNumber

public Integer getTotalItemsNumber()

getTotalItemsNumber

Specified by:
getTotalItemsNumber in interface PagerService
Returns:
a Integer object.

getAuthority

public AuthorityDTO getAuthority(Integer id)

getAuthority

Specified by:
getAuthority in interface AuthorityService
Parameters:
id - a Integer object.
Returns:
authority

getAuthorities

public List<AuthorityDTO> getAuthorities(Pager pager)

getAuthorities

Specified by:
getAuthorities in interface AuthorityService
Parameters:
pager - a Pager object.
Returns:
paginated list authorities

removeAuthority

public boolean removeAuthority(Integer id)

removeAuthority

Specified by:
removeAuthority in interface AuthorityService
Parameters:
id - a Integer object.
Returns:
the result of removal

save

public boolean save(AuthorityDTO authority)
store an authority

Specified by:
save in interface AuthorityService
Parameters:
authority - a AuthorityDTO object.
Returns:
outcome of the store action

getAuthoritiesNumber

public Integer getAuthoritiesNumber()

getAuthoritiesNumber

Specified by:
getAuthoritiesNumber in interface AuthorityService
Returns:
a Integer object.

getIdItemsAuthority

public List<Integer> getIdItemsAuthority(Integer id)

getIdItemsAuthority

Specified by:
getIdItemsAuthority in interface AuthorityService
Parameters:
id - a Integer object.
Returns:
list of items id

setAuthorityRepository

public void setAuthorityRepository(AuthorityRepository authorityRepository)

Setter for the field authorityRepository.

Parameters:
authorityRepository - a AuthorityRepository object.


Copyright © 2011. All Rights Reserved.