Class HibernateModelManagerImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.security.spi.AbstractManager
org.apache.fulcrum.security.model.turbine.AbstractTurbineModelManager
org.apache.fulcrum.security.hibernate.turbine.HibernateModelManagerImpl
- All Implemented Interfaces:
Serializable,org.apache.avalon.framework.activity.Disposable,org.apache.avalon.framework.configuration.Configurable,org.apache.avalon.framework.logger.LogEnabled,org.apache.avalon.framework.service.Serviceable,org.apache.avalon.framework.thread.ThreadSafe,TurbineModelManager,ModelManager
public class HibernateModelManagerImpl extends AbstractTurbineModelManager implements TurbineModelManager
This implementation persists to a database via Hibernate.
- Version:
- $Id: HibernateModelManagerImpl.java 1374014 2012-08-16 19:47:27Z tv $
- Author:
- Eric Pugh
- See Also:
- Serialized Form
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.fulcrum.security.model.turbine.TurbineModelManager
TurbineModelManager.Privilege -
Field Summary
Fields inherited from interface org.apache.fulcrum.security.model.turbine.TurbineModelManager
GLOBAL_GROUP_ATTR_NAME, GLOBAL_GROUP_NAME -
Constructor Summary
Constructors Constructor Description HibernateModelManagerImpl() -
Method Summary
Modifier and Type Method Description PersistenceHelpergetPersistenceHelper()voidgrant(Role role, Permission permission)Grants a Role a Permissionvoidgrant(User user, Group group, Role role)Grant an User a Role in a Group.voidreplace(User user, Role oldRole, Role newRole)voidrevoke(Role role, Permission permission)Revokes a Permission from a Role.voidrevoke(User user, Group group, Role role)Revoke a Role in a Group from an User.Methods inherited from class org.apache.fulcrum.security.model.turbine.AbstractTurbineModelManager
configure, getGlobalGroup, getGlobalGroupName, revokeAll, revokeAll, revokeAll, revokeAllMethods inherited from class org.apache.fulcrum.security.spi.AbstractManager
dispose, getGroupManager, getPermissionManager, getRoleManager, getServiceManager, getUserManager, release, resolve, serviceMethods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.fulcrum.security.model.turbine.TurbineModelManager
getGlobalGroup, getGlobalGroupName, revokeAll, revokeAll, revokeAll, revokeAll
-
Constructor Details
-
HibernateModelManagerImpl
public HibernateModelManagerImpl()
-
-
Method Details
-
grant
public void grant(Role role, Permission permission) throws DataBackendException, UnknownEntityExceptionGrants a Role a Permission- Specified by:
grantin interfaceTurbineModelManager- Parameters:
role- the Role.permission- the Permission.- Throws:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if role or permission is not present.
-
revoke
public void revoke(Role role, Permission permission) throws DataBackendException, UnknownEntityExceptionRevokes a Permission from a Role.- Specified by:
revokein interfaceTurbineModelManager- Parameters:
role- the Role.permission- the Permission.- Throws:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if role or permission is not present.
-
getPersistenceHelper
- Returns:
- Returns the persistenceHelper.
-
grant
public void grant(User user, Group group, Role role) throws DataBackendException, UnknownEntityExceptionGrant an User a Role in a Group.- Specified by:
grantin interfaceTurbineModelManager- Parameters:
user- the user.group- the group.role- the role.- Throws:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if user account, group or role is not present.
-
revoke
public void revoke(User user, Group group, Role role) throws DataBackendException, UnknownEntityExceptionRevoke a Role in a Group from an User.- Specified by:
revokein interfaceTurbineModelManager- Parameters:
user- the user.group- the group.role- the role.- Throws:
DataBackendException- if there was an error accessing the data backend.UnknownEntityException- if user account, group or role is not present.
-
replace
public void replace(User user, Role oldRole, Role newRole) throws DataBackendException, UnknownEntityException- Specified by:
replacein interfaceTurbineModelManager- Throws:
DataBackendExceptionUnknownEntityException
-