org.jafer.registry
Interface ServiceManager

All Known Implementing Classes:
ServiceManager

public interface ServiceManager

The service manager is responsible for registering service providers and their services to the registry. As the service manager updates information in the registry it requires a valid username and credential to be supplied.


Method Summary
 Contact createNewContact(java.lang.String name)
          Creates a new service provider contact.
 Contact createNewContact(java.lang.String name, java.lang.String desc, java.lang.String phone, java.lang.String email)
          Creates a new contact object specifying all the contacts details.
 void deleteService(Service service)
          Deletes the specified service from the registry.
 void deleteService(ServiceInfo serviceInfo)
          Deletes the specified service from the registry.
 void deleteService(java.lang.String id)
          Deletes the specified service from the registry.
 void deleteServiceProvider(ServiceProvider provider)
          Deletes the service provider details in the registry.
 void deleteServiceProvider(ServiceProviderInfo providerInfo)
          Deletes the service provider details in the registry.
 void deleteServiceProvider(java.lang.String id)
          Deletes the service provider details in the registry.
 Service registerService(ServiceProvider provider, java.lang.String serviceName)
          This method registers a new service against a service provider.
 Service registerService(ServiceProvider provider, java.lang.String serviceName, Protocol protocol, java.lang.String accessPoint)
          This method registers a new service against a service provider.
 ServiceProvider registerServiceProvider(java.lang.String providerName)
          This method registers a new Service Provider to the registry.
 Service updateService(Service service)
          Updates the specified service in the registry.
 ServiceProvider updateServiceProvider(ServiceProvider provider)
          Updates the service provider details to the registry.
 

Method Detail

createNewContact

Contact createNewContact(java.lang.String name)
                         throws InvalidNameException,
                                InvalidLengthException
Creates a new service provider contact. The name of the contact must always be supplied and can not be a blank string.

Parameters:
name - The new contacts name
Returns:
An instance of a contact
Throws:
InvalidNameException
InvalidLengthException

createNewContact

Contact createNewContact(java.lang.String name,
                         java.lang.String desc,
                         java.lang.String phone,
                         java.lang.String email)
                         throws InvalidNameException,
                                InvalidLengthException
Creates a new contact object specifying all the contacts details. The name of the contact must always be supplied and can not be a blank string. All other details can be empty strings.

Parameters:
name - The contacts name (Can not be blank)
desc - The contacts description
phone - The contacts phone number
email - The contacts email
Throws:
InvalidNameException
InvalidLengthException

registerServiceProvider

ServiceProvider registerServiceProvider(java.lang.String providerName)
                                        throws InvalidNameException,
                                               InvalidAuthorisationDetailsException,
                                               RegistryException
This method registers a new Service Provider to the registry.

Parameters:
providerName - The name of the new service provider
Returns:
The created business entity
Throws:
InvalidNameException
RegistryException
InvalidAuthorisationDetailsException

updateServiceProvider

ServiceProvider updateServiceProvider(ServiceProvider provider)
                                      throws InvalidAuthorisationDetailsException,
                                             RegistryException
Updates the service provider details to the registry. Any service objects obtained from the provider will be invalidated once this call completes.
Note: Be aware that providers and services only represent the details in the registry at a point in time of retrieval. The information contained in this provider will overright any other changes that may have been made to the registry since the provider was obtained.

Parameters:
provider - The service provider to update
Returns:
The updated service provider
Throws:
InvalidAuthorisationDetailsException
RegistryException

deleteServiceProvider

void deleteServiceProvider(ServiceProvider provider)
                           throws InvalidAuthorisationDetailsException,
                                  RegistryException
Deletes the service provider details in the registry. Any attached services will also be deleted when the provider is removed.
Note:Any instances of provider or services will be invalidated by this call and should no longer be used. Updating them seperatly to the registry will cause a synchronisation error to be thrown

Parameters:
provider - The service provider to delete
Throws:
InvalidAuthorisationDetailsException
RegistryException

deleteServiceProvider

void deleteServiceProvider(ServiceProviderInfo providerInfo)
                           throws InvalidAuthorisationDetailsException,
                                  RegistryException
