org.tynamo.shiro.extension.realm.text
Class ExtendedPropertiesRealm

java.lang.Object
  extended by org.apache.shiro.realm.CachingRealm
      extended by org.apache.shiro.realm.AuthenticatingRealm
          extended by org.apache.shiro.realm.AuthorizingRealm
              extended by org.apache.shiro.realm.SimpleAccountRealm
                  extended by org.apache.shiro.realm.text.TextConfigurationRealm
                      extended by org.apache.shiro.realm.text.PropertiesRealm
                          extended by org.tynamo.shiro.extension.realm.text.ExtendedPropertiesRealm
All Implemented Interfaces:
Runnable, org.apache.shiro.authc.LogoutAware, org.apache.shiro.authz.Authorizer, org.apache.shiro.authz.permission.PermissionResolverAware, org.apache.shiro.authz.permission.RolePermissionResolverAware, org.apache.shiro.cache.CacheManagerAware, org.apache.shiro.realm.Realm, org.apache.shiro.util.Destroyable, org.apache.shiro.util.Initializable, org.apache.shiro.util.Nameable

public class ExtendedPropertiesRealm
extends org.apache.shiro.realm.text.PropertiesRealm

Fixes some bugs with PropertiesRealm


Field Summary
 
Fields inherited from class org.apache.shiro.realm.text.PropertiesRealm
fileLastModified, reloadIntervalSeconds, resourcePath, scheduler, useXmlFormat
 
Fields inherited from class org.apache.shiro.realm.SimpleAccountRealm
roles, users
 
Constructor Summary
ExtendedPropertiesRealm(String resourcePath)
           
 
Method Summary
protected  void afterCacheManagerSet()
          Remove initialization after installing cacheManager.
protected  org.apache.shiro.authc.AuthenticationInfo doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token)
          Eliminates the error generating NullPointerException, when trying to register for non-existent account.
 void setCacheManager(org.apache.shiro.cache.CacheManager authzInfoCacheManager)
           
 
Methods inherited from class org.apache.shiro.realm.text.PropertiesRealm
afterRoleCacheSet, destroy, getName, getRolename, getUsername, isRolename, isUsername, onInit, run, setReloadIntervalSeconds, setResourcePath, setUseXmlFormat, startReloadThread
 
Methods inherited from class org.apache.shiro.realm.text.TextConfigurationRealm
getRoleDefinitions, getUserDefinitions, processDefinitions, processRoleDefinitions, processRoleDefinitions, processUserDefinitions, processUserDefinitions, setRoleDefinitions, setUserDefinitions, toLines, toMap
 
Methods inherited from class org.apache.shiro.realm.SimpleAccountRealm
accountExists, add, add, addAccount, addAccount, addRole, doGetAuthorizationInfo, getRole, getUser, getUsername, getUsername, roleExists, toSet
 
Methods inherited from class org.apache.shiro.realm.AuthorizingRealm
checkPermission, checkPermission, checkPermission, checkPermissions, checkPermissions, checkPermissions, checkRole, checkRole, checkRoles, checkRoles, checkRoles, clearCachedAuthorizationInfo, getAuthorizationCache, getAuthorizationCacheKey, getAuthorizationCacheName, getAuthorizationInfo, getAvailablePrincipal, getPermissionResolver, getRolePermissionResolver, hasAllRoles, hasRole, hasRole, hasRoles, hasRoles, init, isAuthorizationCachingEnabled, isPermitted, isPermitted, isPermitted, isPermitted, isPermitted, isPermittedAll, isPermittedAll, isPermittedAll, onLogout, setAuthorizationCache, setAuthorizationCacheName, setAuthorizationCachingEnabled, setName, setPermissionResolver, setRolePermissionResolver
 
Methods inherited from class org.apache.shiro.realm.AuthenticatingRealm
getAuthenticationInfo, getAuthenticationTokenClass, getCredentialsMatcher, setAuthenticationTokenClass, setCredentialsMatcher, supports
 
Methods inherited from class org.apache.shiro.realm.CachingRealm
getCacheManager, getName, isCachingEnabled, setCachingEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedPropertiesRealm

public ExtendedPropertiesRealm(String resourcePath)
Method Detail

doGetAuthenticationInfo

protected org.apache.shiro.authc.AuthenticationInfo doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken token)
                                                                     throws org.apache.shiro.authc.AuthenticationException
Eliminates the error generating NullPointerException, when trying to register for non-existent account.

Overrides:
doGetAuthenticationInfo in class org.apache.shiro.realm.SimpleAccountRealm
Throws:
org.apache.shiro.authc.AuthenticationException
See Also:
SimpleAccountRealm.doGetAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)

setCacheManager

public void setCacheManager(org.apache.shiro.cache.CacheManager authzInfoCacheManager)
Specified by:
setCacheManager in interface org.apache.shiro.cache.CacheManagerAware
Overrides:
setCacheManager in class org.apache.shiro.realm.CachingRealm

afterCacheManagerSet

protected void afterCacheManagerSet()
Remove initialization after installing cacheManager. This created problems of premature initialization, when not specified the name of realm, respectively, are generated nekkorektnye account with the name of the default realm, which then changed to the name specified in the config.

Overrides:
afterCacheManagerSet in class org.apache.shiro.realm.AuthorizingRealm
See Also:
AuthorizingRealm.afterCacheManagerSet()


Copyright © 2004-2011. All Rights Reserved.