added some comments

This commit is contained in:
Sebastian Sdorra
2012-10-03 14:01:00 +02:00
parent ac683ad8a9
commit 328867aae1

View File

@@ -139,9 +139,23 @@ public class ScmRealm extends AuthorizingRealm
this.groupManager = groupManager; this.groupManager = groupManager;
this.repositoryDAO = repositoryDAO; this.repositoryDAO = repositoryDAO;
this.authenticator = authenticator; this.authenticator = authenticator;
// init cache
this.cache = cacheManager.getCache(String.class, AuthorizationInfo.class, this.cache = cacheManager.getCache(String.class, AuthorizationInfo.class,
CACHE_NAME); CACHE_NAME);
// set token class
setAuthenticationTokenClass(ScmAuthenticationToken.class);
// use own custom caching
setCachingEnabled(false);
setAuthenticationCachingEnabled(false);
setAuthorizationCachingEnabled(false);
// set components
setPermissionResolver(new RepositoryPermissionResolver()); setPermissionResolver(new RepositoryPermissionResolver());
// add listeners for caching
userManager.addListener(this); userManager.addListener(this);
repositoryManager.addListener(this); repositoryManager.addListener(this);
} }
@@ -194,20 +208,6 @@ public class ScmRealm extends AuthorizingRealm
} }
} }
/**
* Method description
*
*
* @param token
*
* @return
*/
@Override
public boolean supports(AuthenticationToken token)
{
return token instanceof ScmAuthenticationToken;
}
/** /**
* Method description * Method description
* *