Deletes the service provider details in the registry. Any attached services will also be deleted when the provider is removed.
Note:Any instances of provider or services will be invalidated by this call and should no longer be used. Updating them seperatly to the registry will cause a synchronisation error to be thrown

Parameters:
providerInfo - The service provider to delete
Throws:
InvalidAuthorisationDetailsException
RegistryException

deleteServiceProvider

void deleteServiceProvider(java.lang.String id)
                           throws InvalidAuthorisationDetailsException,
                                  RegistryException
Deletes the service provider details in the registry. Any attached services will also be deleted when the provider is removed.
Note:Any instances of provider or services will be invalidated by this call and should no longer be used. Updating them seperatly to the registry will cause a synchronisation error to be thrown

Parameters:
id - The id of the service provider to delete
Throws:
InvalidAuthorisationDetailsException
RegistryException

registerService

Service registerService(ServiceProvider provider,
                        java.lang.String serviceName,
                        Protocol protocol,
                        java.lang.String accessPoint)
                        throws InvalidAuthorisationDetailsException,
                               RegistryException,
                               InvalidNameException
This method registers a new service against a service provider.

Note: The registered service will not be reflected in the supplied provider. The provider must be refreshed from the registry to see the new service.

Warning: If the provider is not refreshed any update to that provider will cause the service to be deleted

Parameters:
provider - The business entity to register the service agianst
serviceName - The name of the service being registered
protocol - The protocol type for the access point (eg Z3950 or SRW)
accessPoint - The access point for the service. This can not be an empty string
Returns:
The updated business entity object
Throws:
InvalidAuthorisationDetailsException
RegistryException
InvalidNameException

registerService

Service registerService(ServiceProvider provider,
                        java.lang.String serviceName)
                        throws InvalidAuthorisationDetailsException,
                               RegistryException,
                               InvalidNameException
This method registers a new service against a service provider.

Note: The registered service will not be reflected in the supplied provider. The provider must be refreshed from the registry to see the new service.

Warning: If the provider is not refreshed any update to that provider will cause the service to be deleted

Parameters:
provider - The business entity to register the service agianst
serviceName - The name of the service being registered
Returns:
The updated business entity object
Throws:
InvalidAuthorisationDetailsException
RegistryException
InvalidNameException

updateService

Service updateService(Service service)
                      throws InvalidAuthorisationDetailsException,
                             RegistryException
Updates the specified service in the registry.

Note:Any provider instances that contain a reference to this service need to be refreshed to obtain these updates. Subsequent updates of that provider if it was not refreshed would cause the updated changes to be reversed

Parameters:
service - The service to update
Returns:
The updated service
Throws:
InvalidAuthorisationDetailsException
RegistryException

deleteService

void deleteService(Service service)
                   throws InvalidAuthorisationDetailsException,
                          RegistryException
Deletes the specified service from the registry.

Note: Any instances of service providers that contain the deleted service will be invalidated by this call and need to be refreshed. Subsequent updates of that provider if it was not refreshed would cause a synchronisation error to be thrown

Parameters:
service - The service to delete
Throws:
InvalidAuthorisationDetailsException
RegistryException

deleteService

void deleteService(ServiceInfo serviceInfo)
                   throws InvalidAuthorisationDetailsException,
                          RegistryException
Deletes the specified service from the registry.

Note: Any instances of service providers that contain the deleted service will be invalidated by this call and need to be refreshed. Subsequent updates of that provider if it was not refreshed would cause a synchronisation error to be thrown

Parameters:
serviceInfo - The service to delete
Throws:
InvalidAuthorisationDetailsException
RegistryException

deleteService

void deleteService(java.lang.String id)
                   throws InvalidAuthorisationDetailsException,
                          RegistryException
Deletes the specified service from the registry.

Note: Any instances of service providers that contain the deleted service will be invalidated by this call and need to be refreshed. Subsequent updates of that provider if it was not refreshed would cause a synchronisation error to be thrown

Parameters:
id - The id of the service to delete
Throws:
InvalidAuthorisationDetailsException
RegistryException