com.softwareag.centrasite.appl.framework.managers
Interface Manager<T extends RegistryBean>

All Known Subinterfaces:
UtilityManager
All Known Implementing Classes:
AbstractManager, UtilityManagerImpl

public interface Manager<T extends RegistryBean>

The manager is the object, which is used by the application manager to access beans. Typically, it provides high level queries, or business methods, that operate on the bean.


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 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> pBean)
          Updates a Collection of beans.
 void update(T pBean)
          Updates the bean in the pool by replacing the existing implementation with this one.
 

Method Detail

create

T create()
                              throws ManagerException
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 insert(RegistryBean) to add the edited bean to the pool later on.

Throws:
ManagerException

insert

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

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

void update(T pBean)
            throws ManagerException
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.

Throws:
ManagerException

update

void update(java.util.Collection<RegistryBean> pBean)
            throws ManagerException
Updates a Collection of beans.

Parameters:
pBean -
Throws:
ManagerException

read

T read(java.lang.String id)
                            throws ManagerException
Reads from the registry a bean having a given id.

Parameters:
id - Registry id.
Throws:
ManagerException

delete

void delete(T bean)
            throws ManagerException
Delete a bean from the registry.

Parameters:
bean -
Throws:
ManagerException

delete

void delete(java.util.Collection<RegistryBean> beans)
            throws ManagerException
Delete a Collection of beans from the registry.

Parameters:
beans -
Throws:
ManagerException