com.softwareag.centrasite.appl.framework.managers
Class AbstractManager<T extends RegistryBean>

java.lang.Object
  extended by com.softwareag.centrasite.appl.framework.managers.AbstractManager<T>
All Implemented Interfaces:
Manager<T>
Direct Known Subclasses:
UtilityManagerImpl

public abstract class AbstractManager<T extends RegistryBean>
extends java.lang.Object
implements Manager<T>

Abstract base class for deriving managers.


Constructor Summary
AbstractManager()
           
 
Method Summary
 T create()
          Creates a new bean instance.
 void delete(java.util.Collection<RegistryBean> beans)
          Delete a Collection of beans from the registry.
 void delete(T bean)
          Delete a bean from the registry.
 T insert(T pBean)
          Inserts a bean, which has previously been created using Manager.create(), into the bean pool.
 T read(java.lang.String id)
          Reads from the registry a bean having a given id.
 void update(java.util.Collection<RegistryBean> beans)
          Updates a Collection of beans.
 void update(T pBean)
          Updates the bean in the pool by replacing the existing implementation with this one.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractManager

public AbstractManager()
Method Detail

create

public T create()
                              throws ManagerException
Description copied from interface: Manager
Creates a new bean instance. The bean instance is not yet added to the bean pool. In other words, it is not yet managed by the container. Use Manager.insert(RegistryBean) to add the edited bean to the pool later on.

Specified by:
create in interface Manager<T extends RegistryBean>
Throws:
ManagerException

insert

public T insert(T pBean)
                              throws ManagerException
Description copied from interface: Manager
Inserts a bean, which has previously been created using Manager.create(), into the bean pool. The bean pool will ensure, that the bean is created in the database later on.

Specified by:
insert in interface Manager<T extends RegistryBean>
Parameters:
pBean - The bean, which has been edited. The user must not use the bean later on. Instead, he shall replace it with the copy, that the method returns.
Returns:
A copy of the inserted bean. The user must replace the inserted bean with this copy.
Throws:
ManagerException

update

public void update(T pBean)
            throws ManagerException
Description copied from interface: Manager
Updates the bean in the pool by replacing the existing implementation with this one. This method should be used with some caution: Replacing the bean may possibly drop relations to underlying objects. It is recommended to use this method only for objects, which have no underlying objects.

Specified by:
update in interface Manager<T extends RegistryBean>
Throws:
ManagerException

update

public void update(java.util.Collection<RegistryBean> beans)
            throws ManagerException
Description copied from interface: Manager
Updates a Collection of beans.

Specified by:
update in interface Manager<T extends RegistryBean>
Throws:
ManagerException

read

public T read(java.lang.String id)
                            throws ManagerException
Description copied from interface: Manager
Reads from the registry a bean having a given id.

Specified by:
read in interface Manager<T extends RegistryBean>
Parameters:
id - Registry id.
Throws:
ManagerException

delete

public void delete(T bean)
            throws ManagerException
Description copied from interface: Manager
Delete a bean from the registry.

Specified by:
delete in interface Manager<T extends RegistryBean>
Throws:
ManagerException

delete

public void delete(java.util.Collection<RegistryBean> beans)
            throws ManagerException
Description copied from interface: Manager
Delete a Collection of beans from the registry.

Specified by:
delete in interface Manager<T extends RegistryBean>
Throws:
ManagerException