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:
PeerManager
, Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description PeerManagerDefaultImpl()
-
Method Summary
Modifier and Type Method Description <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, service
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
-
Constructor Details
-
PeerManagerDefaultImpl
public PeerManagerDefaultImpl()
-
-
Method Details
-
getPeerInstance
Description copied from interface:PeerManager
Expects the class name of a Torque Peer class, which could be instantiated.AbstractEntityManager.getClassName()
- Specified by:
getPeerInstance
in 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 DataBackendExceptionDescription copied from interface:PeerManager
This method is provided to get more helpful exception messages.- Specified by:
getPeerInstance
in 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
-