@PermitAll public class SecurityManagerServiceBean extends Object implements SecurityManagerServiceLocal, SecurityManagerServiceRemote
Constructor and Description |
---|
SecurityManagerServiceBean()
Creates new instance.
|
SecurityManagerServiceBean(PersonServiceLocal personService,
javax.ejb.SessionContext sessionContext)
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
String |
getOriginalPrincipalName()
Returns the original principal of the current request.
|
String |
getPrincipalName()
Returns the current principal name.
|
Set<String> |
getPrincipalRights()
Returns the set of rights of the current principal.
|
boolean |
hasPrincipalAnyRight(List<String> rights)
Answer whether the current principal is active and has any of the given rights
|
boolean |
hasPrincipalRight(String right)
Returns true if the current principal has the given right.
|
boolean |
isPrincipalEnabled()
Returns true if the current principal is enabled.
|
public SecurityManagerServiceBean()
public SecurityManagerServiceBean(PersonServiceLocal personService, javax.ejb.SessionContext sessionContext)
personService
- the person servicesessionContext
- the session contextNullPointerException
- if any of the arguments is nullpublic String getPrincipalName()
SecurityManagerService
getPrincipalName
in interface SecurityManagerService
public String getOriginalPrincipalName()
SecurityManagerService
RunAs
.getOriginalPrincipalName
in interface SecurityManagerService
public boolean isPrincipalEnabled()
SecurityManagerService
isPrincipalEnabled
in interface SecurityManagerService
public Set<String> getPrincipalRights()
SecurityManagerService
getPrincipalRights
in interface SecurityManagerService
public boolean hasPrincipalRight(String right)
SecurityManagerService
hasPrincipalRight
in interface SecurityManagerService
public boolean hasPrincipalAnyRight(List<String> rights)
SecurityManagerService
hasPrincipalAnyRight
in interface SecurityManagerService
rights
- the rights person is required to have (at least one of them) or null if none is requiredCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.