Class PeerManagerDefaultImpl
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.fulcrum.security.spi.AbstractManager
org.apache.fulcrum.security.torque.peer.PeerManagerDefaultImpl
- All Implemented Interfaces:
Serializable,org.apache.avalon.framework.activity.Disposable,org.apache.avalon.framework.logger.LogEnabled,org.apache.avalon.framework.service.Serviceable,org.apache.avalon.framework.thread.ThreadSafe,PeerManager
public class PeerManagerDefaultImpl
extends AbstractManager
implements PeerManager, org.apache.avalon.framework.activity.Disposable
Use this class, if you want to replace the default Torque Peer classes with your own.
To use it, the PeerImpl classes (usually generated) must implement
at least the Peer marker interface or some extended interface.
- Version:
- $Id$
- Author:
- Georg Kallidis
- See Also:
-
Field Summary
Fields inherited from class org.apache.fulcrum.security.spi.AbstractManager
managerFields inherited from interface org.apache.fulcrum.security.torque.peer.PeerManager
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<P extends Peer>
PgetPeerInstance(String peerClassName) Expects the class name of a Torque Peer class, which could be instantiated.<P extends Peer>
PgetPeerInstance(String peerClassName, Class<? extends Peer> peerInterface, String className) This method is provided to get more helpful exception messages.Methods 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.avalon.framework.activity.Disposable
dispose
-
Constructor Details
-
PeerManagerDefaultImpl
public PeerManagerDefaultImpl()
-
-
Method Details
-
getPeerInstance
Description copied from interface:PeerManagerExpects the class name of a Torque Peer class, which could be instantiated.AbstractEntityManager.getClassName()- Specified by:
getPeerInstancein interfacePeerManager- Parameters:
peerClassName- the peerClassName- Returns:
- a cached peer class instance
- Throws:
DataBackendException- data backend exception
-
getPeerInstance
public <P extends Peer> P getPeerInstance(String peerClassName, Class<? extends Peer> peerInterface, String className) throws DataBackendException Description copied from interface:PeerManagerThis method is provided to get more helpful exception messages.- Specified by:
getPeerInstancein interfacePeerManager- Parameters:
peerClassName- the peerClassNamepeerInterface- expected class the peers should implementclassName- target class, i.e. the data object class type of the Peer object. The data object for which the peer is provided.- Returns:
- peer instance
- Throws:
DataBackendException- data backend exception
-