org.jafer.registry.uddi
Class RegistryManager

java.lang.Object
  extended by org.jafer.registry.uddi.RegistryManager
All Implemented Interfaces:
RegistryManager

public class RegistryManager
extends java.lang.Object
implements RegistryManager

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


Field Summary
protected static java.util.logging.Logger logger
          Stores a reference to the Logger
private  org.uddi4j.client.UDDIProxy registryConnection
          Stores a reference to the UDDI4J Proxy manager that communicates with the registry
private  TModelManager tModelManager
          Stores a reference to the TModelManager that loads and initialises all the required TModels
 
Constructor Summary
RegistryManager(java.lang.String inquiryURL, java.lang.String publishURL)
          Constructor for the Registry Manager.
 
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.
private  TModelManager getTModelManager()
          Returns a fully initialised TModel Manager.
 void initialiseRegistry(java.lang.String username, java.lang.String credential)
          This method can be used to initialises the registry with the required support objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tModelManager

private TModelManager tModelManager
Stores a reference to the TModelManager that loads and initialises all the required TModels


registryConnection

private org.uddi4j.client.UDDIProxy registryConnection
Stores a reference to the UDDI4J Proxy manager that communicates with the registry


logger

protected static java.util.logging.Logger logger
Stores a reference to the Logger

Constructor Detail

RegistryManager

public RegistryManager(java.lang.String inquiryURL,
                       java.lang.String publishURL)
                throws RegistryException
Constructor for the Registry Manager. The URLS define the registry to be connected to and that needs to be initialised for use

Parameters:
inquiryURL - The URL to the registry inquiry service
publishURL - The URL to the registry publish service
Throws:
RegistryException
Method Detail

initialiseRegistry

public 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.

Specified by:
initialiseRegistry in interface RegistryManager
Parameters:
username - The username of the user using the registry.
credential - The credential required to authenticate user
Throws:
RegistryException
InvalidAuthorisationDetailsException

getServiceLocator

public 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.

Specified by:
getServiceLocator in interface RegistryManager
Returns:
An instance of the service locator
Throws:
RegistryException
RegistryNotInitialisedException

getServiceManager

public 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.

Specified by:
getServiceManager in interface RegistryManager
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

public 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 class as categories are used by both the service manager and service locator

Specified by:
getCategory in interface RegistryManager
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

getTModelManager

private TModelManager getTModelManager()
                                throws RegistryException,
                                       RegistryNotInitialisedException
Returns a fully initialised TModel Manager. This method expects that all the TModel have already been registered with the Registry else it will throw an exception

Returns:
The TModel manager
Throws:
RegistryException
RegistryNotInitialisedException