Class FulcrumAbstractTurbinePermission
- java.lang.Object
-
- org.apache.fulcrum.security.torque.security.TorqueAbstractSecurityEntity
-
- org.apache.fulcrum.security.torque.turbine.FulcrumAbstractTurbinePermission
-
- All Implemented Interfaces:
Serializable
,Permission
,SecurityEntity
,TurbinePermission
,org.apache.torque.om.ObjectModel
,org.apache.torque.om.Persistent
- Direct Known Subclasses:
BaseTorqueTurbinePermission
public abstract class FulcrumAbstractTurbinePermission extends TorqueAbstractSecurityEntity implements TurbinePermission
This abstract class provides the SecurityInterface to the managers.- Version:
- $Id:$
- Author:
- Thomas Vandahl
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description FulcrumAbstractTurbinePermission()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addRole(Role role)
Add a role to this permissionvoid
delete()
Delete this entityString
getDatabaseName()
RoleSet
getRoles()
Get the roles that this permission belongs to<T extends Role>
Set<T>getRolesAsSet()
Get the roles that this permission belongs to as Setprotected List<TorqueTurbineRolePermission>
getTorqueTurbineRolePermissionsJoinTorqueTurbineRole(org.apache.torque.criteria.Criteria criteria, Connection con)
Forward reference to generated code Get a list of association objects, pre-populated with their TorqueTurbineRole objects.void
removeRole(Role role)
Remove a role from this permissionvoid
retrieveAttachedObjects(Connection con)
old contract, lazy is set tofalse
.void
retrieveAttachedObjects(Connection con, Boolean lazy)
Retrieve attached objects such as users, permissions, ...void
setRoles(RoleSet roleSet)
Set the roles that this permission belongs to<T extends Role>
voidsetRolesAsSet(Set<T> roles)
Set the roles that this permission belongs to as Setvoid
update(Connection con)
Update this instance to the database with all dependent objects-
Methods inherited from class org.apache.fulcrum.security.torque.security.TorqueAbstractSecurityEntity
getEntityId, getEntityName, getId, getName, setEntityId, setEntityName, setId, setName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.torque.om.ObjectModel
getPrimaryKey, isModified, isNew, setModified, setNew, setPrimaryKey, setPrimaryKey
-
Methods inherited from interface org.apache.fulcrum.security.entity.SecurityEntity
getId, getName, setId, setName
-
-
-
-
Constructor Detail
-
FulcrumAbstractTurbinePermission
public FulcrumAbstractTurbinePermission()
-
-
Method Detail
-
getTorqueTurbineRolePermissionsJoinTorqueTurbineRole
protected List<TorqueTurbineRolePermission> getTorqueTurbineRolePermissionsJoinTorqueTurbineRole(org.apache.torque.criteria.Criteria criteria, Connection con) throws org.apache.torque.TorqueException
Forward reference to generated code Get a list of association objects, pre-populated with their TorqueTurbineRole objects.- Parameters:
criteria
- Criteria to define the selection of recordscon
- a database connection- Returns:
- a list of Role/Permission relations
- Throws:
org.apache.torque.TorqueException
- if any database error occurs
-
addRole
public void addRole(Role role)
Description copied from interface:TurbinePermission
Add a role to this permission- Specified by:
addRole
in interfaceTurbinePermission
- Parameters:
role
- the role to add- See Also:
TurbinePermission.addRole(org.apache.fulcrum.security.entity.Role)
-
getRoles
public RoleSet getRoles()
Description copied from interface:TurbinePermission
Get the roles that this permission belongs to- Specified by:
getRoles
in interfaceTurbinePermission
- Returns:
- a set of roles
- See Also:
TurbinePermission.getRoles()
-
getRolesAsSet
public <T extends Role> Set<T> getRolesAsSet()
Description copied from interface:TurbinePermission
Get the roles that this permission belongs to as Set- Specified by:
getRolesAsSet
in interfaceTurbinePermission
- Returns:
- a set of roles
- See Also:
TurbinePermission.getRolesAsSet()
-
removeRole
public void removeRole(Role role)
Description copied from interface:TurbinePermission
Remove a role from this permission- Specified by:
removeRole
in interfaceTurbinePermission
- Parameters:
role
- the role to remove- See Also:
TurbinePermission.removeRole(org.apache.fulcrum.security.entity.Role)
-
setRoles
public void setRoles(RoleSet roleSet)
Description copied from interface:TurbinePermission
Set the roles that this permission belongs to- Specified by:
setRoles
in interfaceTurbinePermission
- Parameters:
roleSet
- a set of roles- See Also:
TurbinePermission.setRoles(org.apache.fulcrum.security.util.RoleSet)
-
setRolesAsSet
public <T extends Role> void setRolesAsSet(Set<T> roles)
Description copied from interface:TurbinePermission
Set the roles that this permission belongs to as Set- Specified by:
setRolesAsSet
in interfaceTurbinePermission
- Type Parameters:
T
- Role- Parameters:
roles
- a set of roles- See Also:
TurbinePermission.setRolesAsSet(java.util.Set)
-
getDatabaseName
public String getDatabaseName()
- Returns:
- the database name
-
retrieveAttachedObjects
public void retrieveAttachedObjects(Connection con) throws DataBackendException
Description copied from class:TorqueAbstractSecurityEntity
old contract, lazy is set tofalse
.- Specified by:
retrieveAttachedObjects
in classTorqueAbstractSecurityEntity
- Parameters:
con
- A database connection- Throws:
DataBackendException
- wrapper exception: user information not found exception
-
retrieveAttachedObjects
public void retrieveAttachedObjects(Connection con, Boolean lazy) throws DataBackendException
Description copied from class:TorqueAbstractSecurityEntity
Retrieve attached objects such as users, permissions, ...- Specified by:
retrieveAttachedObjects
in classTorqueAbstractSecurityEntity
- Parameters:
con
- A database connectionlazy
- iftrue
, may load some or all relationships later- Throws:
DataBackendException
-
update
public void update(Connection con) throws org.apache.torque.TorqueException
Description copied from class:TorqueAbstractSecurityEntity
Update this instance to the database with all dependent objects- Specified by:
update
in classTorqueAbstractSecurityEntity
- Parameters:
con
- A database connection- Throws:
org.apache.torque.TorqueException
- database not found exception
-
delete
public void delete() throws org.apache.torque.TorqueException
Description copied from class:TorqueAbstractSecurityEntity
Delete this entity- Specified by:
delete
in classTorqueAbstractSecurityEntity
- Throws:
org.apache.torque.TorqueException
- if any database error occurs if any database operation fails
-
-