@PermitAll public class SecurityManagerServiceBean extends java.lang.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 |
|---|---|
java.lang.String |
getOriginalPrincipalName()
Returns the original principal of the current request.
|
java.lang.String |
getPrincipalName()
Returns the current principal name.
|
java.util.Set<java.lang.String> |
getPrincipalRights()
Returns the set of rights of the current principal.
|
boolean |
hasPrincipalAnyRight(java.util.List<java.lang.String> rights)
Answer whether the current principal is active and has any of the given rights
|
boolean |
hasPrincipalRight(java.lang.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 contextjava.lang.NullPointerException - if any of the arguments is nullpublic java.lang.String getPrincipalName()
SecurityManagerServicegetPrincipalName in interface SecurityManagerServicepublic java.lang.String getOriginalPrincipalName()
SecurityManagerServiceRunAs.getOriginalPrincipalName in interface SecurityManagerServicepublic boolean isPrincipalEnabled()
SecurityManagerServiceisPrincipalEnabled in interface SecurityManagerServicepublic java.util.Set<java.lang.String> getPrincipalRights()
SecurityManagerServicegetPrincipalRights in interface SecurityManagerServicepublic boolean hasPrincipalRight(java.lang.String right)
SecurityManagerServicehasPrincipalRight in interface SecurityManagerServicepublic boolean hasPrincipalAnyRight(java.util.List<java.lang.String> rights)
SecurityManagerServicehasPrincipalAnyRight in interface SecurityManagerServicerights - 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.