@PermitAll public class SecurityServiceBean extends com.whitestein.lsps.common.SecureAndLoggingService implements SecurityServiceLocal, SecurityServiceRemote
SecurityService interface.| Constructor and Description |
|---|
SecurityServiceBean()
Creates new instance.
|
SecurityServiceBean(SecurityRoleDao securityRoleDao)
Creates new instance.
|
| Modifier and Type | Method and Description |
|---|---|
SecurityRole |
addSecurityRole(SecurityRole securityRole)
Adds new security role into the application.
|
Set<String> |
findRights()
Returns a set of all rights that are used.
|
Collection<SecurityRole> |
findSecurityRoles()
Returns a collection of all security roles that already exist .
|
SecurityRole |
getSecurityRole(String securityRoleName)
Returns a
SecurityRole instance if such security role (identified by given securityRoleName) exists . |
void |
removeSecurityRole(String securityRoleName)
Removes the security role identified by given
securityRoleName from the application. |
SecurityRole |
updateSecurityRole(SecurityRole securityRole)
Updates a security role by its id.
|
public SecurityServiceBean()
public SecurityServiceBean(SecurityRoleDao securityRoleDao)
securityRoleDao - the security role daoNullPointerException - if any of the arguments is null@RightsAllowed(value="SecurityRole:Manage") public SecurityRole addSecurityRole(SecurityRole securityRole) throws SecurityRoleAlreadyExistsException
SecurityServiceaddSecurityRole in interface SecurityServicesecurityRole - security role to be addedSecurityRoleAlreadyExistsException - if the securityRole already exists .@RightsAllowed(value="SecurityRole:Manage") public SecurityRole updateSecurityRole(SecurityRole securityRole) throws SecurityRoleStaleException, SecurityRoleAlreadyExistsException, SecurityRoleNotFoundException
SecurityServiceupdateSecurityRole in interface SecurityServicesecurityRole - security role to be updatedSecurityRoleStaleException - if securityRole object is stale (this applies only if the version is not
null)SecurityRoleAlreadyExistsException - if changing name and a role with the same name already existsSecurityRoleNotFoundException - if the role identified by securityRole does not exist@RightsAllowed(value="SecurityRole:Manage") public void removeSecurityRole(String securityRoleName) throws SecurityRoleNotFoundException
SecurityServicesecurityRoleName from the application.removeSecurityRole in interface SecurityServicesecurityRoleName - The name of the security role to remove. Cannot be blank.SecurityRoleNotFoundException - if the security role identified by its securityRoleName does not exist in
the application.@RightsAllowed(value="SecurityRole:Read") public SecurityRole getSecurityRole(String securityRoleName)
SecurityServiceSecurityRole instance if such security role (identified by given securityRoleName) exists .getSecurityRole in interface SecurityServicesecurityRoleName - The name of the security role to find. Cannot be blank.SecurityRole instance if such security role exists , otherwise null.@RightsAllowed(value="SecurityRole:Read") public Collection<SecurityRole> findSecurityRoles()
SecurityServicefindSecurityRoles in interface SecurityService@RightsAllowed(value="SecurityRole:Manage") public Set<String> findRights()
SecurityServicefindRights in interface SecurityServiceCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.