|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.turbine.services.security.torque.RolePeerManager
public class RolePeerManager
This class capsulates all direct Peer access for the Role entities. It allows the exchange of the default Turbine supplied TurbineRolePeer class against a custom class
| Field Summary |
|---|
| Fields inherited from interface org.apache.turbine.services.security.torque.RolePeerManagerConstants |
|---|
ROLE_CLASS_KEY, ROLE_ID_COLUMN_DEFAULT, ROLE_ID_COLUMN_KEY, ROLE_ID_PROPERTY_DEFAULT, ROLE_ID_PROPERTY_KEY, ROLE_NAME_COLUMN_DEFAULT, ROLE_NAME_COLUMN_KEY, ROLE_NAME_PROPERTY_DEFAULT, ROLE_NAME_PROPERTY_KEY, ROLE_PEER_CLASS_DEFAULT, ROLE_PEER_CLASS_KEY |
| Constructor Summary | |
|---|---|
RolePeerManager()
|
|
| Method Summary | |
|---|---|
static org.apache.torque.util.Criteria |
buildCriteria(Role role)
Calls buildCriteria(Role role) in the configured RolePeer. |
static boolean |
checkExists(Role role)
Checks if a Role 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 java.util.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 java.lang.String |
getColumnName(java.lang.String name)
Returns the full name of a column. |
static java.lang.Integer |
getIdAsObj(org.apache.torque.om.Persistent obj)
Invokes getId() on the supplied base object |
static java.lang.String |
getIdColumn()
Returns the fully qualified name of the Column to use as the Id Column for a role |
static java.lang.String |
getNameColumn()
Returns the fully qualified name of the Column to use as the Name Column for a role |
static Role |
getNewRole(org.apache.torque.om.Persistent p)
Returns a new, configured Role Object with a supplied Persistent object at its core |
static java.lang.String |
getRoleName(org.apache.torque.om.Persistent obj)
Invokes getName() on the supplied base object |
static java.lang.String |
getTableName()
Get the name of this table. |
static void |
init(org.apache.commons.configuration.Configuration conf)
Initializes the RolePeerManager, loading the class object for the Peer used to retrieve Role objects |
static org.apache.torque.om.Persistent |
newPersistentInstance()
Returns a new, empty object for the underlying peer. |
static RoleSet |
retrieveSet(org.apache.torque.util.Criteria criteria)
Retrieves/assembles a RoleSet based on the Criteria passed in |
static RoleSet |
retrieveSet(User user,
Group group)
Retrieves a set of Roles that an User was assigned in a Group |
static void |
setId(org.apache.torque.om.Persistent obj,
int id)
Invokes setId(int n) on the supplied base object |
static void |
setRoleName(org.apache.torque.om.Persistent obj,
java.lang.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 RolePeerManager()
| 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 java.lang.String getTableName()
public static java.lang.String getNameColumn()
public static java.lang.String getIdColumn()
public static java.lang.String getColumnName(java.lang.String name)
name - The column to fully qualify
public static org.apache.torque.om.Persistent newPersistentInstance()
public static RoleSet retrieveSet(org.apache.torque.util.Criteria criteria)
throws java.lang.Exception
criteria - A criteria containing a pre-assembled set of criterias
for the RoleSet
java.lang.Exception - A generic exception.
public static RoleSet retrieveSet(User user,
Group group)
throws java.lang.Exception
user - An user objectgroup - A group object
java.lang.Exception - A generic exception.
public static boolean checkExists(Role role)
throws DataBackendException,
java.lang.Exception
role - The Role to be checked.
true if given Role exists in the system.
DataBackendException - when more than one Role with
the same name exists.
java.lang.Exception - A generic exception.public static org.apache.torque.util.Criteria buildCriteria(Role role)
role - An object which implements the Role 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 java.util.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 setRoleName(org.apache.torque.om.Persistent obj,
java.lang.String name)
obj - The object to use for setting the namename - The Name to setpublic static java.lang.String getRoleName(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 java.lang.Integer getIdAsObj(org.apache.torque.om.Persistent obj)
obj - The object to use for getting the id
public static Role getNewRole(org.apache.torque.om.Persistent p)
p - The persistent object
java.lang.Exception - Could not create a new Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||