com.sap.caf.eu.gp.bo.api

Interface IGPBusinessObjectProviderRegistry


public interface IGPBusinessObjectProviderRegistry

Registry for business object providers.

Each implementation is responsible for providing meta data for business object types as well as life cycle methods for business object instances to the framework.

New business object providers must actively register with the business object type registry. Provider type implementations must not keep state as the framework re-uses the same instance for all operations on the server.


Each business object provider has a unique provider name. Implementations must ensure that the provider names are unique across all registered providers. The provider name also becomes part of the name of the object type according to the following pattern:

<provider name>:<object type name>.


Method Summary
 IGPBusinessObjectProvider addProvider(IGPBusinessObjectProvider provider)
          Add a given Provider to this IGPBusinessObjectProviderRegistry.
 Enumeration createProviderEnumeration()
          Create an Enumeration of all Provider of this IGPBusinessObjectProviderRegistry.
 IGPBusinessObjectProvider getProvider(String name)
          Retrieve a Provider of this IGPBusinessObjectProviderRegistry by a given Name.
 int getProviderCount()
          Retrieve the Count of all Provider of this BusinessObjectProviderRegistry.
 IGPBusinessObjectProvider removeProvider(String name)
          Remove a Provider of this IGPBusinessObjectProviderRegistry by a given Name.
 

Method Detail

addProvider

public IGPBusinessObjectProvider addProvider(IGPBusinessObjectProvider provider)
                                      throws GPInvocationException
Add a given Provider to this IGPBusinessObjectProviderRegistry. The Provider is added under its Name, replacing any already existing one. It should be avoided to remove and add an identical provider too many times.

Parameters:
provider - the Provider to add, never null
Returns:
the Provider replaced by the given Provider, null in case none was replaced
Throws:
InvocationException - in case the given Provider is invalid
GPInvocationException

createProviderEnumeration

public Enumeration createProviderEnumeration()
Create an Enumeration of all Provider of this IGPBusinessObjectProviderRegistry. The Enumeration contains IGPBusinessObjectProvider entries by ascending Index.

Returns:
the created Enumeration, never null

getProvider

public IGPBusinessObjectProvider getProvider(String name)
                                      throws GPInvocationException
Retrieve a Provider of this IGPBusinessObjectProviderRegistry by a given Name.

Parameters:
name - the Name of the Provider to retrieve, never null
Returns:
the retrieved Provider, null in case none was found
Throws:
GPInvocationException

getProviderCount

public int getProviderCount()
Retrieve the Count of all Provider of this BusinessObjectProviderRegistry.

Returns:
the retrieved Count

removeProvider

public IGPBusinessObjectProvider removeProvider(String name)
                                         throws GPInvocationException
Remove a Provider of this IGPBusinessObjectProviderRegistry by a given Name.

Parameters:
name - the Name of the Provider to remove, never null
Returns:
the removed Provider, null in case none was removed
Throws:
GPInvocationException


Copyright 2006 SAP AG Complete Copyright Notice