JSecurity

org.jsecurity.authz
Class SimpleAuthorizingAccount

java.lang.Object
  extended by org.jsecurity.authc.SimpleAccount
      extended by org.jsecurity.authz.SimpleAuthorizingAccount
All Implemented Interfaces:
Serializable, Account, AuthenticationInfo, MergableAuthenticationInfo, AuthorizationInfo, AuthorizingAccount

Deprecated.

public class SimpleAuthorizingAccount
extends SimpleAccount
implements AuthorizingAccount

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.

Since:
0.2
Author:
Jeremy Haile, Les Hazlewood
See Also:
Serialized Form

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

simpleRoles

protected Set<SimpleRole> simpleRoles
Deprecated. 
Constructor Detail

SimpleAuthorizingAccount

public SimpleAuthorizingAccount()
Deprecated. 

SimpleAuthorizingAccount

public SimpleAuthorizingAccount(Object principal,
                                Object credentials,
                                String realmName)
Deprecated. 

SimpleAuthorizingAccount

public SimpleAuthorizingAccount(Collection principals,
                                Object credentials,
                                String realmName)
Deprecated. 

SimpleAuthorizingAccount

public SimpleAuthorizingAccount(PrincipalCollection principals,
                                Object credentials)
Deprecated. 

SimpleAuthorizingAccount

public SimpleAuthorizingAccount(Object principal,
                                Object credentials,
                                String realmName,
                                Set<String> roleNames,
                                Set<Permission> permissions)
Deprecated. 

SimpleAuthorizingAccount

public SimpleAuthorizingAccount(Collection principals,
                                Object credentials,
                                String realmName,
                                Set<String> roleNames,
                                Set<Permission> permissions)
Deprecated. 

SimpleAuthorizingAccount

public SimpleAuthorizingAccount(PrincipalCollection principals,
                                Object credentials,
                                String realmName,
                                Set<String> roleNames,
                                Set<Permission> permissions)
Deprecated. 
Method Detail

merge

public void merge(Account otherAccount)
Deprecated. 

merge

protected void merge(SimpleRole role)
Deprecated. 

addPrivateRole

protected void addPrivateRole(PrincipalCollection principals,
                              Collection<Permission> perms)
Deprecated. 

getPrivateRoleName

protected String getPrivateRoleName(PrincipalCollection principals)
Deprecated. 

createPrivateRole

protected SimpleRole createPrivateRole(PrincipalCollection principals)
Deprecated. 

getSimpleRoles

public Set<SimpleRole> getSimpleRoles()
Deprecated. 

setSimpleRoles

public void setSimpleRoles(Set<SimpleRole> simpleRoles)
Deprecated. 

getRole

public SimpleRole getRole(String name)
Deprecated. 

getPermissions

public Set<Permission> getPermissions()
Deprecated. 

getRolenames

public Set<String> getRolenames()
Deprecated. 

addRole

public void addRole(String roleName)
Deprecated. 
Overrides:
addRole in class SimpleAccount

add

public void add(SimpleRole role)
Deprecated. 

addRoles

public void addRoles(Set<String> roleNames)
Deprecated. 

addAll

public void addAll(Collection<SimpleRole> roles)
Deprecated. 

hasRole

public boolean hasRole(String roleName)
Deprecated. 
Specified by:
hasRole in interface AuthorizingAccount
See Also:
Subject.hasRole(String)

isPermitted

public boolean isPermitted(Permission permission)
Deprecated. 
Specified by:
isPermitted in interface AuthorizingAccount
See Also:
Subject.isPermitted(Permission)

hasRoles

public boolean[] hasRoles(List<String> roleIdentifiers)
Deprecated. 
Specified by:
hasRoles in interface AuthorizingAccount
See Also:
Subject.hasRoles(java.util.List)

hasAllRoles

public boolean hasAllRoles(Collection<String> roleIdentifiers)
Deprecated. 
Specified by:
hasAllRoles in interface AuthorizingAccount
See Also:
Subject.hasAllRoles(java.util.Collection)

isPermitted

public boolean[] isPermitted(List<Permission> permissions)
Deprecated. 
Specified by:
isPermitted in interface AuthorizingAccount
See Also:
Subject.isPermitted(java.util.List)

isPermittedAll

public boolean isPermittedAll(Collection<Permission> permissions)
Deprecated. 
Specified by:
isPermittedAll in interface AuthorizingAccount
See Also:
Subject.isPermittedAll(java.util.Collection)

checkPermission

public void checkPermission(Permission permission)
                     throws AuthorizationException
Deprecated. 
Specified by:
checkPermission in interface AuthorizingAccount
Throws:
AuthorizationException
See Also:
Subject.checkPermission(Permission)

checkPermissions

public void checkPermissions(Collection<Permission> permissions)
                      throws AuthorizationException
Deprecated. 
Specified by:
checkPermissions in interface AuthorizingAccount
Throws:
AuthorizationException
See Also:
Subject.checkPermissions(java.util.Collection)

checkRole

public void checkRole(String role)
Deprecated. 
Specified by:
checkRole in interface AuthorizingAccount
See Also:
Subject.checkRole(String)

checkRoles

public void checkRoles(Collection<String> roles)
Deprecated. 
Specified by:
checkRoles in interface AuthorizingAccount
See Also:
Subject.checkRoles(java.util.Collection)

JSecurity

Copyright © 2004-2008 JSecurity.