org.ow2.dragon.service.wsdl
Class WSDLManagerImpl

java.lang.Object
  extended by org.ow2.dragon.service.wsdl.WSDLManagerImpl
All Implemented Interfaces:
WSDLManager

public class WSDLManagerImpl
extends java.lang.Object
implements WSDLManager

Author:
ofabre - eBM WebSourcing

Constructor Summary
WSDLManagerImpl()
           
 
Method Summary
 BindingDAO getBindingDAO()
           
 MetadataService getMetadataManager()
           
 ProtocolDAO getProtocolDAO()
           
 ServiceInterfaceDAO getServiceInterfaceDAO()
           
 ServiceSpecificationDAO getServiceSpecificationDAO()
           
 java.util.List<ServiceSpecificationTO> getServSpecsForEndpoint(java.lang.String epId)
          Retrieve the list of service specifications (like WSDL files...) where the given endpoint is described
 java.util.List<ServiceSpecificationTO> getServSpecsForTechServ(java.lang.String techServiceId)
          Retrieve the list of service specifications (like WSDL files...) where the given tech service is described
 TechnicalServiceDAO getTechnicalServiceDAO()
           
 java.io.InputStream getWsdlDesc(java.lang.String servSpecId)
          Retrieve the WSDL description linked to the given service specification as an input stream
 java.lang.String getWsdlDescAsString(java.lang.String servSpecId)
          Retrieve the WSDL description linked to the given service specification as a String
 java.lang.String[] importServiceDefFile(org.w3c.dom.Document domDocument)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile(org.w3c.dom.Document domDocument, java.util.Map<java.lang.String,org.w3c.dom.Document> imports, java.lang.String wsdlFileName)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile(org.w3c.dom.Document domDocument, java.lang.String wsdlFileName)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile(org.w3c.dom.Element domElement)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry
 java.lang.String[] importServiceDefFile(org.xml.sax.InputSource inputSource)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile(org.xml.sax.InputSource wsdlSource, java.util.Map<java.lang.String,org.xml.sax.InputSource> imports, java.lang.String wsdlFileName)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile(org.xml.sax.InputSource inputSource, java.lang.String wsdlFileName)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile(java.lang.String wsdlContent)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile(java.lang.String wsdlContent, java.util.Map<java.lang.String,java.lang.String> imports, java.lang.String wsdlFileName)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile(java.lang.String wsdlContent, java.lang.String wsdlFileName)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile(java.net.URI wsdlURI)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile(java.net.URI wsdlURI, java.util.Map<java.lang.String,java.net.URI> imports, java.lang.String wsdlFileName)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile(java.net.URI wsdlURI, java.lang.String wsdlFileName)
          Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry.
 java.lang.String[] importServiceDefFile2(org.w3c.dom.Document domDocument, java.lang.String wsdlFileName)
           
 java.lang.String registerRelatedDoc(java.lang.String serviceId, java.lang.String mimetype, byte[] docContent)
           
 void setBindingDAO(BindingDAO bindingDAO)
           
 void setEndpointDAO(EndpointDAO endpointDAO)
           
 void setMetadataService(MetadataService metadataService)
           
 void setProtocolDAO(ProtocolDAO protocolDAO)
           
 void setServiceInterfaceDAO(ServiceInterfaceDAO serviceInterfaceDAO)
           
 void setServiceSpecificationDAO(ServiceSpecificationDAO serviceSpecificationDAO)
           
 void setServiceSpecificationUnifiedDAO(GenericUnifiedDAO<ServiceSpecification,java.lang.String> serviceSpecificationUnifiedDAO)
           
 void setTechnicalServiceDAO(TechnicalServiceDAO technicalServiceDAO)
           
 void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)
           
 void setUniversalUnifiedDAO(UniversalUnifiedDAO universalUnifiedDAO)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WSDLManagerImpl

public WSDLManagerImpl()
                throws WSDLServiceException
Throws:
WSDLServiceException
Method Detail

getBindingDAO

public BindingDAO getBindingDAO()

getMetadataManager

public MetadataService getMetadataManager()

getServiceInterfaceDAO

public ServiceInterfaceDAO getServiceInterfaceDAO()

getServiceSpecificationDAO

public ServiceSpecificationDAO getServiceSpecificationDAO()

getTechnicalServiceDAO

public TechnicalServiceDAO getTechnicalServiceDAO()

getServSpecsForEndpoint

public java.util.List<ServiceSpecificationTO> getServSpecsForEndpoint(java.lang.String epId)
                                                               throws WSDLServiceException
Description copied from interface: WSDLManager
Retrieve the list of service specifications (like WSDL files...) where the given endpoint is described

Specified by:
getServSpecsForEndpoint in interface WSDLManager
Parameters:
epId - an endpoint ID
Returns:
the List of ServiceSpecificationTOs (like WSDL files...) where the given EndpointTO is described
Throws:
WSDLServiceException - if no endpoint found for the given id

getServSpecsForTechServ

public java.util.List<ServiceSpecificationTO> getServSpecsForTechServ(java.lang.String techServiceId)
                                                               throws WSDLServiceException
Description copied from interface: WSDLManager
Retrieve the list of service specifications (like WSDL files...) where the given tech service is described

Specified by:
getServSpecsForTechServ in interface WSDLManager
Parameters:
techServiceId - a tech service ID
Returns:
the List of ServiceSpecificationTOs (like WSDL files...) where the given TechnicalServiceTO is described
Throws:
WSDLServiceException - if no tech service found for the given id

importServiceDefFile

public java.lang.String[] importServiceDefFile(org.w3c.dom.Document domDocument)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned. This methods mustn't be used to import WSDL that uses relative imports of other WSDL (see WSDLManager.importServiceDefFile(Document, Map, String))

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
domDocument - the WSDL description as a DOM Document
Returns:
IDs of all registered tech service as result of the WSDL import
Throws:
WSDLServiceException - if the wsdl file can't be read or registered, if the wsdl file signature can't be extracted or if the wsdl file contains inconsistent entities (ex: same interface names but with different operations...)
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

importServiceDefFile

public java.lang.String[] importServiceDefFile(org.w3c.dom.Element domElement)
                                        throws WSDLServiceException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
domElement - the WSDL description as a DOM Element
Returns:
IDs of all registered tech service as result of the WSDL import
Throws:
WSDLServiceException - if an error occurs during description import

importServiceDefFile

public java.lang.String[] importServiceDefFile(org.xml.sax.InputSource inputSource,
                                               java.lang.String wsdlFileName)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned. This methods must be used to import WSDL that uses relative imports of other WSDL.

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
inputSource - the WSDL description content as InputSource
wsdlFileName - the wsdl file name. Can be null
Returns:
IDs of all registered tech service as result of the WSDL import, could be null (if no services registered)
Throws:
WSDLServiceException - if the wsdl file can't be read or registered, if the wsdl file signature can't be extracted or if the wsdl file contains inconsistent entities (ex: same interface names but with different operations...)
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

importServiceDefFile

public java.lang.String[] importServiceDefFile(org.xml.sax.InputSource inputSource)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. This methods mustn't be used to import WSDL that uses relative imports of other WSDL (see WSDLManager.importServiceDefFile(InputSource, Map, String)). It supports absolute imports. If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned.

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
inputSource - the WSDL description content as InputSource
Returns:
IDs of all registered tech service as result of the WSDL import, could be null (if no services registered)
Throws:
WSDLServiceException - if the wsdl file can't be read or registered, if the wsdl file signature can't be extracted or if the wsdl file contains inconsistent entities (ex: same interface names but with different operations...)
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

importServiceDefFile

public java.lang.String[] importServiceDefFile(java.lang.String wsdlContent,
                                               java.lang.String wsdlFileName)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned. This methods must be used to import WSDL that uses relative imports of other WSDL.

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
wsdlContent - the WSDL description content as String
wsdlFileName - the wsdl file name. Can be null
Returns:
IDs of all registered tech service as result of the WSDL import, could be null (if no services registered)
Throws:
WSDLServiceException - if the wsdl file can't be read or registered, if the wsdl file signature can't be extracted or if the wsdl file contains inconsistent entities (ex: same interface names but with different operations...)
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

importServiceDefFile

public java.lang.String[] importServiceDefFile(java.lang.String wsdlContent,
                                               java.util.Map<java.lang.String,java.lang.String> imports,
                                               java.lang.String wsdlFileName)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned. This methods must be used to import WSDL that uses relative imports of other WSDL.

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
wsdlContent - the WSDL description content as String
imports - a Map (key = import location --> value = import content as String) of all imported WSDL. Could be null
wsdlFileName - the wsdl file name. Can be null
Returns:
IDs of all registered tech service as result of the WSDL import, could be null (if no services registered)
Throws:
WSDLServiceException - if the wsdl file can't be read or registered, if the wsdl file signature can't be extracted or if the wsdl file contains inconsistent entities (ex: same interface names but with different operations...)
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

importServiceDefFile

public java.lang.String[] importServiceDefFile(java.net.URI wsdlURI,
                                               java.util.Map<java.lang.String,java.net.URI> imports,
                                               java.lang.String wsdlFileName)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned. This methods must be used to import WSDL that uses relative imports of other WSDL.

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
wsdlURI - URI pointing on a WSDL description
imports - a Map (key = import location --> value = import content as URI) of all imported WSDL. Could be null
wsdlFileName - the wsdl file name. Can be null
Returns:
IDs of all registered tech service as result of the WSDL import
Throws:
WSDLServiceException - if an error occurs during description import
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

importServiceDefFile

public java.lang.String[] importServiceDefFile(java.net.URI wsdlURI,
                                               java.lang.String wsdlFileName)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned. This methods must be used to import WSDL that uses relative imports of other WSDL.

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
wsdlURI - URI pointing on a WSDL description
wsdlFileName - the wsdl file name. Can be null
Returns:
IDs of all registered tech service as result of the WSDL import
Throws:
WSDLServiceException - if an error occurs during description import
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

importServiceDefFile

public java.lang.String[] importServiceDefFile(java.net.URI wsdlURI)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned. This methods must be used to import WSDL that uses relative imports of other WSDL.

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
wsdlURI - URI pointing on a WSDL description
Returns:
IDs of all registered tech service as result of the WSDL import
Throws:
WSDLServiceException - if an error occurs during description import
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

setBindingDAO

public void setBindingDAO(BindingDAO bindingDAO)

setEndpointDAO

public void setEndpointDAO(EndpointDAO endpointDAO)

setMetadataService

public void setMetadataService(MetadataService metadataService)

setServiceInterfaceDAO

public void setServiceInterfaceDAO(ServiceInterfaceDAO serviceInterfaceDAO)

setServiceSpecificationDAO

public void setServiceSpecificationDAO(ServiceSpecificationDAO serviceSpecificationDAO)

setTechnicalServiceDAO

public void setTechnicalServiceDAO(TechnicalServiceDAO technicalServiceDAO)

getProtocolDAO

public ProtocolDAO getProtocolDAO()

setProtocolDAO

public void setProtocolDAO(ProtocolDAO protocolDAO)

setTransfertObjectAssembler

public void setTransfertObjectAssembler(TransfertObjectAssembler transfertObjectAssembler)

getWsdlDescAsString

public java.lang.String getWsdlDescAsString(java.lang.String servSpecId)
                                     throws WSDLServiceException
Description copied from interface: WSDLManager
Retrieve the WSDL description linked to the given service specification as a String

Specified by:
getWsdlDescAsString in interface WSDLManager
Parameters:
servSpecId - a service spec ID
Returns:
the WSDL description linked to the given ServiceSpecificationTO, as an String
Throws:
WSDLServiceException - if no service spec found for the given id, if the wsdl file content can't be retrieved or if the wsdl file content can't be converted as string

getWsdlDesc

public java.io.InputStream getWsdlDesc(java.lang.String servSpecId)
                                throws WSDLServiceException
Description copied from interface: WSDLManager
Retrieve the WSDL description linked to the given service specification as an input stream

Specified by:
getWsdlDesc in interface WSDLManager
Parameters:
servSpecId - a service spec ID
Returns:
the WSDL description linked to the given ServiceSpecificationTO, as an InputStream
Throws:
WSDLServiceException - if no service spec found for the given id or if the wsdl file content can't be retrieved

importServiceDefFile

public java.lang.String[] importServiceDefFile(java.lang.String wsdlContent)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. This methods mustn't be used to import WSDL that uses relative imports of other WSDL (see WSDLManager.importServiceDefFile(String, Map, String)). It supports absolute imports. If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned.

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
wsdlContent - the WSDL description content as String
Returns:
IDs of all registered tech service as result of the WSDL import, could be null (if no services registered)
Throws:
WSDLServiceException - if the wsdl file can't be read or registered, if the wsdl file signature can't be extracted or if the wsdl file contains inconsistent entities (ex: same interface names but with different operations...)
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

registerRelatedDoc

public java.lang.String registerRelatedDoc(java.lang.String serviceId,
                                           java.lang.String mimetype,
                                           byte[] docContent)
                                    throws WSDLServiceException
Throws:
WSDLServiceException

importServiceDefFile

public java.lang.String[] importServiceDefFile(org.w3c.dom.Document domDocument,
                                               java.lang.String wsdlFileName)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned. This methods mustn't be used to import WSDL that uses relative imports of other WSDL (see WSDLManager.importServiceDefFile(Document, Map, String))

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
domDocument - the WSDL description as a DOM Document
wsdlFileName - the wsdl file name. Can be null
Returns:
IDs of all registered tech service as result of the WSDL import
Throws:
WSDLServiceException - if the wsdl file can't be read or registered, if the wsdl file signature can't be extracted or if the wsdl file contains inconsistent entities (ex: same interface names but with different operations...)
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

importServiceDefFile

public java.lang.String[] importServiceDefFile(org.w3c.dom.Document domDocument,
                                               java.util.Map<java.lang.String,org.w3c.dom.Document> imports,
                                               java.lang.String wsdlFileName)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned. This methods must be used to import WSDL that uses relative imports of other WSDL.

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
domDocument - the WSDL description as a DOM Document
imports - a Map (key = import location --> value = import content as Document) of all imported WSDL. Could be null
wsdlFileName - the wsdl file name. Could be null
Returns:
IDs of all registered tech service as result of the WSDL import
Throws:
WSDLServiceException - if the wsdl file can't be read or registered, if the wsdl file signature can't be extracted or if the wsdl file contains inconsistent entities (ex: same interface names but with different operations...)
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

importServiceDefFile2

public java.lang.String[] importServiceDefFile2(org.w3c.dom.Document domDocument,
                                                java.lang.String wsdlFileName)
                                         throws WSDLServiceException,
                                                java.util.concurrent.TimeoutException
Throws:
WSDLServiceException
java.util.concurrent.TimeoutException

importServiceDefFile

public java.lang.String[] importServiceDefFile(org.xml.sax.InputSource wsdlSource,
                                               java.util.Map<java.lang.String,org.xml.sax.InputSource> imports,
                                               java.lang.String wsdlFileName)
                                        throws WSDLServiceException,
                                               java.util.concurrent.TimeoutException
Description copied from interface: WSDLManager
Read a WSDL description and add all described entities (Services, Interfaces, Endpoints etc.) in the registry. This methods mustn't be used to import WSDL that uses relative imports of other WSDL (see WSDLManager.importServiceDefFile(InputSource, Map, String)). If you try to register the same wsdl (canonically equals without comments) twice, it will be skipped and a null array is returned. This methods must be used to import WSDL that uses relative imports of other WSDL.

Specified by:
importServiceDefFile in interface WSDLManager
Parameters:
wsdlSource - the WSDL description content as InputSource
imports - a Map (key = import location --> value = import content as InputSource) of all imported WSDL. Could be null
wsdlFileName - the wsdl file name. Can be null
Returns:
IDs of all registered tech service as result of the WSDL import, could be null (if no services registered)
Throws:
WSDLServiceException - if the wsdl file can't be read or registered, if the wsdl file signature can't be extracted or if the wsdl file contains inconsistent entities (ex: same interface names but with different operations...)
java.util.concurrent.TimeoutException - if a timeout occured during wsdl parsing

setServiceSpecificationUnifiedDAO

public void setServiceSpecificationUnifiedDAO(GenericUnifiedDAO<ServiceSpecification,java.lang.String> serviceSpecificationUnifiedDAO)

setUniversalUnifiedDAO

public void setUniversalUnifiedDAO(UniversalUnifiedDAO universalUnifiedDAO)


Copyright © 2008-2009 eBMWebsourcing. All Rights Reserved.