com.sapportals.wcm.repository.service
Interface IRepositoryServiceFactory


public interface IRepositoryServiceFactory

Defines an interface for a repository service factory. This factory creates instances of repository dependent services. It also provides access to repository independet services.

Copyright (c) SAP Portals Europe GmbH 2001

Version:
$Id:$

Method Summary
 java.util.Collection getAllRepositoryServices(IRepositoryManager repository)
          Get a list of all registered service managers for a given repository manager.
 java.util.Collection getAllRepositoryServices(IResource resource)
          Get all services for a given resource.
 java.util.Collection getAllServices()
          Returns a collection of all defined services
 IRepositoryService getRepositoryService(IRepositoryManager repository, java.lang.String servicetype)
          Returns a specific service manager instance for a given repository manager.
 IRepositoryService getRepositoryService(IResource resource, java.lang.String servicetype)
          Get a specific service for a given resource.
 IRepositoryService getRepositoryService(java.lang.String id)
          Get a service instance by ID.
 com.sapportals.wcm.service.IService getService(java.lang.String serviceID)
          Returns the instance of a service.
 boolean isRepositoryServiceAvailable(IRepositoryManager repository, java.lang.String servicetype)
          Checks if the service is avaible.
 boolean isRepositoryServiceAvailable(IResource resource, java.lang.String servicetype)
          Checks if the service is avaible.
 

Method Detail

getAllRepositoryServices

public java.util.Collection getAllRepositoryServices(IRepositoryManager repository)
                                              throws com.sapportals.wcm.repository.ResourceException
Get a list of all registered service managers for a given repository manager.
Parameters:
repository - TBD: Description of the incoming method parameter
Returns:
Collection of IRepositoryService references.
Throws:
ResourceException - If there was a problem while allocating the managers.

getAllRepositoryServices

public java.util.Collection getAllRepositoryServices(IResource resource)
                                              throws com.sapportals.wcm.repository.ResourceException
Get all services for a given resource.
Parameters:
resource - TBD: Description of the incoming method parameter
Returns:
A Collection of IRepositoryService s.
Throws:
ResourceException - If there was a problem while allocating the managers.

getAllServices

public java.util.Collection getAllServices()
                                    throws com.sapportals.wcm.repository.ResourceException
Returns a collection of all defined services
Returns:
A Collection with IService instances - empty collection if no global services are available
Throws:
ResourceException - Exception raised in failure situation

getRepositoryService

public IRepositoryService getRepositoryService(IRepositoryManager repository,
                                               java.lang.String servicetype)
                                        throws com.sapportals.wcm.repository.ResourceException
Returns a specific service manager instance for a given repository manager.
Parameters:
repository - A repository manager reference
servicetype - A service type constant
Returns:
A IRepositoryService reference.
Throws:
ResourceException - If there was a problem while allocating the manager.

getRepositoryService

public IRepositoryService getRepositoryService(IResource resource,
                                               java.lang.String servicetype)
                                        throws com.sapportals.wcm.repository.ResourceException
Get a specific service for a given resource.
Parameters:
resource - TBD: Description of the incoming method parameter
servicetype - TBD: Description of the incoming method parameter
Returns:
A IRepositoryService .
Throws:
ResourceException - If there was a problem while allocating the manager.

getRepositoryService

public IRepositoryService getRepositoryService(java.lang.String id)
                                        throws com.sapportals.wcm.repository.ResourceException
Get a service instance by ID. The method will return the service instance for a manager this service's type is registered.
Parameters:
id - The service manager ID
Returns:
A IRepositoryService .
Throws:
ResourceException - If there was a problem while allocating the manager.

getService

public com.sapportals.wcm.service.IService getService(java.lang.String serviceID)
                                               throws com.sapportals.wcm.repository.ResourceException
Returns the instance of a service.
Parameters:
serviceID - The service ID as specified in configuration.
Returns:
The service
Throws:
ResourceException - Exception raised in failure situation

isRepositoryServiceAvailable

public boolean isRepositoryServiceAvailable(IRepositoryManager repository,
                                            java.lang.String servicetype)
                                     throws com.sapportals.wcm.repository.ResourceException
Checks if the service is avaible.
Parameters:
repository - TBD: Description of the incoming method parameter
servicetype - TBD: Description of the incoming method parameter
Returns:
repositoryServiceAvailable
Throws:
ResourceException - If there was a problem while allocating the manager.

isRepositoryServiceAvailable

public boolean isRepositoryServiceAvailable(IResource resource,
                                            java.lang.String servicetype)
                                     throws com.sapportals.wcm.repository.ResourceException
Checks if the service is avaible.
Parameters:
resource - TBD: Description of the incoming method parameter
servicetype - TBD: Description of the incoming method parameter
Returns:
repositoryServiceAvailable
Throws:
ResourceException - If there was a problem while allocating the manager.