it.openutils.hibernate.security.services
Interface SecurityRuleManager
- All Known Implementing Classes:
- SecurityRuleManagerImpl
public interface SecurityRuleManager
- Version:
- $Id: SecurityRuleManager.java 729 2008-03-06 09:26:46Z fcarone $
- Author:
- fcarone
findAll
java.util.List<SecurityRule> findAll()
- Returns:
- All the defined
SecurityRules.
findFiltered
java.util.List<SecurityRule> findFiltered(SecurityRule filter)
- Parameters:
filter - The SecurityRule to use as search filter
- Returns:
- The list of matching
SecurityRules.
load
SecurityRule load(java.lang.Long id)
- Parameters:
id - The id of the SecurityRule to load
- Returns:
- The
SecurityRule with the given id
loadIfAvailable
SecurityRule loadIfAvailable(java.lang.Long id)
- Parameters:
id - The id of the SecurityRule to load
- Returns:
- The
SecurityRule with the given id, or null if it is not found
delete
void delete(SecurityRule securityRule)
- Parameters:
securityRule - The security rule to remove
saveOrUpdate
void saveOrUpdate(SecurityRule securityRule)
- Parameters:
securityRule - The SecurityRule to save or update
save
java.lang.Long save(SecurityRule securityRule)
- Parameters:
securityRule - The SecurityRule to save
- Returns:
- The id of the saved
SecurityRule
update
void update(SecurityRule securityRule)
- Parameters:
securityRule - The SecurityRule to update
getEntityFilterFromRules
org.hibernate.Filter getEntityFilterFromRules(java.lang.String entity,
java.util.List<SecurityRule> rules)
throws java.lang.SecurityException,
java.lang.ClassNotFoundException,
java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.NoSuchFieldException
- Parameters:
entity - The entity to apply rules forrules - The list of rules to apply
- Returns:
- The Hibernate Filter responding to the given criteria
- Throws:
java.lang.SecurityException
java.lang.ClassNotFoundException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.NoSuchFieldException
getRulesForRoles
java.util.List<SecurityRule> getRulesForRoles(java.lang.String entity,
java.util.List<java.lang.String> roles)
- Parameters:
entity - The entity name we want rules forroles - The list of roles
- Returns:
- The list of security rules matching entity - roles
getRulesForRoles
java.util.List<SecurityRule> getRulesForRoles(java.lang.Object entity,
java.util.List<java.lang.String> roles)
- Parameters:
entity - The entity we want rules forroles - The list of roles
- Returns:
- The list of security rules matching entity - roles
Copyright © 2008 Openmind. All Rights Reserved.