|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.services.security.torque.PermissionPeerManager
public class PermissionPeerManager
This class capsulates all direct Peer access for the Permission entities. It allows the exchange of the default Turbine supplied TurbinePermissionPeer class against a custom class.
Field Summary |
---|
Fields inherited from interface org.apache.turbine.services.security.torque.PermissionPeerManagerConstants |
---|
PERMISSION_CLASS_KEY, PERMISSION_ID_COLUMN_DEFAULT, PERMISSION_ID_COLUMN_KEY, PERMISSION_ID_PROPERTY_DEFAULT, PERMISSION_ID_PROPERTY_KEY, PERMISSION_NAME_COLUMN_DEFAULT, PERMISSION_NAME_COLUMN_KEY, PERMISSION_NAME_PROPERTY_DEFAULT, PERMISSION_NAME_PROPERTY_KEY, PERMISSION_PEER_CLASS_DEFAULT, PERMISSION_PEER_CLASS_KEY |
Constructor Summary | |
---|---|
PermissionPeerManager()
|
Method Summary | |
---|---|
static org.apache.torque.util.Criteria |
buildCriteria(Permission permission)
Calls buildCriteria(Permission permission) in the configured PermissionPeer. |
static boolean |
checkExists(Permission permission)
Checks if a Permission is defined in the system. |
static void |
doDelete(org.apache.torque.util.Criteria criteria)
Invokes doDelete(Criteria c) on the configured Peer Object |
static void |
doInsert(org.apache.torque.util.Criteria criteria)
Invokes doInsert(Criteria c) on the configured Peer Object |
static List |
doSelect(org.apache.torque.util.Criteria criteria)
Invokes doSelect(Criteria c) on the configured Peer Object |
static void |
doUpdate(org.apache.torque.util.Criteria criteria)
Invokes doUpdate(Criteria c) on the configured Peer Object |
static String |
getColumnName(String name)
Returns the full name of a column. |
static Vector |
getDifference(Vector some,
Vector all)
Pass in two Vector's of Permission Objects. |
static Integer |
getIdAsObj(org.apache.torque.om.Persistent obj)
Invokes getId() on the supplied base object |
static String |
getIdColumn()
Returns the fully qualified name of the Column to use as the Id Column for a permission |
static String |
getNameColumn()
Returns the fully qualified name of the Column to use as the Name Column for a permission |
static Permission |
getNewPermission(org.apache.torque.om.Persistent p)
Returns a new, configured Permission Object with a supplied Persistent object at its core |
static String |
getPermissionName(org.apache.torque.om.Persistent obj)
Invokes getName() on the supplied base object |
static String |
getTableName()
Get the name of this table. |
static void |
init(org.apache.commons.configuration.Configuration conf)
Initializes the PermissionPeerManager, loading the class object for the Peer used to retrieve Permission objects |
static org.apache.torque.om.Persistent |
newPersistentInstance()
Returns a new, empty object for the underlying peer. |
static PermissionSet |
retrieveSet(org.apache.torque.util.Criteria criteria)
Retrieves/assembles a PermissionSet |
static PermissionSet |
retrieveSet(Role role)
Retrieves a set of Permissions associated with a particular Role. |
static void |
setId(org.apache.torque.om.Persistent obj,
int id)
Invokes setId(int n) on the supplied base object |
static void |
setPermissionName(org.apache.torque.om.Persistent obj,
String name)
Invokes setName(String s) on the supplied base object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PermissionPeerManager()
Method Detail |
---|
public static void init(org.apache.commons.configuration.Configuration conf) throws InitializationException
conf
- The configuration object used to configure the Manager
InitializationException
- A problem occured during initializationpublic static String getTableName()
public static String getNameColumn()
public static String getIdColumn()
public static String getColumnName(String name)
name
- The column to fully qualify
public static org.apache.torque.om.Persistent newPersistentInstance()
public static boolean checkExists(Permission permission) throws DataBackendException, Exception
permission
- The Permission to be checked.
true
if given Permission exists in the system.
DataBackendException
- when more than one Permission with
the same name exists.
Exception
- A generic exception.public static PermissionSet retrieveSet(org.apache.torque.util.Criteria criteria) throws Exception
criteria
- The criteria to use.
Exception
- A generic Exception.public static PermissionSet retrieveSet(Role role) throws Exception
role
- The role to query permissions of.
Exception
- A generic Exception.public static final Vector getDifference(Vector some, Vector all)
some
- Vector B in C = (A - B).all
- Vector A in C = (A - B).
public static org.apache.torque.util.Criteria buildCriteria(Permission permission)
permission
- An object which implements
the Permission interface
public static void doUpdate(org.apache.torque.util.Criteria criteria) throws org.apache.torque.TorqueException
criteria
- A Criteria Object
org.apache.torque.TorqueException
- A problem occured.public static void doInsert(org.apache.torque.util.Criteria criteria) throws org.apache.torque.TorqueException
criteria
- A Criteria Object
org.apache.torque.TorqueException
- A problem occured.public static List doSelect(org.apache.torque.util.Criteria criteria) throws org.apache.torque.TorqueException
criteria
- A Criteria Object
org.apache.torque.TorqueException
- A problem occured.public static void doDelete(org.apache.torque.util.Criteria criteria) throws org.apache.torque.TorqueException
criteria
- A Criteria Object
org.apache.torque.TorqueException
- A problem occured.public static void setPermissionName(org.apache.torque.om.Persistent obj, String name)
obj
- The object to use for setting the namename
- The Name to setpublic static String getPermissionName(org.apache.torque.om.Persistent obj)
obj
- The object to use for getting the name
public static void setId(org.apache.torque.om.Persistent obj, int id)
obj
- The object to use for setting the nameid
- The new Idpublic static Integer getIdAsObj(org.apache.torque.om.Persistent obj)
obj
- The object to use for getting the id
public static Permission getNewPermission(org.apache.torque.om.Persistent p)
p
- The persistent object
Exception
- Could not create a new Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |