it.openutils.hibernate.security.filter.utils
Class SecurityRuleUtils

java.lang.Object
  extended by it.openutils.hibernate.security.filter.utils.SecurityRuleUtils

public class SecurityRuleUtils
extends java.lang.Object

Version:
$Id: SecurityRuleUtils.java 729 2008-03-06 09:26:46Z fcarone $
Author:
fcarone

Constructor Summary
SecurityRuleUtils()
           
 
Method Summary
 boolean checkPermissions(java.util.List<SecurityRule> rules, org.acegisecurity.ConfigAttributeDefinition config)
           
 boolean checkRules(java.util.List<SecurityRule> rules, java.lang.Object argument)
           
 java.lang.String getClassName(java.lang.Object object)
           
 java.util.List<java.lang.String> getRolesFromAuthentication(org.acegisecurity.Authentication authentication)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityRuleUtils

public SecurityRuleUtils()
Method Detail

checkPermissions

public boolean checkPermissions(java.util.List<SecurityRule> rules,
                                org.acegisecurity.ConfigAttributeDefinition config)
Parameters:
rules - The list of rules to check
config - The config attribute to check the rules against
Returns:
True if any of the rules matches the given config attribute, false otherwise.

checkRules

public boolean checkRules(java.util.List<SecurityRule> rules,
                          java.lang.Object argument)
Parameters:
rules - The list of rules to check
argument - The object to check the rules against
Returns:
True if any of the rules matches the given object, false otherwise.

getRolesFromAuthentication

public java.util.List<java.lang.String> getRolesFromAuthentication(org.acegisecurity.Authentication authentication)
Parameters:
authentication - The authentication method
Returns:
The collection of roles contained in the authentication

getClassName

public java.lang.String getClassName(java.lang.Object object)
Parameters:
object - The object to get the name from
Returns:
The object name


Copyright © 2008 Openmind. All Rights Reserved.