|
JSecurity | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jsecurity.authc.SimpleAccount
org.jsecurity.authz.SimpleAuthorizingAccount
public class SimpleAuthorizingAccount
A simple implementation of the AuthorizingAccount interface that is useful
for many realms. This implementation caches an internal collection of roles and permissions
in order to perform authorization checks for a particular user.
See AuthorizingAccount interface for reasons why this class is deprecated.
| Field Summary | |
|---|---|
protected Set<SimpleRole> |
simpleRoles
Deprecated. |
| Constructor Summary | |
|---|---|
SimpleAuthorizingAccount()
Deprecated. |
|
SimpleAuthorizingAccount(Collection principals,
Object credentials,
String realmName)
Deprecated. |
|
SimpleAuthorizingAccount(Collection principals,
Object credentials,
String realmName,
Set<String> roleNames,
Set<Permission> permissions)
Deprecated. |
|
SimpleAuthorizingAccount(Object principal,
Object credentials,
String realmName)
Deprecated. |
|
SimpleAuthorizingAccount(Object principal,
Object credentials,
String realmName,
Set<String> roleNames,
Set<Permission> permissions)
Deprecated. |
|
SimpleAuthorizingAccount(PrincipalCollection principals,
Object credentials)
Deprecated. |
|
SimpleAuthorizingAccount(PrincipalCollection principals,
Object credentials,
String realmName,
Set<String> roleNames,
Set<Permission> permissions)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
add(SimpleRole role)
Deprecated. |
void |
addAll(Collection<SimpleRole> roles)
Deprecated. |
protected void |
addPrivateRole(PrincipalCollection principals,
Collection<Permission> perms)
Deprecated. |
void |
addRole(String roleName)
Deprecated. |
void |
addRoles(Set<String> roleNames)
Deprecated. |
void |
checkPermission(Permission permission)
Deprecated. |
void |
checkPermissions(Collection<Permission> permissions)
Deprecated. |
void |
checkRole(String role)
Deprecated. |
void |
checkRoles(Collection<String> roles)
Deprecated. |
protected SimpleRole |
createPrivateRole(PrincipalCollection principals)
Deprecated. |
Set<Permission> |
getPermissions()
Deprecated. |
protected String |
getPrivateRoleName(PrincipalCollection principals)
Deprecated. |
SimpleRole |
getRole(String name)
Deprecated. |
Set<String> |
getRolenames()
Deprecated. |
Set<SimpleRole> |
getSimpleRoles()
Deprecated. |
boolean |
hasAllRoles(Collection<String> roleIdentifiers)
Deprecated. |
boolean |
hasRole(String roleName)
Deprecated. |
boolean[] |
hasRoles(List<String> roleIdentifiers)
Deprecated. |
boolean[] |
isPermitted(List<Permission> permissions)
Deprecated. |
boolean |
isPermitted(Permission permission)
Deprecated. |
boolean |
isPermittedAll(Collection<Permission> permissions)
Deprecated. |
void |
merge(Account otherAccount)
Deprecated. |
protected void |
merge(SimpleRole role)
Deprecated. |
void |
setSimpleRoles(Set<SimpleRole> simpleRoles)
Deprecated. |
| Methods inherited from class org.jsecurity.authc.SimpleAccount |
|---|
addObjectPermission, addObjectPermissions, addRole, addStringPermission, addStringPermissions, equals, getCredentials, getObjectPermissions, getPrincipals, getRoles, getStringPermissions, hashCode, isCredentialsExpired, isLocked, merge, setCredentials, setCredentialsExpired, setLocked, setObjectPermissions, setPrincipals, setRoles, setStringPermissions, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jsecurity.authc.AuthenticationInfo |
|---|
getCredentials, getPrincipals |
| Methods inherited from interface org.jsecurity.authz.AuthorizationInfo |
|---|
getObjectPermissions, getRoles, getStringPermissions |
| Field Detail |
|---|
protected Set<SimpleRole> simpleRoles
| Constructor Detail |
|---|
public SimpleAuthorizingAccount()
public SimpleAuthorizingAccount(Object principal,
Object credentials,
String realmName)
public SimpleAuthorizingAccount(Collection principals,
Object credentials,
String realmName)
public SimpleAuthorizingAccount(PrincipalCollection principals,
Object credentials)
public SimpleAuthorizingAccount(Object principal,
Object credentials,
String realmName,
Set<String> roleNames,
Set<Permission> permissions)
public SimpleAuthorizingAccount(Collection principals,
Object credentials,
String realmName,
Set<String> roleNames,
Set<Permission> permissions)
public SimpleAuthorizingAccount(PrincipalCollection principals,
Object credentials,
String realmName,
Set<String> roleNames,
Set<Permission> permissions)
| Method Detail |
|---|
public void merge(Account otherAccount)
protected void merge(SimpleRole role)
protected void addPrivateRole(PrincipalCollection principals,
Collection<Permission> perms)
protected String getPrivateRoleName(PrincipalCollection principals)
protected SimpleRole createPrivateRole(PrincipalCollection principals)
public Set<SimpleRole> getSimpleRoles()
public void setSimpleRoles(Set<SimpleRole> simpleRoles)
public SimpleRole getRole(String name)
public Set<Permission> getPermissions()
public Set<String> getRolenames()
public void addRole(String roleName)
addRole in class SimpleAccountpublic void add(SimpleRole role)
public void addRoles(Set<String> roleNames)
public void addAll(Collection<SimpleRole> roles)
public boolean hasRole(String roleName)
hasRole in interface AuthorizingAccountSubject.hasRole(String)public boolean isPermitted(Permission permission)
isPermitted in interface AuthorizingAccountSubject.isPermitted(Permission)public boolean[] hasRoles(List<String> roleIdentifiers)
hasRoles in interface AuthorizingAccountSubject.hasRoles(java.util.List)public boolean hasAllRoles(Collection<String> roleIdentifiers)
hasAllRoles in interface AuthorizingAccountSubject.hasAllRoles(java.util.Collection)public boolean[] isPermitted(List<Permission> permissions)
isPermitted in interface AuthorizingAccountSubject.isPermitted(java.util.List)public boolean isPermittedAll(Collection<Permission> permissions)
isPermittedAll in interface AuthorizingAccountSubject.isPermittedAll(java.util.Collection)
public void checkPermission(Permission permission)
throws AuthorizationException
checkPermission in interface AuthorizingAccountAuthorizationExceptionSubject.checkPermission(Permission)
public void checkPermissions(Collection<Permission> permissions)
throws AuthorizationException
checkPermissions in interface AuthorizingAccountAuthorizationExceptionSubject.checkPermissions(java.util.Collection)public void checkRole(String role)
checkRole in interface AuthorizingAccountSubject.checkRole(String)public void checkRoles(Collection<String> roles)
checkRoles in interface AuthorizingAccountSubject.checkRoles(java.util.Collection)
|
JSecurity | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||