Class AuthorityServiceImpl
java.lang.Object
ru.cg.webbpm.modules.security.api.impl.service.AuthorityServiceImpl
- All Implemented Interfaces:
AuthorityService
- Author:
- Tim Urmancheev
-
Constructor Summary
ConstructorsConstructorDescriptionAuthorityServiceImpl
(AuthorityDao authorityDao, RoleAuthorityDao roleAuthorityDao) Authority service constructor - creates new authority service. -
Method Summary
Modifier and TypeMethodDescriptionInserts authorities into database.void
delete
(Collection<String> authorityIds) Removes authorities by authority ids.Gets authority by authority id.get
(LoadOptions options) Gets authorities according to load options.getRoleAuthorities
(String authorityId, LoadOptions options) Gets role authority links by authority id according to load options.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ru.cg.webbpm.modules.security.api.service.AuthorityService
create, delete
-
Constructor Details
-
AuthorityServiceImpl
@Autowired public AuthorityServiceImpl(AuthorityDao authorityDao, RoleAuthorityDao roleAuthorityDao) Authority service constructor - creates new authority service.- Parameters:
authorityDao
- authority data access object. Instance ofAuthorityDao
type.roleAuthorityDao
- link user role authority data access object. Instance ofRoleAuthorityDao
type.
-
-
Method Details
-
get
Gets authority by authority id.- Specified by:
get
in interfaceAuthorityService
- Parameters:
authorityId
- id of authority to receive. Instance ofString
type.- Returns:
- requested authority or null if does not exist. Instance of
Authority
type. - See Also:
-
get
Gets authorities according to load options.- Specified by:
get
in interfaceAuthorityService
- Parameters:
options
- load options properties. Instance ofLoadOptions
type.- Returns:
- list of authorities. Instance of
List
type. - See Also:
-
create
Inserts authorities into database.- Specified by:
create
in interfaceAuthorityService
- Parameters:
authorities
- authorities to add. Instance ofList
type.- Returns:
- list of authority ids. Instance of
List
type. - Throws:
org.springframework.dao.DataAccessException
- if any of authority names already exists.- See Also:
-
delete
Removes authorities by authority ids.- Specified by:
delete
in interfaceAuthorityService
- Parameters:
authorityIds
- ids of authorities to remove. Instance ofCollection
type.- Throws:
org.springframework.dao.DataAccessException
- if any of authorities is used in roles.- See Also:
-
getRoleAuthorities
Gets role authority links by authority id according to load options.- Specified by:
getRoleAuthorities
in interfaceAuthorityService
- Parameters:
authorityId
- authority id of links to receive. Instance ofString
type.options
- indicates load options properties. Instance ofLoadOptions
type.- Returns:
- list of role authority links. Instance of
List
type. - See Also:
-