Class TorqueAbstractDynamicRole
java.lang.Object
org.apache.fulcrum.security.torque.security.TorqueAbstractSecurityEntity
org.apache.fulcrum.security.torque.dynamic.TorqueAbstractDynamicRole
- All Implemented Interfaces:
Serializable
,Role
,SecurityEntity
,DynamicRole
,org.apache.torque.om.ObjectModel
,org.apache.torque.om.Persistent
- Direct Known Subclasses:
BaseTorqueDynamicRole
public abstract class TorqueAbstractDynamicRole
extends TorqueAbstractSecurityEntity
implements DynamicRole
This abstract class provides the SecurityInterface to the managers.
- Version:
- $Id:$
- Author:
- Thomas Vandahl
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
addPermission
(Permission permission) void
delete()
Delete this entity<T extends Permission>
Set<T> protected List
<TorqueDynamicGroupRole> getTorqueDynamicGroupRolesJoinTorqueDynamicGroup
(org.apache.torque.criteria.Criteria criteria, Connection con) Forward reference to generated code Get a list of association objects, pre-populated with their TorqueDynamicGroup objects.protected List
<TorqueDynamicRolePermission> getTorqueDynamicRolePermissionsJoinTorqueDynamicPermission
(org.apache.torque.criteria.Criteria criteria, Connection con) Forward reference to generated code Get a list of association objects, pre-populated with their TorqueDynamicPermission objects.void
removeGroup
(Group group) void
removePermission
(Permission permission) void
old contract, lazy is set tofalse
.void
retrieveAttachedObjects
(Connection con, Boolean lazy) Retrieve attached objects such as users, permissions, ...void
<T extends Group>
voidsetGroupsAsSet
(Set<T> groups) void
setPermissions
(PermissionSet permissionSet) <T extends Permission>
voidsetPermissionsAsSet
(Set<T> permissions) void
update
(Connection con) Update this instance to the database with all dependent objectsMethods 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.torque.om.Persistent
save, save, save
Methods inherited from interface org.apache.fulcrum.security.entity.SecurityEntity
getId, getName, setId, setName
-
Constructor Details
-
TorqueAbstractDynamicRole
public TorqueAbstractDynamicRole()
-
-
Method Details
-
getTorqueDynamicRolePermissionsJoinTorqueDynamicPermission
protected List<TorqueDynamicRolePermission> getTorqueDynamicRolePermissionsJoinTorqueDynamicPermission(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 TorqueDynamicPermission 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
-
getTorqueDynamicGroupRolesJoinTorqueDynamicGroup
protected List<TorqueDynamicGroupRole> getTorqueDynamicGroupRolesJoinTorqueDynamicGroup(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 TorqueDynamicGroup objects.- Parameters:
criteria
- Criteria to define the selection of recordscon
- a database connection- Returns:
- a list of Group/Role relations
- Throws:
org.apache.torque.TorqueException
- if any database error occurs
-
addGroup
- Specified by:
addGroup
in interfaceDynamicRole
- See Also:
-
addPermission
- Specified by:
addPermission
in interfaceDynamicRole
- See Also:
-
getGroups
- Specified by:
getGroups
in interfaceDynamicRole
- See Also:
-
getGroupsAsSet
- Specified by:
getGroupsAsSet
in interfaceDynamicRole
- See Also:
-
getPermissions
- Specified by:
getPermissions
in interfaceDynamicRole
- See Also:
-
getPermissionsAsSet
- Specified by:
getPermissionsAsSet
in interfaceDynamicRole
- See Also:
-
removeGroup
- Specified by:
removeGroup
in interfaceDynamicRole
- See Also:
-
removePermission
- Specified by:
removePermission
in interfaceDynamicRole
- See Also:
-
setGroups
- Specified by:
setGroups
in interfaceDynamicRole
- See Also:
-
setGroupsAsSet
- Specified by:
setGroupsAsSet
in interfaceDynamicRole
- See Also:
-
setPermissions
- Specified by:
setPermissions
in interfaceDynamicRole
- See Also:
-
setPermissionsAsSet
- Specified by:
setPermissionsAsSet
in interfaceDynamicRole
- See Also:
-
getDatabaseName
- Returns:
- the database name
-
retrieveAttachedObjects
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
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
- See Also:
-
update
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- See Also:
-
delete
public void delete() throws org.apache.torque.TorqueExceptionDescription 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- See Also:
-