uk.ac.ucl.sse.omii.bpel.abr.generation
Class PddGenerator

java.lang.Object
  extended by uk.ac.ucl.sse.omii.bpel.abr.generation.PddGenerator

public class PddGenerator
extends java.lang.Object

Responsible for generating PDD (ActiveBPEL deployment descriptor) for any given valid BPELModuleArtifact. TODO when workflow analyzer is implemented to recognise different types of workflows think about refactoring this so that this becomes base class and can use strategy pattern in order decide which concrete implementation ot use for generating PDD

Author:
Bruno Wassermann, written Aug 22, 2006

Constructor Summary
PddGenerator(java.lang.String host, int httpPort, org.eclipse.wst.server.core.IModuleArtifact moduleArtifact)
           
 
Method Summary
 DocumentRoot generatePDD()
          Generates PDD given an IModuleArtifact.
 DocumentRoot getDocRoot()
          ONLY FOR TESTING PURPOSES!
 java.lang.String getHost()
          ONLY FOR TESTING PURPOSES!
 int getHttpPort()
          ONLY FOR TESTING PURPOSES!
 org.eclipse.emf.ecore.util.ExtendedMetaData getMetaData()
          ONLY FOR TESTING PURPOSES!
 org.eclipse.emf.common.util.EList getScopePartnerLinks(org.eclipse.emf.ecore.EObject process)
          Return an EList containing all partnerLink elements defined on Scopes in this process.
 boolean hasWsdlService(PartnerLink bpelPartnerLink)
          Returns true if any of the imported (in BPEL process) WSDLs corresponding to this partnerLinkType define a wsdl:service element that is associated with the partnerLinkType, false otherwise.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PddGenerator

public PddGenerator(java.lang.String host,
                    int httpPort,
                    org.eclipse.wst.server.core.IModuleArtifact moduleArtifact)
Parameters:
host - String representing host to be deployed to
httpPort - int ActiveBPEL engine port number
moduleArtifact - IModuleArtifact that is expected to be non-null and contain a valid bpel file
Method Detail

generatePDD

public DocumentRoot generatePDD()
Generates PDD given an IModuleArtifact.

Parameters:
moduleArtifact - IModuleArtifact
Returns:
DocumentRoot containing model instance with deployment descriptor for corresponding BPEL process or null, if moduleArtifact or BPEL file is not valid

This method checks whether the IModuleArtifact is in fact a BPELModuleArtifact that contains a corresponding BPEL file. Without these requirements met, it is not possible to generate correct PDD and the method will therefore return null


hasWsdlService

public boolean hasWsdlService(PartnerLink bpelPartnerLink)
Returns true if any of the imported (in BPEL process) WSDLs corresponding to this partnerLinkType define a wsdl:service element that is associated with the partnerLinkType, false otherwise.

ONLY PUBLIC FOR TESTING PURPOSES! TODO not sure that we actually need this method. can just use findWsdlService and check whether null or not


getDocRoot

public DocumentRoot getDocRoot()
ONLY FOR TESTING PURPOSES!


getMetaData

public org.eclipse.emf.ecore.util.ExtendedMetaData getMetaData()
ONLY FOR TESTING PURPOSES!

Returns:

getHost

public java.lang.String getHost()
ONLY FOR TESTING PURPOSES!

Returns:

getHttpPort

public int getHttpPort()
ONLY FOR TESTING PURPOSES!

Returns:

getScopePartnerLinks

public org.eclipse.emf.common.util.EList getScopePartnerLinks(org.eclipse.emf.ecore.EObject process)
Return an EList containing all partnerLink elements defined on Scopes in this process.

Parameters:
process - EObject representing the Process element
Returns:
EList containing all PartnerLinks defined on any Scopes (or none)