org.jafer.registry
Interface RegistryManager

All Known Implementing Classes:
RegistryManager

public interface RegistryManager

This interface defines the registry manager that provides all the objects and managers for accessing a specificly defined registry


Method Summary
 Category getCategory(CategoryType categoryType, java.lang.String value)
          This method returns an instance of a category with the defined value.
 ServiceLocator getServiceLocator()
          This method creates a new service locator that has been enabled for searching the registry for service provides and available services.
 ServiceManager getServiceManager(java.lang.String username, java.lang.String credential)
          This method returns a service manager that has been enbled for creating and maintaining service providers and services.
 void initialiseRegistry(java.lang.String username, java.lang.String credential)
          This method can be used to initialises the registry with the required support objects.
 

Method Detail

initialiseRegistry

void initialiseRegistry(java.lang.String username,
                        java.lang.String credential)
                        throws RegistryException,
                               InvalidAuthorisationDetailsException
This method can be used to initialises the registry with the required support objects. It only needs to be called once per registry set up.
This call is required when a RegistryNotInitialisedException is thrown as by default the registry manager will only attempt to load the support objects.

Parameters:
username - The username of the user using the registry.
credential - The credential required to authenticate user
Throws:
RegistryException
InvalidAuthorisationDetailsException

getServiceLocator

ServiceLocator getServiceLocator()
                                 throws RegistryException,
                                        RegistryNotInitialisedException
This method creates a new service locator that has been enabled for searching the registry for service provides and available services.
This method will check that all the support objects have been initialised correctly before returning the service locator.

Returns:
An instance of the service locator
Throws:
RegistryException
RegistryNotInitialisedException

getServiceManager

ServiceManager getServiceManager(java.lang.String username,
                                 java.lang.String credential)
                                 throws RegistryException,
                                        RegistryNotInitialisedException
This method returns a service manager that has been enbled for creating and maintaining service providers and services. To update information in the registry a valid username and credential must be supplied.
This method will check that all the support objects have been initialised correctly before returning the service manager.

Parameters:
username - The username of the user using the registry.
credential - The credential required to authenticate user
Returns:
An instance of the service manager configured for updates by the specified user
Throws:
RegistryException
RegistryNotInitialisedException

getCategory

Category getCategory(CategoryType categoryType,
                     java.lang.String value)
                     throws RegistryException,
                            RegistryNotInitialisedException
This method returns an instance of a category with the defined value. This method exists on this interface as categories are used by both the service manager and service locator

Parameters:
categoryType - The type of category to create
value - The value assigned to the category
Returns:
An instance of a category with the specified value
Throws:
RegistryException
RegistryNotInitialisedException