[savara-commits] savara SVN: r504 - in branches/experimental/2.0.x: bundles/org.savara.bpel and 28 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Dec 16 09:38:04 EST 2010
Author: objectiser
Date: 2010-12-16 09:37:55 -0500 (Thu, 16 Dec 2010)
New Revision: 504
Added:
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/BPELDefinitions.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/AbstractBPELModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ChoiceModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/InteractionModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ProtocolModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ProtocolModelModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/RepeatModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/RunModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractCondition.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractInteraction.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELActivity.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElement.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElementFactory.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELGroupingConstruct.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Catch.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CatchAll.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CompensationHandler.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Condition.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Else.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Elseif.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/EventHandlers.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Exit.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/FaultHandlers.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Flow.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/For.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ForEach.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/If.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Import.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Invoke.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Link.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnAlarm.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnEvent.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnMessage.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/PartnerLink.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Pick.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Process.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Receive.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/RepeatUntil.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Reply.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Rethrow.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Scope.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Sequence.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Source.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Target.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/TerminationHandler.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Throw.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Until.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Variable.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Wait.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/While.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/BPELModelUtil.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/InteractionUtil.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/PartnerLinkUtil.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/TypeReferenceUtil.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/VariableUtil.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/util/BPELModelUtilTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/resources/
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/resources/bpel/
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/resources/bpel/PolicyQuoteProcess_PolicyQuoteProcessService.bpel
branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/
branches/experimental/2.0.x/docs/gettingstartedguide/.project
branches/experimental/2.0.x/docs/samplesguide/.project
branches/experimental/2.0.x/docs/userguide/.project
branches/experimental/2.0.x/docs/userguide/.settings/
branches/experimental/2.0.x/docs/userguide/.settings/org.eclipse.jdt.core.prefs
branches/experimental/2.0.x/validators/jboss/common/.classpath
branches/experimental/2.0.x/validators/jboss/common/.project
branches/experimental/2.0.x/validators/jboss/esb/.classpath
branches/experimental/2.0.x/validators/jboss/esb/.project
branches/experimental/2.0.x/validators/jboss/wsnative/.classpath
branches/experimental/2.0.x/validators/jboss/wsnative/.project
Removed:
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/AbstractBPELModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ConversationChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ConversationInteractionModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/IfModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/LanguageToConversationModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/RunModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/SpawnModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/WhenModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/WhileModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/util/InteractionUtil.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/util/TypeReferenceUtil.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractCondition.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractInteraction.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELActivity.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElement.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElementFactory.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELGroupingConstruct.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Catch.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CatchAll.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CompensationHandler.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Condition.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Else.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Elseif.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/EventHandlers.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Exit.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/FaultHandlers.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Flow.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/For.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ForEach.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/If.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Import.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Invoke.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Link.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnAlarm.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnEvent.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnMessage.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/PartnerLink.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Pick.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Process.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Receive.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/RepeatUntil.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Reply.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Rethrow.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Scope.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Sequence.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Source.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Target.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/TerminationHandler.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Throw.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Until.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Variable.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Wait.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/While.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/util/XMLUtilsTest.java
branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/protocol/change/
Modified:
branches/experimental/2.0.x/bundles/org.savara.bpel/
branches/experimental/2.0.x/bundles/org.savara.bpel/.classpath
branches/experimental/2.0.x/bundles/org.savara.bpel/META-INF/MANIFEST.MF
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/InteractionPatterns.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ModelChangeUtils.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TFrom.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TOnAlarmEvent.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TTo.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model2/BPELLanguageModel.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model2/DefaultBPELLanguageModel.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ConversionContext.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/DefaultConversionContext.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ScopeActivity.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/BPELElementTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CatchAllTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CatchTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CompensationHandlerTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ConditionTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ElseIfTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ElseTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/EventHandlersTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ExitTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/FaultHandlersTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/FlowTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ForEachTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/IfTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/InvokeTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnAlarmTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnEventTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnMessageTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/PartnerLinkTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/PickTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ProcessTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ReceiveTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/RepeatUntilTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ReplyTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/RethrowTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ScopeTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/SequenceTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TerminationHandlerTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestAbstractInteraction.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestBPELActivity.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestBPELElement.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ThrowTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/VariableTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/WaitTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/WhileTest.java
branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/util/InteractionUtilTest.java
branches/experimental/2.0.x/bundles/org.savara.contract.model/
branches/experimental/2.0.x/bundles/org.savara.contract.model/.classpath
branches/experimental/2.0.x/bundles/org.savara.core/
branches/experimental/2.0.x/bundles/org.savara.core/.classpath
branches/experimental/2.0.x/bundles/org.savara.core/META-INF/MANIFEST.MF
branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/AbstractModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/DefaultModelChangeContext.java
branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/DefaultModelGenerator.java
branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/ModelChangeContext.java
branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/ModelChangeRule.java
branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/ModelGenerator.java
branches/experimental/2.0.x/bundles/org.savara.wsdl/
branches/experimental/2.0.x/bundles/org.savara.wsdl/.classpath
branches/experimental/2.0.x/docs/gettingstartedguide/
branches/experimental/2.0.x/docs/samplesguide/
branches/experimental/2.0.x/pom.xml
branches/experimental/2.0.x/validators/jboss/common/
branches/experimental/2.0.x/validators/jboss/esb/
branches/experimental/2.0.x/validators/jboss/wsnative/
Log:
Intermediate save - still refactoring.
Property changes on: branches/experimental/2.0.x/bundles/org.savara.bpel
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/.classpath
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/.classpath 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/.classpath 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,5 +1,6 @@
<classpath>
<classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+ <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
<classpathentry kind="src" path="src/main/java" including="**/*.java"/>
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar"/>
@@ -11,9 +12,9 @@
<classpathentry kind="src" path="/org.savara.contract.model"/>
<classpathentry kind="src" path="/org.savara.core"/>
<classpathentry kind="src" path="/org.savara.wsdl"/>
- <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0.20101208-M2/org.scribble.common-2.0.0.20101208-M2.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0.20101208-M2/org.scribble.common-2.0.0.20101208-M2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0.20101208-M2/org.scribble.protocol-2.0.0.20101208-M2.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0.20101208-M2/org.scribble.protocol-2.0.0.20101208-M2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol.parser/2.0.0.20101208-M2/org.scribble.protocol.parser-2.0.0.20101208-M2.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol.parser/2.0.0.20101208-M2/org.scribble.protocol.parser-2.0.0.20101208-M2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol.parser/2.0.0-SNAPSHOT/org.scribble.protocol.parser-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol.parser/2.0.0-SNAPSHOT/org.scribble.protocol.parser-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/org/antlr/stringtemplate/3.2/stringtemplate-3.2.jar"/>
<classpathentry kind="var" path="M2_REPO/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/META-INF/MANIFEST.MF
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/META-INF/MANIFEST.MF 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/META-INF/MANIFEST.MF 2010-12-16 14:37:55 UTC (rev 504)
@@ -26,6 +26,6 @@
org.savara.bpel.model.change.RunModelChangeRule,
org.savara.bpel.model.change.SpawnModelChangeRule,
org.savara.bpel.model.change.ConversationInteractionModelChangeRule
-Export-Package: org.savara.bpel.model.change;x-friends:="org.savara.tools.bpel.tests",
- org.savara.bpel.model.component;x-friends:="org.savara.tools.bpel.tests",
- org.savara.bpel.model2;x-friends:="org.savara.tools.bpel.tests"
+Export-Package: org.savara.bpel.change;x-friends:="org.savara.tools.bpel.tests",
+ org.savara.bpel.model2;x-friends:="org.savara.tools.bpel.tests",
+ org.savara.bpel.toprotocol;x-friends:="org.savara.tools.bpel.tests"
Added: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/BPELDefinitions.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/BPELDefinitions.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/BPELDefinitions.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,24 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel;
+
+public class BPELDefinitions {
+
+ public static final String BPEL_MODEL_PROPERTY="bpel.model";
+
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change (from rev 502, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change)
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/AbstractBPELModelChangeRule.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/AbstractBPELModelChangeRule.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/AbstractBPELModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.change;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.component.Sequence;
-import org.scribble.protocol.model.*;
-import org.savara.protocol.change.*;
-
-/**
- * This is the abstract ESB model change rule.
- */
-public abstract class AbstractBPELModelChangeRule extends AbstractModelChangeRule {
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and inserted
- * model object.
- *
- * @param context The context
- * @param model The model
- * @param mobj The model object being inserted
- * @param ref The optional reference model object
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isInsertSupported(ModelChangeContext context,
- ProtocolModel model, ModelObject mobj, ModelObject ref) {
- boolean ret=false;
-
- if (context.getParent() instanceof Sequence &&
- model instanceof BPELLanguageModel) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context)
- * and deleted model object.
- *
- * @param context The context
- * @param model The model
- * @param mobj The model object to be removed
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isDeleteSupported(ModelChangeContext context,
- ProtocolModel model, ModelObject mobj) {
- boolean ret=false;
-
- return(ret);
- }
-
- /**
- * This method removes the supplied model object from the
- * supplied model. The model object representation must
- * contain the necessary model specific to remove the
- * object from the underlying model representation.
- *
- * @param context The context
- * @param model The model being changed
- * @param mobj The model object to be deleted
- * @return Whether the change has been applied
- */
- @Override
- public boolean delete(ModelChangeContext context,
- ProtocolModel model, ModelObject mobj) {
- boolean ret=false;
-
- return(ret);
- }
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/AbstractBPELModelChangeRule.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/AbstractBPELModelChangeRule.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/AbstractBPELModelChangeRule.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/AbstractBPELModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.change;
+
+import org.savara.bpel.BPELDefinitions;
+import org.savara.bpel.model.TProcess;
+import org.savara.bpel.model.TSequence;
+import org.savara.change.*;
+import org.scribble.protocol.model.*;
+
+/**
+ * This is the abstract ESB model change rule.
+ */
+public abstract class AbstractBPELModelChangeRule extends AbstractModelChangeRule {
+
+ /**
+ * This method determines whether the rule is appropriate
+ * for the supplied type of model, parent (in the context) and inserted
+ * model object.
+ *
+ * @param context The context
+ * @param model The model
+ * @param mobj The model object being inserted
+ * @param ref The optional reference model object
+ * @return Whether the rule supports the supplied information
+ */
+ @Override
+ public boolean isInsertSupported(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ boolean ret=false;
+
+ if (context.getParent() instanceof TSequence && isBPELModel(model)) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ protected boolean isBPELModel(ProtocolModel model) {
+ return(model.getProperties().get(BPELDefinitions.BPEL_MODEL_PROPERTY) instanceof TProcess);
+ }
+
+ protected TProcess getBPELModel(ProtocolModel model) {
+ return((TProcess)model.getProperties().get(BPELDefinitions.BPEL_MODEL_PROPERTY));
+ }
+
+ /**
+ * This method determines whether the rule is appropriate
+ * for the supplied type of model, parent (in the context)
+ * and deleted model object.
+ *
+ * @param context The context
+ * @param model The model
+ * @param mobj The model object to be removed
+ * @return Whether the rule supports the supplied information
+ */
+ @Override
+ public boolean isDeleteSupported(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj) {
+ boolean ret=false;
+
+ return(ret);
+ }
+
+ /**
+ * This method removes the supplied model object from the
+ * supplied model. The model object representation must
+ * contain the necessary model specific to remove the
+ * object from the underlying model representation.
+ *
+ * @param context The context
+ * @param model The model being changed
+ * @param mobj The model object to be deleted
+ * @return Whether the change has been applied
+ */
+ @Override
+ public boolean delete(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj) {
+ boolean ret=false;
+
+ return(ret);
+ }
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ChoiceModelChangeRule.java (from rev 502, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/IfModelChangeRule.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ChoiceModelChangeRule.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ChoiceModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,571 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.change;
+
+import javax.xml.namespace.QName;
+
+import org.savara.bpel.model.TActivityContainer;
+import org.savara.bpel.model.TBoolean;
+import org.savara.bpel.model.TCatch;
+import org.savara.bpel.model.TElseif;
+import org.savara.bpel.model.TFaultHandlers;
+import org.savara.bpel.model.TIf;
+import org.savara.bpel.model.TOnMessage;
+import org.savara.bpel.model.TPartnerLink;
+import org.savara.bpel.model.TPick;
+import org.savara.bpel.model.TProcess;
+import org.savara.bpel.model.TScope;
+import org.savara.bpel.model.TSequence;
+import org.savara.bpel.model.TVariable;
+import org.savara.bpel.model2.*;
+import org.savara.bpel.toprotocol.*;
+import org.savara.bpel.util.InteractionUtil;
+import org.savara.bpel.util.PartnerLinkUtil;
+import org.savara.bpel.util.VariableUtil;
+import org.savara.change.ModelChangeContext;
+import org.savara.contract.model.Contract;
+import org.savara.contract.model.Interface;
+import org.savara.wsdl.util.WSDLGeneratorUtil;
+import org.scribble.protocol.model.*;
+
+/**
+ * This is the model change rule for the Choice.
+ */
+public class ChoiceModelChangeRule extends AbstractBPELModelChangeRule {
+
+ /**
+ * This method determines whether the rule is appropriate
+ * for the supplied type of model, parent (in the context) and
+ * model object.
+ *
+ * @param context The context
+ * @param model The model
+ * @param mobj The model object causing the change
+ * @param ref The optional reference model object
+ * @return Whether the rule supports the supplied information
+ */
+ @Override
+ public boolean isInsertSupported(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ boolean ret=false;
+
+ if (mobj instanceof org.scribble.protocol.model.Choice && isBPELModel(model)) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method adds a new model object, within a
+ * parent model object, with the details supplied in
+ * another model object. The supplied model object
+ * will usually be from a different model representation
+ * (e.g. due to a merge), so the details will be
+ * copied and placed in the representation associated
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
+ *
+ * @param context The context
+ * @param model The model being changed
+ * @param mobj The model object details to be inserted
+ * @param ref The optional reference model object
+ * @return Whether the change has been applied
+ */
+ @Override
+ public boolean insert(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ TProcess bpelModel=getBPELModel(model);
+ org.scribble.protocol.model.Choice elem=
+ (org.scribble.protocol.model.Choice)mobj;
+ java.util.List<When> paths=elem.getWhens();
+
+ // Check if the 'If' construct is to handle responses
+ // to a preceding request being sent
+ if (InteractionPatterns.isResponseAndFaultHandler(elem)) {
+
+ if (context.getParent() instanceof TSequence) {
+ // Find fault handler
+ TSequence seq=(TSequence)context.getParent();
+ TScope scope=new TScope();
+ TFaultHandlers fh=scope.getFaultHandlers();
+
+ for (int i=0; i < paths.size(); i++) {
+ When path=paths.get(i);
+
+ if (path.getBlock().getContents().size() > 0) {
+ Activity act=path.getBlock().getContents().get(0);
+ TSequence subseq=null;
+
+ if (act instanceof Interaction &&
+ InteractionPatterns.isFaultResponse(
+ (Interaction)act)) {
+ String faultName=InteractionPatterns.getFaultName((Interaction)act);
+
+ Contract contract = ModelChangeUtils.getContract(context,
+ ((Interaction)act).getFromRole().getName());
+
+ // Define fault message type
+ QName qname= WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
+ faultName);
+
+ String faultVarName=qname.getLocalPart()+"Var";
+ //String mesgType=InteractionPatterns.getMessageTypeLocalPart((Interaction)act);
+ //String namespace=InteractionPatterns.getMessageTypeNameSpace((Interaction)act);
+
+ TCatch c=new TCatch();
+ c.setFaultVariable(faultVarName);
+
+ // Find namespace prefix
+ /* TODO: Sort out namespace prefix issue
+ if (qname != null) {
+ String prefix=bpelModel.addNamespace(qname.getNamespaceURI());
+
+ if (prefix != null) {
+ mesgType = prefix+":"+qname.getLocalPart();
+ faultName = prefix+":"+faultName;
+ }
+ }
+ */
+
+ c.setFaultName(new QName(qname.getNamespaceURI(), faultName));
+ c.setFaultMessageType(qname);
+
+ // Add catch to fault handler
+ fh.getCatch().add(c);
+
+ subseq = new TSequence();
+ c.setSequence(subseq);
+ } else {
+ subseq = seq;
+
+ java.util.List<BPELActivity> acts=
+ ((Sequence)context.getParent()).getActivities();
+
+ if (acts.size() > 0 && act instanceof Interaction &&
+ acts.get(acts.size()-1) instanceof Invoke) {
+ Contract contract = ModelChangeUtils.getContract(context,
+ ((Interaction)act).getFromRole().getName());
+
+ QName qname=null;
+ if (InteractionUtil.isRequest((Interaction)act)) {
+ qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
+ ((Interaction)act).getMessageSignature().getOperation());
+ } else if (InteractionPatterns.isFaultResponse((Interaction)act)) {
+ qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
+ InteractionPatterns.getFaultName((Interaction)act));
+ } else {
+ qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
+ ((Interaction)act).getMessageSignature().getOperation());
+ }
+
+ String varName=qname.getLocalPart()+"Var"; //InteractionPatterns.getVariableName((Interaction)act);
+ Invoke invoke=(Invoke)acts.get(acts.size()-1);
+
+ invoke.setOutputVariable(varName);
+
+ // Create variable
+ if (varName != null) {
+ createVariable(context, varName, (Interaction)act, bpelModel);
+ }
+ }
+ }
+
+ Object parent=context.getParent();
+
+ context.setParent(subseq);
+
+ for (int j=1; j < path.getBlock().getContents().size(); j++) {
+ context.insert(model, path.getBlock().getContents().get(j), null);
+ }
+
+ context.setParent(parent);
+ }
+ }
+ } else {
+ // TODO: Error handling
+ }
+ } else if (InteractionPatterns.isSwitch(elem)) {
+ TPick act=new TPick();
+
+ if (context.getParent() instanceof TSequence) {
+ ((TSequence)context.getParent()).getActivity().add(act);
+ }
+
+ Role role=null;
+
+ if (elem.enclosingProtocol() != null) {
+ role = elem.enclosingProtocol().getRole();
+ }
+
+ for (int i=0; i < paths.size(); i++) {
+ When path=paths.get(i);
+
+ TSequence seq=new TSequence();
+
+ // Process the activities within the conversation
+ java.util.List<Activity> acts=path.getBlock().getContents();
+
+ Object parent=context.getParent();
+
+ context.setParent(seq);
+
+ for (int j=0; j < acts.size(); j++) {
+ context.insert(model, acts.get(j), null);
+ }
+
+ context.setParent(parent);
+
+ //Interaction recv=InteractionPatterns.getPickPathInteraction(path);
+
+ TOnMessage onm=new TOnMessage();
+ onm.setSequence(seq);
+
+ TPartnerLink pl=new TPartnerLink();
+ String portType=null;
+ String namespace=null;
+
+ String prevPLName=role.getName()+"To"+elem.getFromRole().getName();
+
+ String mainPrefix=null;
+
+ Contract contract=ModelChangeUtils.getContract(context, context.getRole().getName());
+
+ /* TODO: namespace issue
+ if (contract != null) {
+ mainPrefix = bpelModel.addNamespace(contract.getNamespace());
+ }
+ */
+
+ // Check if partner link already exists in
+ // other direction
+ TPartnerLink prev=
+ PartnerLinkUtil.getPartnerLink(bpelModel, prevPLName);
+
+ if (InteractionUtil.isRequest(path) && prev == null) {
+
+ pl.setMyRole(role.getName()+"Service");
+ //pl.setPartnerRole(interaction.getToRole().getName());
+ pl.setName(elem.getFromRole().getName()+"To"+role.getName());
+
+ String plt=elem.getFromRole().getName()+"To"+role.getName()+"Service"+"LT";
+
+ pl.setPartnerLinkType(new QName(contract.getNamespace(), plt));
+
+ contract = ModelChangeUtils.getContract(context, role.getName());
+
+ if (contract != null && contract.getInterfaces().size() > 0) {
+ Interface intf = contract.getInterfaces().iterator().next();
+
+ portType = intf.getName();
+ namespace = intf.getNamespace();
+
+ /* TODO: namespace issue
+ String prefix = bpelModel.addNamespace(intf.getNamespace());
+
+ if (prefix != null) {
+ portType = prefix+":"+portType;
+ }
+ */
+ }
+ } else {
+ pl.setMyRole(role.getName()+"Requester");
+ pl.setPartnerRole(elem.getFromRole().getName()+"Service");
+ pl.setName(role.getName()+"To"+elem.getFromRole().getName());
+
+ String plt=role.getName()+"To"+elem.getFromRole().getName()+"Requester"+"LT";
+
+ pl.setPartnerLinkType(new QName(contract.getNamespace(), plt));
+
+ //portType = role.getName()+
+ // recv.getFromRole().getName()+"CallbackPT";
+
+ contract = ModelChangeUtils.getContract(context, elem.getFromRole().getName());
+ if (contract != null && contract.getInterfaces().size() > 0) {
+ Interface intf = contract.getInterfaces().iterator().next();
+
+ portType = intf.getName();
+ namespace = intf.getNamespace();
+
+ /* TODO: Namespace issue
+ String prefix = bpelModel.addNamespace(intf.getNamespace());
+
+ if (prefix != null) {
+ portType = prefix+":"+portType;
+ }
+ */
+ }
+ }
+
+ QName qname=null;
+ if (InteractionUtil.isRequest(path)) {
+ qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
+ path.getMessageSignature().getOperation());
+ } else if (InteractionPatterns.isFaultResponse(path)) {
+ qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
+ InteractionPatterns.getFaultName(path));
+ } else {
+ qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
+ path.getMessageSignature().getOperation());
+ }
+
+ String varName=qname.getLocalPart()+"Var"; //InteractionPatterns.getVariableName(recv);
+
+ if (varName != null) {
+ onm.setVariable(varName);
+ }
+
+ // Create partner link
+ TPartnerLink other=
+ PartnerLinkUtil.getPartnerLink(bpelModel, pl.getName());
+
+ if (other == null) {
+ bpelModel.getPartnerLinks().getPartnerLink().add(pl);
+ } else {
+ if (other.getPartnerRole() == null &&
+ pl.getPartnerRole() != null) {
+ other.setPartnerRole(pl.getPartnerRole());
+ }
+ if (other.getMyRole() == null &&
+ pl.getMyRole() != null) {
+ other.setMyRole(pl.getMyRole());
+ }
+ }
+
+ // Create variable
+ if (varName != null) {
+ createVariable(context, varName, path, bpelModel);
+ }
+
+ // Check if create instance
+ if (org.scribble.protocol.util.InteractionUtil.isInitialInteraction(elem.getModel(), path)) {
+ act.setCreateInstance(TBoolean.YES);
+ }
+
+ // Set details on interaction
+ onm.setPartnerLink(pl.getName());
+ onm.setPortType(new QName(namespace, portType));
+
+ MessageSignature ms=path.getMessageSignature();
+ if (ms.getOperation() != null) {
+ onm.setOperation(ms.getOperation());
+ }
+
+ act.getOnMessage().add(onm);
+ }
+
+ } else {
+ TIf act=new TIf();
+
+ if (context.getParent() instanceof TSequence) {
+ ((TSequence)context.getParent()).getActivity().add(act);
+ }
+
+ for (int i=0; i < paths.size(); i++) {
+ When path=paths.get(i);
+
+ TSequence seq=new TSequence();
+
+ // Process the activities within the conversation
+ java.util.List<Activity> acts=path.getBlock().getContents();
+
+ Object parent=context.getParent();
+
+ context.setParent(seq);
+
+ for (int j=0; j < acts.size(); j++) {
+ context.insert(model, acts.get(j), null);
+ }
+
+ context.setParent(parent);
+
+ if (i == 0) {
+ act.setSequence(seq);
+ } else if (i == elem.getPaths().size()-1) {
+ TActivityContainer construct=new TActivityContainer();
+ construct.setSequence(seq);
+
+ act.setElse(construct);
+ } else {
+ TElseif construct=new TElseif();
+
+ construct.setSequence(seq);
+
+ act.getElseif().add(construct);
+ }
+ }
+ }
+
+ return(true);
+ }
+
+ /**
+ * This method creates a variable, if one does not already exist for the
+ * supplied name, with the message type associated with the supplied
+ * interaction.
+ *
+ * @param varName The variable name
+ * @param interaction The interaction associated with the variable
+ * @param bpelModel The BPEL model
+ */
+ protected void createVariable(ModelChangeContext context, String varName,
+ Interaction interaction, TProcess bpelModel) {
+ TVariable var=VariableUtil.getVariable(bpelModel, varName);
+
+ if (var == null) {
+ Role role=null;
+
+ if (interaction.enclosingProtocol() != null) {
+ role = interaction.enclosingProtocol().getRole();
+ }
+
+ var = new TVariable();
+ var.setName(varName);
+
+ Role roleType=null;
+ Contract contract=null;
+
+ if (InteractionUtil.isRequest(interaction)) {
+ // TODO: How to deal with multiple to roles
+ if (interaction.getToRoles().size() > 0) {
+ roleType = interaction.getToRoles().get(0);
+ }
+ if (roleType == null) {
+ roleType = role;
+ }
+ } else {
+ roleType = interaction.getFromRole();
+ if (roleType == null) {
+ roleType = role;
+ }
+ }
+
+ if (roleType != null) {
+ contract = ModelChangeUtils.getContract(context, roleType.getName());
+ }
+
+ QName qname=null;
+ if (InteractionUtil.isRequest(interaction)) {
+ qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
+ interaction.getMessageSignature().getOperation());
+ } else {
+ qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
+ interaction.getMessageSignature().getOperation());
+ }
+
+ /*
+ String mesgType=qname.getLocalPart();
+
+ // Find namespace prefix
+ if (qname.getNamespaceURI() != null) {
+ String pfix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
+
+ if (pfix != null) {
+ mesgType = pfix+":"+mesgType;
+ }
+ }
+ */
+
+ var.setMessageType(qname);
+
+ bpelModel.getVariables().getVariable().add(var);
+ }
+ }
+
+ /**
+ * This method creates a variable, if one does not already exist for the
+ * supplied name, with the message type associated with the supplied
+ * interaction.
+ *
+ * @param varName The variable name
+ * @param interaction The interaction associated with the variable
+ * @param bpelModel The BPEL model
+ */
+ protected void createVariable(ModelChangeContext context, String varName,
+ When interaction, TProcess bpelModel) {
+ TVariable var=VariableUtil.getVariable(bpelModel, varName);
+ Choice choice=(Choice)interaction.getParent();
+
+ if (var == null) {
+ Role role=null;
+
+ if (choice.enclosingProtocol() != null) {
+ role = choice.enclosingProtocol().getRole();
+ }
+
+ var = new TVariable();
+ var.setName(varName);
+
+ Role roleType=null;
+ Contract contract=null;
+
+ if (InteractionUtil.isRequest(interaction)) {
+ roleType = choice.getToRole();
+ if (roleType == null) {
+ roleType = role;
+ }
+ } else {
+ roleType = choice.getFromRole();
+ if (roleType == null) {
+ roleType = role;
+ }
+ }
+
+ if (roleType != null) {
+ contract = ModelChangeUtils.getContract(context, roleType.getName());
+ }
+
+ QName qname=null;
+ if (InteractionUtil.isRequest(interaction)) {
+ qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
+ interaction.getMessageSignature().getOperation());
+ } else {
+ qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
+ interaction.getMessageSignature().getOperation());
+ }
+
+ /*
+ String mesgType=qname.getLocalPart();
+
+ // Find namespace prefix
+ if (qname.getNamespaceURI() != null) {
+ String pfix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
+
+ if (pfix != null) {
+ mesgType = pfix+":"+mesgType;
+ }
+ }
+ */
+
+ var.setMessageType(qname);
+
+ bpelModel.getVariables().getVariable().add(var);
+ }
+ }
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ConversationChangeRule.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/ConversationChangeRule.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ConversationChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,243 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.change;
-
-import org.savara.bpel.generator.GeneratorUtil;
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.component.*;
-import org.savara.bpel.model.component.Import;
-import org.savara.contract.model.Contract;
-import org.savara.contract.model.Interface;
-import org.scribble.protocol.model.*;
-import org.scribble.model.change.*;
-import org.scribble.conversation.model.*;
-import org.scribble.extensions.RegistryInfo;
-
-/**
- * This is the model change rule for the Conversation.
- */
- at RegistryInfo(extension=ModelChangeRule.class,notation=BPELNotation.NOTATION_CODE)
-public class ConversationChangeRule extends AbstractModelChangeRule {
-
- //private static final String NAME_SUFFIX = "_main";
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
- * model object.
- *
- * @param context The context
- * @param model The model
- * @param mobj The model object causing the change
- * @param ref The optional reference model object
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isInsertSupported(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- boolean ret=false;
-
- if (mobj instanceof Conversation &&
- model instanceof DefaultBPELLanguageModel) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method adds a new model object, within a
- * parent model object, with the details supplied in
- * another model object. The supplied model object
- * will usually be from a different model representation
- * (e.g. due to a merge), so the details will be
- * copied and placed in the representation associated
- * with the supplied model and parent model object.<p>
- * <p>
- * If a reference model object is supplied, then the
- * insertion will occur relative to it. If the reference
- * object is a block, then it means that the insertion
- * should occur at the end of the block. Otherwise the
- * new model object should be inserted before the
- * reference object, within the containing block.<p>
- * <p>
- * If the reference object is not supplied, then the
- * new model object should be inserted at the end of
- * the behaviour associated with the parent in the model
- * change context.
- *
- * @param context The context
- * @param model The model being changed
- * @param mobj The model object details to be inserted
- * @param ref The optional reference model object
- * @return Whether the change has been applied
- */
- @Override
- public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- DefaultBPELLanguageModel bpelModel=(DefaultBPELLanguageModel)model;
- Conversation conv=(Conversation)mobj;
- String roleNamespace=null;
-
- Sequence seq=new Sequence(bpelModel);
-
- // Check if root conversation
- if (conv.getParent() instanceof Model) {
-
- // Set the name of the process
- bpelModel.getBPELProcess().setName(conv.getLocatedName().getName()+"_"+
- conv.getLocatedName().getRole().getName());
-
- // Get contract
- Contract contract=ModelChangeUtils.getContract(context, conv.getLocatedName().getRole().getName());
-
- if (contract != null) {
- roleNamespace = contract.getNamespace();
-
- // Set namespace
- bpelModel.getBPELProcess().setTargetNamespace(contract.getNamespace());
-
- // Add other namespaces
- for (org.savara.contract.model.Namespace ns : contract.getNamespaces()) {
- bpelModel.getBPELProcess().initNamespace(ns.getURI(), ns.getPrefix());
- }
- }
-
- String namespace=((Model)conv.getModel()).
- getNamespace().getName();
-
- String ctype=null;
-
- // Check if conversation has a 'conforms to' reference
- if (conv.getConformsTo().size() > 0) {
- // Set conversation type based on first 'conforms to'
- // reference
- ConformanceReference cref=conv.getConformsTo().get(0);
-
- ctype = cref.getNamespace()+"."+
- cref.getLocalpart()+"@"+
- cref.getLocatedRole();
- } else {
- // Set conversation type based on conversation
- // namespace and name
- ctype = namespace+"."+
- conv.getLocatedName().getName()+"@"+
- conv.getLocatedName().getRole().getName();
- }
-
- if (ctype != null) {
- bpelModel.getBPELProcess().setConversationType(ctype);
- }
-
- // Add import for this role
- addImport(context, bpelModel, conv, context.getRole());
-
- // Add import statements for partner roles
- java.util.List<Role> roles=conv.getRoles();
-
- for (int i=0; i < roles.size(); i++) {
- addImport(context, bpelModel, conv, roles.get(i));
- }
-
- // Add import for partner link types
- Import imp=new Import(bpelModel);
- imp.setLocation(bpelModel.getBPELProcess().getName()+"Artifacts.wsdl");
- imp.setNamespace(roleNamespace);
- imp.setImportType("http://schemas.xmlsoap.org/wsdl/");
-
- bpelModel.getBPELProcess().addImport(imp, -1);
-
- // Add sequence to model
- bpelModel.getBPELProcess().setActivity(seq);
-
- } else if (context.getParent() instanceof Sequence) {
-
- // Create a scope
- Scope scope=new Scope(bpelModel);
-
- ((Sequence)context.getParent()).addActivity(scope, -1);
-
- // NOTE: Currently needs to be added after adding scope
- // to parent sequence, as otherwise the DOM element
- // associated with the 'seq' sequence becomes
- // disconnected from the actual document - due to
- // the fact that added elements are copied (in
- // turn due to an xml parser exception).
- scope.setActivity(seq);
- }
-
- // Process the activities within the conversation
- java.util.List<Activity> acts=conv.getBlock().getContents();
-
- Object parent=context.getParent();
-
- context.setParent(seq);
-
- for (int i=0; i < acts.size(); i++) {
- if ((acts.get(i) instanceof Definition) == false) {
- context.insert(model, acts.get(i), null);
- }
- }
-
- // Reset old parent
- context.setParent(parent);
-
- return(true);
- }
-
- /**
- * This method adds an import statement for the contract associated with the
- * supplied role.
- *
- * @param context The context
- * @param bpelModel The model
- * @param conv The conversation
- * @param role The role
- */
- protected void addImport(ModelChangeContext context, DefaultBPELLanguageModel bpelModel,
- Conversation conv, Role role) {
- if (role.getAnnotations().containsKey(Contract.class.getName())) {
- Contract contract=(Contract)role.getAnnotations().get(Contract.class.getName());
-
- boolean gen=false;
-
- java.util.Iterator<Interface> iter=contract.getInterfaces().iterator();
-
- while (gen == false && iter.hasNext()) {
- Interface intf=iter.next();
-
- if (intf.getMessageExchangePatterns().size() > 0) {
- gen = true;
- }
- }
-
- if (gen) {
- String fileName=GeneratorUtil.getWSDLFileName(role,
- conv.getLocatedName().getName(), "");
-
- Import imp=new Import(bpelModel);
-
- imp.setLocation(fileName);
- imp.setNamespace(contract.getNamespace());
- imp.setImportType("http://schemas.xmlsoap.org/wsdl/");
-
- bpelModel.getBPELProcess().addImport(imp, -1);
- }
- }
- }
-}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ConversationInteractionModelChangeRule.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/ConversationInteractionModelChangeRule.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ConversationInteractionModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,472 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.change;
-
-import javax.xml.namespace.QName;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.component.*;
-import org.savara.bpel.model.util.*;
-import org.savara.contract.model.Contract;
-import org.savara.contract.model.Interface;
-import org.savara.wsdl.util.WSDLGeneratorUtil;
-import org.scribble.protocol.model.*;
-import org.scribble.model.change.*;
-import org.scribble.conversation.model.*;
-import org.scribble.extensions.RegistryInfo;
-
-/**
- * This is the model change rule for the Conversation Interaction.
- */
- at RegistryInfo(extension=ModelChangeRule.class,notation=BPELNotation.NOTATION_CODE)
-public class ConversationInteractionModelChangeRule extends AbstractBPELModelChangeRule {
-
- private static final String INTERFACE_NAME = "interfaceName";
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and inserted
- * model object.
- *
- * @param context The context
- * @param model The model
- * @param mobj The model object being inserted
- * @param ref The optional reference model object
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isInsertSupported(ModelChangeContext context,
- Model model, ModelObject mobj,
- ModelObject ref) {
- boolean ret=false;
-
- if (mobj instanceof ConversationInteraction &&
- super.isInsertSupported(context, model, mobj, ref)) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method adds a new model object, within a
- * parent model object, with the details supplied in
- * another model object. The supplied model object
- * will usually be from a different model representation
- * (e.g. due to a merge), so the details will be
- * copied and placed in the representation associated
- * with the supplied model and parent model object.<p>
- * <p>
- * If a reference model object is supplied, then the
- * insertion will occur relative to it. If the reference
- * object is a block, then it means that the insertion
- * should occur at the end of the block. Otherwise the
- * new model object should be inserted before the
- * reference object, within the containing block.<p>
- * <p>
- * If the reference object is not supplied, then the
- * new model object should be inserted at the end of
- * the behaviour associated with the parent in the model
- * change context.
- *
- * @param context The context
- * @param model The model being changed
- * @param mobj The model object details to be inserted
- * @param ref The optional reference model object
- * @return Whether the change has been applied
- */
- @Override
- public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- BPELLanguageModel bpelModel=(BPELLanguageModel)model;
- ConversationInteraction interaction=(ConversationInteraction)mobj;
- boolean ret=false;
- AbstractInteraction act=null;
- PartnerLink pl=new PartnerLink(bpelModel);
- Role role=null;
- String portType=null;
- String varName=null; //InteractionPatterns.getVariableName(interaction);
- Interface intf=null;
-
- if (interaction.getEnclosingDefinition() != null) {
- role = interaction.getEnclosingDefinition().
- getLocatedName().getRole();
- }
-
- // Identify port type role
- String prefix=null;
-
- String mainPrefix=null;
-
- Contract contract=ModelChangeUtils.getContract(context, context.getRole().getName());
- if (contract != null) {
- mainPrefix = bpelModel.getBPELProcess().addNamespace(contract.getNamespace());
- }
-
- Role roleType=null;
-
- if (InteractionUtil.isRequest(interaction)) {
- roleType = interaction.getToRole();
- if (roleType == null) {
- roleType = role;
- }
- } else {
- roleType = interaction.getFromRole();
- if (roleType == null) {
- roleType = role;
- }
- }
-
- if (roleType != null) {
- contract = ModelChangeUtils.getContract(context, roleType.getName());
-
- if (contract != null) {
- if (interaction.getAnnotations().containsKey(INTERFACE_NAME)) {
- String intfName=(String)interaction.getAnnotations().get(INTERFACE_NAME);
- intf = contract.getInterface(intfName);
-
- if (intf == null) {
- // Try localpart
- javax.xml.namespace.QName qname=javax.xml.namespace.QName.valueOf(intfName);
- intf = contract.getInterface(qname.getLocalPart());
- }
- } else if (contract.getInterfaces().size() > 0) {
- intf = contract.getInterfaces().iterator().next();
- }
- }
- }
-
- if (intf != null) {
- portType = intf.getName();
-
- prefix = bpelModel.getBPELProcess().addNamespace(intf.getNamespace());
-
- if (prefix != null) {
- portType = prefix+":"+portType;
- }
- }
-
- // Create variable
- //if (varName != null) {
- QName qname=null;
- if (InteractionUtil.isRequest(interaction)) {
- qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
- interaction.getMessageSignature().getOperation());
- } else if (InteractionPatterns.isFaultResponse(interaction)) {
- qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
- InteractionPatterns.getFaultName(interaction));
- } else {
- qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
- interaction.getMessageSignature().getOperation());
- }
-
- varName = qname.getLocalPart()+"Var";
-
- org.savara.bpel.model.component.Variable var=
- bpelModel.getBPELProcess().getVariable(varName);
-
- if (var == null) {
- var = new org.savara.bpel.model.component.Variable(bpelModel);
- var.setName(varName);
-
- String mesgType=qname.getLocalPart();
-
- // Find namespace prefix
- if (qname.getNamespaceURI() != null) {
- String pfix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
-
- if (pfix != null) {
- mesgType = pfix+":"+mesgType;
- }
- }
-
- var.setMessageType(mesgType);
-
- bpelModel.getBPELProcess().addVariable(var, -1);
- }
- //}
-
- // Check if send or receive
- if (InteractionUtil.isSend(interaction)) {
-
- // TODO: Record variables against relevant interaction
- // based activity - probably only mechanism for
- // establishing message type
-
- if (InteractionUtil.isRequest(interaction)) {
-
- if (InteractionPatterns.isFaultHandlerRequired(interaction)) {
-
- Scope scope=new Scope(bpelModel);
-
- if (context.getParent() instanceof Sequence) {
- ((Sequence)context.getParent()).addActivity(scope, -1);
- }
-
- FaultHandlers fhs=new FaultHandlers(bpelModel);
-
- Sequence seq=new Sequence(bpelModel);
-
- scope.setActivity(seq);
- scope.setFaultHandlers(fhs);
-
- context.setParent(scope.getActivity());
- }
-
- act = new Invoke(bpelModel);
-
- pl.setPartnerRole(interaction.getToRole().getName()+"Requester");
- pl.setName(role.getName()+"To"+interaction.getToRole().getName());
-
- String plt=role.getName()+"To"+interaction.getToRole().getName()+"LT";
-
- if (mainPrefix != null) {
- plt = mainPrefix+":"+plt;
- }
-
- pl.setPartnerLinkType(plt);
-
- //portType = interaction.getToRole().getName()+"PT";
-
- if (varName != null) {
- ((Invoke)act).setInputVariable(varName);
- }
-
- } else {
- act = new Reply(bpelModel);
-
- pl.setMyRole(role.getName()+"Service");
- pl.setName(interaction.getToRole().getName()+"To"+role.getName());
-
- String plt=interaction.getToRole().getName()+"To"+role.getName()+"Service"+"LT";
-
- if (mainPrefix != null) {
- plt = mainPrefix+":"+plt;
- }
-
- pl.setPartnerLinkType(plt);
-
- //portType = role.getName()+"PT";
-
- if (InteractionPatterns.isFaultResponse(interaction)) {
- String faultName=InteractionPatterns.getFaultName(interaction);
-
- // Find namespace prefix
- //if (intf != null) {
- // String prefix=bpelModel.getBPELProcess().addNamespace(intf.getNamespace());
-
- if (prefix != null) {
- faultName = prefix+":"+faultName;
- }
- //}
-
- ((Reply)act).setFaultName(faultName);
- }
-
- if (varName != null) {
- ((Reply)act).setVariable(varName);
- }
- }
- } else if (InteractionPatterns.isResponseInFaultHandler(interaction) == false) {
-
- if (InteractionPatterns.isSyncNormalResponse(interaction)) {
-
- //System.out.println("ADD RESP VAR TO PRECEDING");
- if (context.getParent() instanceof Sequence) {
- java.util.List<BPELActivity> acts=
- ((Sequence)context.getParent()).getActivities();
-
- if (acts.size() > 0 &&
- acts.get(acts.size()-1) instanceof Invoke) {
- Invoke invoke=(Invoke)acts.get(acts.size()-1);
-
- invoke.setOutputVariable(varName);
- }
- }
-
- } else if (InteractionPatterns.isInteractionPickPathTrigger(interaction) == false) {
- act = new Receive(bpelModel);
-
- String intfName=(String)interaction.getAnnotations().get("interfaceName");
-
- if (intfName != null && intfName.trim().length() > 0) {
- intfName = javax.xml.namespace.QName.valueOf(intfName).getLocalPart();
- } else {
- intfName = role.getName();
- }
-
- if (InteractionUtil.isRequest(interaction)) {
-
- pl.setMyRole(intfName); //role.getName()+"Service");
- //pl.setPartnerRole(interaction.getToRole().getName());
- pl.setName(interaction.getFromRole().getName()+"To"+role.getName());
-
- String plt=interaction.getFromRole().getName()+"To"+role.getName()+"Service"+"LT";
-
- if (mainPrefix != null) {
- plt = mainPrefix+":"+plt;
- }
-
- pl.setPartnerLinkType(plt);
-
- //portType = role.getName()+"PT";
- } else {
- pl.setMyRole(intfName); //role.getName()+"Requester");
- pl.setPartnerRole(interaction.getFromRole().getName()+"Service");
- pl.setName(role.getName()+"To"+interaction.getFromRole().getName());
-
- String plt=role.getName()+"To"+interaction.getFromRole().getName()+"Requester"+"LT";
-
- if (mainPrefix != null) {
- plt = mainPrefix+":"+plt;
- }
-
- pl.setPartnerLinkType(plt);
-
- //portType = role.getName()+
- // interaction.getFromRole().getName()+"CallbackPT";
- }
-
- if (varName != null) {
- ((Receive)act).setVariable(varName);
- }
-
- // Check if create instance
- if (org.scribble.model.util.InteractionUtil.isInitialInteraction(interaction)) {
- ((Receive)act).setCreateInstance(true);
- }
- }
- }
-
- // TODO: Possibly if the channel is set, then
- // might be a callback channel, so could use
- // channel name to reflect callback port
-
- // TODO: If both myRole and partnerRole are specified
- // then one is a callback porttype
-
- if (act != null) {
-
- // Set the name
- act.setName(InteractionUtil.getName(interaction));
-
- if (context.getParent() instanceof Sequence) {
- ((Sequence)context.getParent()).addActivity(act, -1);
-
- ret = true;
- }
-
- // Create partner link
- PartnerLink other=
- bpelModel.getBPELProcess().getPartnerLink(pl.getName());
- if (other == null) {
- bpelModel.getBPELProcess().addPartnerLink(pl, -1);
- } else {
- if (other.getPartnerRole() == null &&
- pl.getPartnerRole() != null) {
- other.setPartnerRole(pl.getPartnerRole());
- }
- if (other.getMyRole() == null &&
- pl.getMyRole() != null) {
- other.setMyRole(pl.getMyRole());
- }
- }
-
- // Set details on interaction
- act.setPartnerLink(pl.getName());
-
- act.setPortType(portType);
-
- if (interaction.getMessageSignature() != null) {
- act.setOperation(interaction.getMessageSignature().getOperation());
- }
- }
-
- return(ret);
- }
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context)
- * and modified model object.
- *
- * @param context The context
- * @param model The model
- * @param fromObj The source model object
- * @param toObj The model object to be updated
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isUpdateSupported(ModelChangeContext context,
- Model model, ModelObject fromObj, ModelObject toObj) {
- boolean ret=false;
-
- if (fromObj instanceof ConversationInteraction &&
- toObj instanceof ConversationInteraction &&
- model instanceof BPELLanguageModel) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method modifies an existing model object, within a
- * parent model object, with the details supplied in
- * another model object.
- *
- * @param context The context
- * @param model The model being changed
- * @param fromObj The source model object
- * @param toObj The model object to be updated
- * @return Whether the change has been applied
- */
- @Override
- public boolean update(ModelChangeContext context,
- Model model, ModelObject fromObj, ModelObject toObj) {
- boolean ret=false;
- //BPELLanguageModel bpelModel=(BPELLanguageModel)model;
- //ConversationInteraction fromInteraction=(ConversationInteraction)fromObj;
- //ConversationInteraction toInteraction=(ConversationInteraction)toObj;
-
- return(ret);
- }
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context)
- * and deleted model object.
- *
- * @param context The context
- * @param model The model
- * @param mobj The model object to be removed
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isDeleteSupported(ModelChangeContext context,
- Model model, ModelObject mobj) {
- boolean ret=false;
-
- if (mobj instanceof ConversationInteraction &&
- super.isDeleteSupported(context, model, mobj)) {
- ret = true;
- }
-
- return(ret);
- }
-}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/IfModelChangeRule.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/IfModelChangeRule.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/IfModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,483 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.change;
-
-import javax.xml.namespace.QName;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.component.*;
-import org.savara.bpel.model.util.InteractionUtil;
-import org.savara.contract.model.Contract;
-import org.savara.contract.model.Interface;
-import org.savara.wsdl.util.WSDLGeneratorUtil;
-import org.scribble.protocol.model.*;
-import org.scribble.model.change.*;
-import org.scribble.extensions.RegistryInfo;
-
-/**
- * This is the model change rule for the If.
- */
- at RegistryInfo(extension=ModelChangeRule.class,notation=BPELNotation.NOTATION_CODE)
-public class IfModelChangeRule extends AbstractModelChangeRule {
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
- * model object.
- *
- * @param context The context
- * @param model The model
- * @param mobj The model object causing the change
- * @param ref The optional reference model object
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isInsertSupported(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- boolean ret=false;
-
- if (mobj instanceof org.scribble.conversation.model.If &&
- model instanceof DefaultBPELLanguageModel) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method adds a new model object, within a
- * parent model object, with the details supplied in
- * another model object. The supplied model object
- * will usually be from a different model representation
- * (e.g. due to a merge), so the details will be
- * copied and placed in the representation associated
- * with the supplied model and parent model object.<p>
- * <p>
- * If a reference model object is supplied, then the
- * insertion will occur relative to it. If the reference
- * object is a block, then it means that the insertion
- * should occur at the end of the block. Otherwise the
- * new model object should be inserted before the
- * reference object, within the containing block.<p>
- * <p>
- * If the reference object is not supplied, then the
- * new model object should be inserted at the end of
- * the behaviour associated with the parent in the model
- * change context.
- *
- * @param context The context
- * @param model The model being changed
- * @param mobj The model object details to be inserted
- * @param ref The optional reference model object
- * @return Whether the change has been applied
- */
- @Override
- public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- DefaultBPELLanguageModel bpelModel=(DefaultBPELLanguageModel)model;
- org.scribble.conversation.model.If elem=
- (org.scribble.conversation.model.If)mobj;
- java.util.List<Block> paths=elem.getPaths();
-
- // Check if the 'If' construct is to handle responses
- // to a preceding request being sent
- if (InteractionPatterns.isResponseAndFaultHandler(elem)) {
-
- if (context.getParent() instanceof Sequence) {
- // Find fault handler
- Sequence seq=(Sequence)context.getParent();
- Scope scope=new Scope(bpelModel,
- (org.w3c.dom.Element)seq.getDOMElement().getParentNode());
- FaultHandlers fh=scope.getFaultHandlers();
-
- for (int i=0; i < paths.size(); i++) {
- Block path=paths.get(i);
-
- if (path.getContents().size() > 0) {
- Activity act=path.getContents().get(0);
- Sequence subseq=null;
-
- if (act instanceof Interaction &&
- InteractionPatterns.isFaultResponse(
- (Interaction)act)) {
- String faultName=InteractionPatterns.getFaultName((Interaction)act);
-
- Contract contract = ModelChangeUtils.getContract(context,
- ((Interaction)act).getFromRole().getName());
-
- // Define fault message type
- QName qname= WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
- faultName);
-
- String faultVarName=qname.getLocalPart()+"Var";
- String mesgType=InteractionPatterns.getMessageTypeLocalPart((Interaction)act);
- //String namespace=InteractionPatterns.getMessageTypeNameSpace((Interaction)act);
-
- Catch c=new Catch(bpelModel);
- c.setFaultVariable(faultVarName);
-
- // Find namespace prefix
- if (qname != null) {
- String prefix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
-
- if (prefix != null) {
- mesgType = prefix+":"+qname.getLocalPart();
- faultName = prefix+":"+faultName;
- }
- }
-
- c.setFaultName(faultName);
- c.setFaultMessageType(mesgType);
-
- // Add catch to fault handler
- fh.addCatch(c);
-
- subseq = new Sequence(bpelModel);
- c.setActivity(subseq);
- } else {
- subseq = seq;
-
- java.util.List<BPELActivity> acts=
- ((Sequence)context.getParent()).getActivities();
-
- if (acts.size() > 0 && act instanceof Interaction &&
- acts.get(acts.size()-1) instanceof Invoke) {
- Contract contract = ModelChangeUtils.getContract(context,
- ((Interaction)act).getFromRole().getName());
-
- QName qname=null;
- if (InteractionUtil.isRequest((Interaction)act)) {
- qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
- ((Interaction)act).getMessageSignature().getOperation());
- } else if (InteractionPatterns.isFaultResponse((Interaction)act)) {
- qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
- InteractionPatterns.getFaultName((Interaction)act));
- } else {
- qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
- ((Interaction)act).getMessageSignature().getOperation());
- }
-
- String varName=qname.getLocalPart()+"Var"; //InteractionPatterns.getVariableName((Interaction)act);
- Invoke invoke=(Invoke)acts.get(acts.size()-1);
-
- invoke.setOutputVariable(varName);
-
- // Create variable
- if (varName != null) {
- createVariable(context, varName, (Interaction)act, bpelModel);
- }
- }
- }
-
- Object parent=context.getParent();
-
- context.setParent(subseq);
-
- for (int j=1; j < path.getContents().size(); j++) {
- context.insert(model, path.getContents().get(j), null);
- }
-
- context.setParent(parent);
- }
- }
- } else {
- // TODO: Error handling
- }
- } else if (InteractionPatterns.isSwitch(elem)) {
- Pick act=new Pick(bpelModel);
-
- if (context.getParent() instanceof Sequence) {
- ((Sequence)context.getParent()).addActivity(act, -1);
- }
-
- Role role=null;
-
- if (elem.getEnclosingDefinition() != null) {
- role = elem.getEnclosingDefinition().
- getLocatedName().getRole();
- }
-
- for (int i=0; i < paths.size(); i++) {
- Block path=paths.get(i);
-
- Sequence seq=new Sequence(bpelModel);
-
- // Process the activities within the conversation
- java.util.List<Activity> acts=path.getContents();
-
- Object parent=context.getParent();
-
- context.setParent(seq);
-
- for (int j=0; j < acts.size(); j++) {
- context.insert(model, acts.get(j), null);
- }
-
- context.setParent(parent);
-
- Interaction recv=InteractionPatterns.getPickPathInteraction(path);
-
- OnMessage onm=new OnMessage(bpelModel);
- onm.setActivity(seq);
-
- PartnerLink pl=new PartnerLink(bpelModel);
- String portType=null;
-
- String prevPLName=role.getName()+"To"+recv.getFromRole().getName();
-
- String mainPrefix=null;
-
- Contract contract=ModelChangeUtils.getContract(context, context.getRole().getName());
- if (contract != null) {
- mainPrefix = bpelModel.getBPELProcess().addNamespace(contract.getNamespace());
- }
-
- // Check if partner link already exists in
- // other direction
- PartnerLink prev=
- bpelModel.getBPELProcess().getPartnerLink(prevPLName);
-
- if (InteractionUtil.isRequest(recv) && prev == null) {
-
- pl.setMyRole(role.getName()+"Service");
- //pl.setPartnerRole(interaction.getToRole().getName());
- pl.setName(recv.getFromRole().getName()+"To"+role.getName());
-
- String plt=recv.getFromRole().getName()+"To"+role.getName()+"Service"+"LT";
-
- if (mainPrefix != null) {
- plt = mainPrefix+":"+plt;
- }
-
- pl.setPartnerLinkType(plt);
-
- contract = ModelChangeUtils.getContract(context, role.getName());
-
- if (contract != null && contract.getInterfaces().size() > 0) {
- Interface intf = contract.getInterfaces().iterator().next();
-
- portType = intf.getName();
-
- String prefix = bpelModel.getBPELProcess().addNamespace(intf.getNamespace());
-
- if (prefix != null) {
- portType = prefix+":"+portType;
- }
- }
- } else {
- pl.setMyRole(role.getName()+"Requester");
- pl.setPartnerRole(recv.getFromRole().getName()+"Service");
- pl.setName(role.getName()+"To"+recv.getFromRole().getName());
-
- String plt=role.getName()+"To"+recv.getFromRole().getName()+"Requester"+"LT";
-
- if (mainPrefix != null) {
- plt = mainPrefix+":"+plt;
- }
-
- pl.setPartnerLinkType(plt);
-
- //portType = role.getName()+
- // recv.getFromRole().getName()+"CallbackPT";
-
- contract = ModelChangeUtils.getContract(context, recv.getFromRole().getName());
- if (contract != null && contract.getInterfaces().size() > 0) {
- Interface intf = contract.getInterfaces().iterator().next();
-
- portType = intf.getName();
-
- String prefix = bpelModel.getBPELProcess().addNamespace(intf.getNamespace());
-
- if (prefix != null) {
- portType = prefix+":"+portType;
- }
- }
- }
-
- QName qname=null;
- if (InteractionUtil.isRequest(recv)) {
- qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
- recv.getMessageSignature().getOperation());
- } else if (InteractionPatterns.isFaultResponse(recv)) {
- qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
- InteractionPatterns.getFaultName(recv));
- } else {
- qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
- recv.getMessageSignature().getOperation());
- }
-
- String varName=qname.getLocalPart()+"Var"; //InteractionPatterns.getVariableName(recv);
-
- if (varName != null) {
- onm.setVariable(varName);
- }
-
- // Create partner link
- PartnerLink other=
- bpelModel.getBPELProcess().getPartnerLink(pl.getName());
-
- if (other == null) {
- bpelModel.getBPELProcess().addPartnerLink(pl, -1);
- } else {
- if (other.getPartnerRole() == null &&
- pl.getPartnerRole() != null) {
- other.setPartnerRole(pl.getPartnerRole());
- }
- if (other.getMyRole() == null &&
- pl.getMyRole() != null) {
- other.setMyRole(pl.getMyRole());
- }
- }
-
- // Create variable
- if (varName != null) {
- createVariable(context, varName, recv, bpelModel);
- }
-
- // Check if create instance
- if (org.scribble.model.util.InteractionUtil.isInitialInteraction(recv)) {
- act.setCreateInstance(true);
- }
-
- // Set details on interaction
- onm.setPartnerLink(pl.getName());
- onm.setPortType(portType);
-
- MessageSignature ms=recv.getMessageSignature();
- if (ms.getOperation() != null) {
- onm.setOperation(ms.getOperation());
- }
-
- act.addOnMessage(onm, -1);
- }
-
- } else {
- If act=new If(bpelModel);
-
- if (context.getParent() instanceof Sequence) {
- ((Sequence)context.getParent()).addActivity(act, -1);
- }
-
- for (int i=0; i < paths.size(); i++) {
- Block path=paths.get(i);
-
- Sequence seq=new Sequence(bpelModel);
-
- // Process the activities within the conversation
- java.util.List<Activity> acts=path.getContents();
-
- Object parent=context.getParent();
-
- context.setParent(seq);
-
- for (int j=0; j < acts.size(); j++) {
- context.insert(model, acts.get(j), null);
- }
-
- context.setParent(parent);
-
- if (i == 0) {
- act.setActivity(seq);
- } else if (i == elem.getPaths().size()-1) {
- Else construct=new Else(bpelModel);
- construct.setActivity(seq);
-
- act.setElsePath(construct);
- } else {
- Elseif construct=new Elseif(bpelModel);
-
- construct.setActivity(seq);
-
- act.addElseIfPath(construct);
- }
- }
- }
-
- return(true);
- }
-
- /**
- * This method creates a variable, if one does not already exist for the
- * supplied name, with the message type associated with the supplied
- * interaction.
- *
- * @param varName The variable name
- * @param interaction The interaction associated with the variable
- * @param bpelModel The BPEL model
- */
- protected void createVariable(ModelChangeContext context, String varName,
- Interaction interaction, BPELLanguageModel bpelModel) {
- org.savara.bpel.model.component.Variable var=
- bpelModel.getBPELProcess().getVariable(varName);
-
- if (var == null) {
- Role role=null;
-
- if (interaction.getEnclosingDefinition() != null) {
- role = interaction.getEnclosingDefinition().
- getLocatedName().getRole();
- }
-
- var = new org.savara.bpel.model.component.Variable(bpelModel);
- var.setName(varName);
-
- Role roleType=null;
- Contract contract=null;
-
- if (InteractionUtil.isRequest(interaction)) {
- roleType = interaction.getToRole();
- if (roleType == null) {
- roleType = role;
- }
- } else {
- roleType = interaction.getFromRole();
- if (roleType == null) {
- roleType = role;
- }
- }
-
- if (roleType != null) {
- contract = ModelChangeUtils.getContract(context, roleType.getName());
- }
-
- QName qname=null;
- if (InteractionUtil.isRequest(interaction)) {
- qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
- interaction.getMessageSignature().getOperation());
- } else {
- qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
- interaction.getMessageSignature().getOperation());
- }
-
- String mesgType=qname.getLocalPart();
-
- // Find namespace prefix
- if (qname.getNamespaceURI() != null) {
- String pfix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
-
- if (pfix != null) {
- mesgType = pfix+":"+mesgType;
- }
- }
-
- var.setMessageType(mesgType);
-
- bpelModel.getBPELProcess().addVariable(var, -1);
- }
- }
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/InteractionModelChangeRule.java (from rev 502, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/ConversationInteractionModelChangeRule.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/InteractionModelChangeRule.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/InteractionModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,470 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.change;
+
+import javax.xml.namespace.QName;
+
+import org.savara.bpel.model.util.*;
+import org.savara.bpel.model2.*;
+import org.savara.bpel.toprotocol.*;
+import org.savara.bpel.util.InteractionUtil;
+import org.savara.change.ModelChangeContext;
+import org.savara.contract.model.Contract;
+import org.savara.contract.model.Interface;
+import org.savara.wsdl.util.WSDLGeneratorUtil;
+import org.scribble.protocol.model.*;
+
+/**
+ * This is the model change rule for the Conversation Interaction.
+ */
+public class InteractionModelChangeRule extends AbstractBPELModelChangeRule {
+
+ private static final String INTERFACE_NAME = "interfaceName";
+
+ /**
+ * This method determines whether the rule is appropriate
+ * for the supplied type of model, parent (in the context) and inserted
+ * model object.
+ *
+ * @param context The context
+ * @param model The model
+ * @param mobj The model object being inserted
+ * @param ref The optional reference model object
+ * @return Whether the rule supports the supplied information
+ */
+ @Override
+ public boolean isInsertSupported(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj,
+ ModelObject ref) {
+ boolean ret=false;
+
+ if (mobj instanceof Interaction &&
+ super.isInsertSupported(context, model, mobj, ref)) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method adds a new model object, within a
+ * parent model object, with the details supplied in
+ * another model object. The supplied model object
+ * will usually be from a different model representation
+ * (e.g. due to a merge), so the details will be
+ * copied and placed in the representation associated
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
+ *
+ * @param context The context
+ * @param model The model being changed
+ * @param mobj The model object details to be inserted
+ * @param ref The optional reference model object
+ * @return Whether the change has been applied
+ */
+ @Override
+ public boolean insert(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ BPELLanguageModel bpelModel=(BPELLanguageModel)model;
+ Interaction interaction=(Interaction)mobj;
+ boolean ret=false;
+ AbstractInteraction act=null;
+ PartnerLink pl=new PartnerLink(bpelModel);
+ Role role=null;
+ String portType=null;
+ String varName=null; //InteractionPatterns.getVariableName(interaction);
+ Interface intf=null;
+
+ if (interaction.enclosingProtocol() != null) {
+ role = interaction.enclosingProtocol().getRole();
+ }
+
+ // Identify port type role
+ String prefix=null;
+
+ String mainPrefix=null;
+
+ Contract contract=ModelChangeUtils.getContract(context, context.getRole().getName());
+ if (contract != null) {
+ mainPrefix = bpelModel.getBPELProcess().addNamespace(contract.getNamespace());
+ }
+
+ Role roleType=null;
+
+ if (InteractionUtil.isRequest(interaction)) {
+ // TODO: What about if multiple 'to' roles
+ if (interaction.getToRoles().size() >= 1) {
+ roleType = interaction.getToRoles().get(0);
+ }
+ if (roleType == null) {
+ roleType = role;
+ }
+ } else {
+ roleType = interaction.getFromRole();
+ if (roleType == null) {
+ roleType = role;
+ }
+ }
+
+ if (roleType != null) {
+ contract = ModelChangeUtils.getContract(context, roleType.getName());
+
+ if (contract != null) {
+ if (interaction.getProperties().containsKey(INTERFACE_NAME)) {
+ String intfName=(String)interaction.getProperties().get(INTERFACE_NAME);
+ intf = contract.getInterface(intfName);
+
+ if (intf == null) {
+ // Try localpart
+ javax.xml.namespace.QName qname=javax.xml.namespace.QName.valueOf(intfName);
+ intf = contract.getInterface(qname.getLocalPart());
+ }
+ } else if (contract.getInterfaces().size() > 0) {
+ intf = contract.getInterfaces().iterator().next();
+ }
+ }
+ }
+
+ if (intf != null) {
+ portType = intf.getName();
+
+ prefix = bpelModel.getBPELProcess().addNamespace(intf.getNamespace());
+
+ if (prefix != null) {
+ portType = prefix+":"+portType;
+ }
+ }
+
+ // Create variable
+ //if (varName != null) {
+ QName qname=null;
+ if (InteractionUtil.isRequest(interaction)) {
+ qname = WSDLGeneratorUtil.getRequestMessageType(contract.getNamespace(),
+ interaction.getMessageSignature().getOperation());
+ } else if (InteractionPatterns.isFaultResponse(interaction)) {
+ qname = WSDLGeneratorUtil.getFaultMessageType(contract.getNamespace(),
+ InteractionPatterns.getFaultName(interaction));
+ } else {
+ qname = WSDLGeneratorUtil.getResponseMessageType(contract.getNamespace(),
+ interaction.getMessageSignature().getOperation());
+ }
+
+ varName = qname.getLocalPart()+"Var";
+
+ org.savara.bpel.toprotocol.Variable var=
+ bpelModel.getBPELProcess().getVariable(varName);
+
+ if (var == null) {
+ var = new org.savara.bpel.toprotocol.Variable(bpelModel);
+ var.setName(varName);
+
+ String mesgType=qname.getLocalPart();
+
+ // Find namespace prefix
+ if (qname.getNamespaceURI() != null) {
+ String pfix=bpelModel.getBPELProcess().addNamespace(qname.getNamespaceURI());
+
+ if (pfix != null) {
+ mesgType = pfix+":"+mesgType;
+ }
+ }
+
+ var.setMessageType(mesgType);
+
+ bpelModel.getBPELProcess().addVariable(var, -1);
+ }
+ //}
+
+ // Check if send or receive
+ if (InteractionUtil.isSend(interaction)) {
+
+ // TODO: Record variables against relevant interaction
+ // based activity - probably only mechanism for
+ // establishing message type
+
+ if (InteractionUtil.isRequest(interaction)) {
+
+ if (InteractionPatterns.isFaultHandlerRequired(interaction)) {
+
+ Scope scope=new Scope(bpelModel);
+
+ if (context.getParent() instanceof Sequence) {
+ ((Sequence)context.getParent()).addActivity(scope, -1);
+ }
+
+ FaultHandlers fhs=new FaultHandlers(bpelModel);
+
+ Sequence seq=new Sequence(bpelModel);
+
+ scope.setActivity(seq);
+ scope.setFaultHandlers(fhs);
+
+ context.setParent(scope.getActivity());
+ }
+
+ act = new Invoke(bpelModel);
+
+ // TODO: What about if multiple 'to' roles
+ pl.setPartnerRole(interaction.getToRoles().get(0).getName()+"Requester");
+ pl.setName(role.getName()+"To"+interaction.getToRoles().get(0).getName());
+
+ String plt=role.getName()+"To"+interaction.getToRoles().get(0).getName()+"LT";
+
+ if (mainPrefix != null) {
+ plt = mainPrefix+":"+plt;
+ }
+
+ pl.setPartnerLinkType(plt);
+
+ //portType = interaction.getToRole().getName()+"PT";
+
+ if (varName != null) {
+ ((Invoke)act).setInputVariable(varName);
+ }
+
+ } else {
+ act = new Reply(bpelModel);
+
+ // TODO: What about if multiple 'to' roles
+ pl.setMyRole(role.getName()+"Service");
+ pl.setName(interaction.getToRoles().get(0).getName()+"To"+role.getName());
+
+ String plt=interaction.getToRoles().get(0)+"To"+role.getName()+"Service"+"LT";
+
+ if (mainPrefix != null) {
+ plt = mainPrefix+":"+plt;
+ }
+
+ pl.setPartnerLinkType(plt);
+
+ //portType = role.getName()+"PT";
+
+ if (InteractionPatterns.isFaultResponse(interaction)) {
+ String faultName=InteractionPatterns.getFaultName(interaction);
+
+ // Find namespace prefix
+ //if (intf != null) {
+ // String prefix=bpelModel.getBPELProcess().addNamespace(intf.getNamespace());
+
+ if (prefix != null) {
+ faultName = prefix+":"+faultName;
+ }
+ //}
+
+ ((Reply)act).setFaultName(faultName);
+ }
+
+ if (varName != null) {
+ ((Reply)act).setVariable(varName);
+ }
+ }
+ } else if (InteractionPatterns.isResponseInFaultHandler(interaction) == false) {
+
+ if (InteractionPatterns.isSyncNormalResponse(interaction)) {
+
+ //System.out.println("ADD RESP VAR TO PRECEDING");
+ if (context.getParent() instanceof Sequence) {
+ java.util.List<BPELActivity> acts=
+ ((Sequence)context.getParent()).getActivities();
+
+ if (acts.size() > 0 &&
+ acts.get(acts.size()-1) instanceof Invoke) {
+ Invoke invoke=(Invoke)acts.get(acts.size()-1);
+
+ invoke.setOutputVariable(varName);
+ }
+ }
+
+ } else if (InteractionPatterns.isInteractionPickPathTrigger(interaction) == false) {
+ act = new Receive(bpelModel);
+
+ String intfName=(String)interaction.getProperties().get("interfaceName");
+
+ if (intfName != null && intfName.trim().length() > 0) {
+ intfName = javax.xml.namespace.QName.valueOf(intfName).getLocalPart();
+ } else {
+ intfName = role.getName();
+ }
+
+ if (InteractionUtil.isRequest(interaction)) {
+
+ pl.setMyRole(intfName); //role.getName()+"Service");
+ //pl.setPartnerRole(interaction.getToRole().getName());
+ pl.setName(interaction.getFromRole().getName()+"To"+role.getName());
+
+ String plt=interaction.getFromRole().getName()+"To"+role.getName()+"Service"+"LT";
+
+ if (mainPrefix != null) {
+ plt = mainPrefix+":"+plt;
+ }
+
+ pl.setPartnerLinkType(plt);
+
+ //portType = role.getName()+"PT";
+ } else {
+ pl.setMyRole(intfName); //role.getName()+"Requester");
+ pl.setPartnerRole(interaction.getFromRole().getName()+"Service");
+ pl.setName(role.getName()+"To"+interaction.getFromRole().getName());
+
+ String plt=role.getName()+"To"+interaction.getFromRole().getName()+"Requester"+"LT";
+
+ if (mainPrefix != null) {
+ plt = mainPrefix+":"+plt;
+ }
+
+ pl.setPartnerLinkType(plt);
+
+ //portType = role.getName()+
+ // interaction.getFromRole().getName()+"CallbackPT";
+ }
+
+ if (varName != null) {
+ ((Receive)act).setVariable(varName);
+ }
+
+ // Check if create instance
+ if (org.scribble.protocol.util.InteractionUtil.isInitialInteraction(interaction.getModel(), interaction)) {
+ ((Receive)act).setCreateInstance(true);
+ }
+ }
+ }
+
+ // TODO: Possibly if the channel is set, then
+ // might be a callback channel, so could use
+ // channel name to reflect callback port
+
+ // TODO: If both myRole and partnerRole are specified
+ // then one is a callback porttype
+
+ if (act != null) {
+
+ // Set the name
+ act.setName(InteractionUtil.getName(interaction));
+
+ if (context.getParent() instanceof Sequence) {
+ ((Sequence)context.getParent()).addActivity(act, -1);
+
+ ret = true;
+ }
+
+ // Create partner link
+ PartnerLink other=
+ bpelModel.getBPELProcess().getPartnerLink(pl.getName());
+ if (other == null) {
+ bpelModel.getBPELProcess().addPartnerLink(pl, -1);
+ } else {
+ if (other.getPartnerRole() == null &&
+ pl.getPartnerRole() != null) {
+ other.setPartnerRole(pl.getPartnerRole());
+ }
+ if (other.getMyRole() == null &&
+ pl.getMyRole() != null) {
+ other.setMyRole(pl.getMyRole());
+ }
+ }
+
+ // Set details on interaction
+ act.setPartnerLink(pl.getName());
+
+ act.setPortType(portType);
+
+ if (interaction.getMessageSignature() != null) {
+ act.setOperation(interaction.getMessageSignature().getOperation());
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method determines whether the rule is appropriate
+ * for the supplied type of model, parent (in the context)
+ * and modified model object.
+ *
+ * @param context The context
+ * @param model The model
+ * @param fromObj The source model object
+ * @param toObj The model object to be updated
+ * @return Whether the rule supports the supplied information
+ */
+ @Override
+ public boolean isUpdateSupported(ModelChangeContext context,
+ ProtocolModel model, ModelObject fromObj, ModelObject toObj) {
+ boolean ret=false;
+
+ if (fromObj instanceof Interaction &&
+ toObj instanceof Interaction && isBPELModel(model)) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method modifies an existing model object, within a
+ * parent model object, with the details supplied in
+ * another model object.
+ *
+ * @param context The context
+ * @param model The model being changed
+ * @param fromObj The source model object
+ * @param toObj The model object to be updated
+ * @return Whether the change has been applied
+ */
+ @Override
+ public boolean update(ModelChangeContext context,
+ ProtocolModel model, ModelObject fromObj, ModelObject toObj) {
+ boolean ret=false;
+
+ return(ret);
+ }
+
+ /**
+ * This method determines whether the rule is appropriate
+ * for the supplied type of model, parent (in the context)
+ * and deleted model object.
+ *
+ * @param context The context
+ * @param model The model
+ * @param mobj The model object to be removed
+ * @return Whether the rule supports the supplied information
+ */
+ @Override
+ public boolean isDeleteSupported(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj) {
+ boolean ret=false;
+
+ if (mobj instanceof Interaction &&
+ super.isDeleteSupported(context, model, mobj)) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+}
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/InteractionPatterns.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/InteractionPatterns.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/InteractionPatterns.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -15,11 +15,10 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
-package org.savara.bpel.model.change;
+package org.savara.bpel.change;
-import org.savara.bpel.model.util.InteractionUtil;
+import org.savara.bpel.util.InteractionUtil;
import org.scribble.protocol.model.*;
-import org.scribble.conversation.model.*;
/**
* This class provides utility functions for detecting
@@ -40,32 +39,32 @@
* @return Whether the interaction is a request requiring
* an outer fault handler
*/
- public static boolean isFaultHandlerRequired(org.scribble.model.Interaction interaction) {
+ public static boolean isFaultHandlerRequired(org.scribble.protocol.model.Interaction interaction) {
boolean ret=false;
// Check if interaction is an invoke, and followed
// by a choice representing a normal and multiple
// fault responses
if (InteractionUtil.isRequest(interaction) &&
- interaction.getRequestLabel() != null) {
+ getRequestLabel(interaction) != null) {
if (interaction.getParent() instanceof
- org.scribble.model.Block) {
- org.scribble.model.Block block=
- (org.scribble.model.Block)interaction.getParent();
+ org.scribble.protocol.model.Block) {
+ org.scribble.protocol.model.Block block=
+ (org.scribble.protocol.model.Block)interaction.getParent();
int pos=block.getContents().indexOf(interaction);
if (pos != -1 && pos < block.getContents().size()-1) {
- org.scribble.model.Activity act=
+ org.scribble.protocol.model.Activity act=
block.getContents().get(pos+1);
- if (act instanceof org.scribble.conversation.model.If) {
+ if (act instanceof org.scribble.protocol.model.Choice) {
// Need to check if each path receives a
// response (normal and fault)
- org.scribble.conversation.model.If choice=
- (org.scribble.conversation.model.If)act;
+ org.scribble.protocol.model.Choice choice=
+ (org.scribble.protocol.model.Choice)act;
if (choice.getPaths().size() > 0) {
ret = true;
@@ -74,7 +73,7 @@
for (int i=0; ret &&
i < choice.getPaths().size(); i++) {
- org.scribble.model.Block path=
+ org.scribble.protocol.model.Block path=
choice.getPaths().get(i);
if (path.getContents().size() == 0 ||
@@ -99,42 +98,41 @@
// Methods need to return (and set) the relevant sequence
// to use for subsequent activities.
- public static boolean isResponseAndFaultHandler(If choice) {
+ public static boolean isResponseAndFaultHandler(Choice choice) {
boolean ret=false;
// Obtain interaction prior to 'If'
if (choice.getPaths().size() > 0 &&
choice.getParent() instanceof
- org.scribble.model.Block) {
- org.scribble.model.Block block=
- (org.scribble.model.Block)choice.getParent();
+ org.scribble.protocol.model.Block) {
+ org.scribble.protocol.model.Block block=
+ (org.scribble.protocol.model.Block)choice.getParent();
int pos=block.getContents().indexOf(choice);
if (pos != -1 && pos > 0) {
- org.scribble.model.Activity act=
+ org.scribble.protocol.model.Activity act=
block.getContents().get(pos-1);
if (act instanceof Interaction &&
InteractionUtil.isSend((Interaction)act) &&
InteractionUtil.isRequest((Interaction)act) &&
- ((Interaction)act).getRequestLabel() != null) {
+ getRequestLabel((Interaction)act) != null) {
// Check if each path has a response/fault associated
// with the preceding request
- String requestLabel=
- ((Interaction)act).getRequestLabel();
+ String requestLabel=getRequestLabel((Interaction)act);
- java.util.List<Block> paths=choice.getPaths();
+ java.util.List<When> paths=choice.getWhens();
int matched=0;
for (int i=0; i < paths.size(); i++) {
- if (paths.get(i).getContents().size() > 0) {
- Interaction in=getPickPathInteraction(paths.get(i));
+ if (paths.get(i).getBlock().getContents().size() > 0) {
+ Interaction in=getPickPathInteraction(paths.get(i).getBlock());
if (in != null &&
InteractionUtil.isResponse(in) &&
- in.getReplyToLabel().equals(requestLabel)) {
+ getReplyToLabel(in).equals(requestLabel)) {
matched++;
}
}
@@ -166,18 +164,18 @@
// updated to reflect any changes to that method
if (path.getContents().size() > 0) {
- org.scribble.model.Activity sub=
+ org.scribble.protocol.model.Activity sub=
path.getContents().get(0);
// Check if scope
- if (sub instanceof Compose) {
- Definition defn=((Compose)sub).getDefinition();
- org.scribble.model.Behaviour b=null;
+ if (sub instanceof Run) {
+ Protocol defn=((Run)sub).getProtocol();
+ org.scribble.protocol.model.Behaviour b=null;
for (int j=0; b == null &&
j < defn.getBlock().getContents().size(); j++) {
- if (defn.getBlock().getContents().get(j) instanceof org.scribble.model.Behaviour) {
- b = (org.scribble.model.Behaviour)
+ if (defn.getBlock().getContents().get(j) instanceof org.scribble.protocol.model.Behaviour) {
+ b = (org.scribble.protocol.model.Behaviour)
defn.getBlock().getContents().get(j);
}
}
@@ -211,28 +209,35 @@
Block path=(Block)in.getParent();
- if (path.getParent() instanceof If &&
- InteractionPatterns.isSwitch((If)path.getParent())) {
+ if (path.getParent() instanceof Choice &&
+ InteractionPatterns.isSwitch((Choice)path.getParent())) {
ret = true;
// Check if receive is directly contained within a
// sub-definition
} else if (InteractionUtil.isSend(in) == false &&
- path.getParent() instanceof org.scribble.model.Definition &&
+ path.getParent() instanceof org.scribble.protocol.model.Protocol &&
path.getParent().getParent() instanceof Block &&
path.getParent().getParent().getParent() instanceof
- org.scribble.model.Definition) {
+ org.scribble.protocol.model.Protocol) {
ret = true;
}
return(ret);
}
- public static boolean isSwitch(If choice) {
+ public static boolean isSwitch(Choice choice) {
boolean ret=false;
+ // For a choice to be considered a 'switch', it only needs
+ // to be a receiver
+ if (choice.getFromRole() != null && choice.getToRole() == null) {
+ ret = true;
+ }
+
+ /*
if (choice.getPaths().size() > 0) {
- java.util.List<Block> paths=choice.getPaths();
+ java.util.List<When> paths=choice.getWhens();
int matched=0;
for (int i=0; i < paths.size(); i++) {
@@ -250,6 +255,7 @@
ret = true;
}
}
+ */
return(ret);
}
@@ -258,31 +264,31 @@
Interaction ret=null;
if (InteractionUtil.isRequest(interaction) == false &&
- interaction.getReplyToLabel() != null) {
+ getReplyToLabel(interaction) != null) {
// Find if contained in 'if' path
if (interaction.getParent() instanceof Block &&
- interaction.getParent().getParent() instanceof If) {
+ interaction.getParent().getParent() instanceof Choice) {
- If choice=(If)interaction.getParent().getParent();
+ Choice choice=(Choice)interaction.getParent().getParent();
// Obtain interaction prior to 'If'
if (choice.getParent() instanceof
- org.scribble.model.Block) {
- org.scribble.model.Block block=
- (org.scribble.model.Block)choice.getParent();
+ org.scribble.protocol.model.Block) {
+ org.scribble.protocol.model.Block block=
+ (org.scribble.protocol.model.Block)choice.getParent();
int pos=block.getContents().indexOf(choice);
if (pos != -1 && pos > 0) {
- org.scribble.model.Activity act=
+ org.scribble.protocol.model.Activity act=
block.getContents().get(pos-1);
if (act instanceof Interaction &&
InteractionUtil.isRequest((Interaction)act) &&
- ((Interaction)act).getRequestLabel() != null &&
- interaction.getReplyToLabel().equals(
- ((Interaction)act).getRequestLabel())) {
+ getRequestLabel((Interaction)act) != null &&
+ getReplyToLabel(interaction).equals(
+ getRequestLabel((Interaction)act))) {
ret = (Interaction)act;
}
}
@@ -301,7 +307,7 @@
boolean ret=false;
if (InteractionUtil.isRequest(interaction) == false &&
- interaction.getMessageSignature().getAnnotations().
+ interaction.getMessageSignature().getProperties().
keySet().contains(FAULT_NAME)) {
ret = true;
}
@@ -309,19 +315,36 @@
return(ret);
}
+ public static boolean isFaultResponse(When interaction) {
+ boolean ret=false;
+
+ if (InteractionUtil.isRequest(interaction) == false &&
+ interaction.getMessageSignature().getProperties().
+ keySet().contains(FAULT_NAME)) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
public static String getFaultName(Interaction interaction) {
return((String)interaction.
- getMessageSignature().getAnnotations().get(FAULT_NAME));
+ getMessageSignature().getProperties().get(FAULT_NAME));
}
+ public static String getFaultName(When interaction) {
+ return((String)interaction.
+ getMessageSignature().getProperties().get(FAULT_NAME));
+ }
+
public static String getMessageTypeLocalPart(Interaction interaction) {
return((String)interaction.
- getMessageSignature().getAnnotations().get(MESSAGE_TYPE_LOCALPART));
+ getMessageSignature().getProperties().get(MESSAGE_TYPE_LOCALPART));
}
public static String getMessageTypeNameSpace(Interaction interaction) {
return((String)interaction.
- getMessageSignature().getAnnotations().get(MESSAGE_TYPE_NAMESPACE));
+ getMessageSignature().getProperties().get(MESSAGE_TYPE_NAMESPACE));
}
/*
@@ -372,11 +395,27 @@
if (InteractionUtil.isRequest(req) &&
InteractionUtil.isResponse(resp) &&
- resp.getReplyToLabel().equals(
- req.getRequestLabel())) {
+ getReplyToLabel(resp).equals(
+ getRequestLabel(req))) {
ret = true;
}
return(ret);
}
+
+ public static String getRequestLabel(Interaction interaction) {
+ return((String)interaction.getProperties().get("RequestLabel"));
+ }
+
+ public static String getReplyToLabel(Interaction interaction) {
+ return((String)interaction.getProperties().get("ReplyToLabel"));
+ }
+
+ public static String getRequestLabel(When interaction) {
+ return((String)interaction.getProperties().get("RequestLabel"));
+ }
+
+ public static String getReplyToLabel(When interaction) {
+ return((String)interaction.getProperties().get("ReplyToLabel"));
+ }
}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/LanguageToConversationModelChangeRule.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/LanguageToConversationModelChangeRule.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/LanguageToConversationModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,100 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.change;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.model.change.*;
-import org.scribble.conversation.model.*;
-import org.scribble.extensions.RegistryInfo;
-
-/**
- * This is the model change rule for the Language Model to
- * Conversation Model.
- */
- at RegistryInfo(extension=ModelChangeRule.class,notation=BPELNotation.NOTATION_CODE)
-public class LanguageToConversationModelChangeRule extends AbstractModelChangeRule {
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and inserted
- * model object.
- *
- * @param context The context
- * @param model The model
- * @param mobj The model object being inserted
- * @param ref The optional reference model object
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isInsertSupported(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- boolean ret=false;
-
- if (mobj instanceof ConversationModel &&
- model instanceof BPELLanguageModel) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method adds a new model object, within a
- * parent model object, with the details supplied in
- * another model object. The supplied model object
- * will usually be from a different model representation
- * (e.g. due to a merge), so the details will be
- * copied and placed in the representation associated
- * with the supplied model and parent model object.<p>
- * <p>
- * If a reference model object is supplied, then the
- * insertion will occur relative to it. If the reference
- * object is a block, then it means that the insertion
- * should occur at the end of the block. Otherwise the
- * new model object should be inserted before the
- * reference object, within the containing block.<p>
- * <p>
- * If the reference object is not supplied, then the
- * new model object should be inserted at the end of
- * the behaviour associated with the parent in the model
- * change context.
- *
- * @param context The context
- * @param model The model being changed
- * @param mobj The model object details to be inserted
- * @param ref The optional reference model object
- * @return Whether the change has been applied
- */
- @Override
- public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- ConversationModel cm=(ConversationModel)mobj;
-
- if (cm.getConversation() != null) {
- ModelChangeUtils.addContracts(context, cm.getConversation(), true);
-
- context.insert(model, cm.getConversation(), null);
-
- ModelChangeUtils.removeContracts(context, cm.getConversation(), true);
- }
-
- return(true);
- }
-
-}
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ModelChangeUtils.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/ModelChangeUtils.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ModelChangeUtils.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -15,12 +15,11 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
-package org.savara.bpel.model.change;
+package org.savara.bpel.change;
+import org.savara.change.ModelChangeContext;
import org.savara.contract.model.Contract;
import org.scribble.protocol.model.*;
-import org.scribble.model.change.*;
-import org.scribble.conversation.model.*;
/**
* Model change utilities.
@@ -36,7 +35,7 @@
* @param root Whether this is the root conversation
*/
@SuppressWarnings("unchecked")
- public static void addContracts(ModelChangeContext context, Conversation conv, boolean root) {
+ public static void addContracts(ModelChangeContext context, Protocol conv, boolean root) {
java.util.Map<String,Contract> contracts=(java.util.Map<String,Contract>)
context.getProperties().get(Contract.class.getName());
@@ -47,8 +46,8 @@
context.getProperties().put(Contract.class.getName(), contracts);
}
- if (conv.getLocatedName().getRole() != null && root) {
- addRoleContract(conv.getLocatedName().getRole(), contracts);
+ if (conv.getRole() != null && root) {
+ addRoleContract(conv.getRole(), contracts);
}
// Get list of roles
@@ -63,17 +62,17 @@
// Would be better to incrementally add contracts for roles, as defined
// in their own scope, but need to refactor how blocks are dealt with
// first - which is different in some cases, so not straightforward.
- protected static java.util.List<Role> getRoles(final Conversation conv) {
+ protected static java.util.List<Role> getRoles(final Protocol conv) {
final java.util.List<Role> roles=new java.util.Vector<Role>();
- conv.visit(new Visitor() {
+ conv.visit(new AbstractModelObjectVisitor() {
- public boolean visit(ModelObject obj) {
+ public boolean process(ModelObject obj) {
boolean ret=true;
if (obj instanceof RoleList) {
roles.addAll(((RoleList)obj).getRoles());
- } else if (obj instanceof Conversation &&
+ } else if (obj instanceof Protocol &&
obj != conv) {
ret = false;
}
@@ -92,9 +91,9 @@
* @param contracts The map of roles to contracts
*/
protected static void addRoleContract(Role role, java.util.Map<String,Contract> contracts) {
- if (role != null && role.getAnnotations().containsKey(Contract.class.getName())) {
+ if (role != null && role.getProperties().containsKey(Contract.class.getName())) {
contracts.put(role.getName(),
- (Contract)role.getAnnotations().get(Contract.class.getName()));
+ (Contract)role.getProperties().get(Contract.class.getName()));
}
}
@@ -105,7 +104,7 @@
* @param contracts The map of roles to contracts
*/
protected static void removeRoleContract(Role role, java.util.Map<String,Contract> contracts) {
- if (role != null && role.getAnnotations().containsKey(Contract.class.getName())) {
+ if (role != null && role.getProperties().containsKey(Contract.class.getName())) {
contracts.remove(role.getName());
}
}
@@ -119,15 +118,15 @@
* @param root Whether this is the root conversation
*/
@SuppressWarnings("unchecked")
- public static void removeContracts(ModelChangeContext context, Conversation conv, boolean root) {
+ public static void removeContracts(ModelChangeContext context, Protocol conv, boolean root) {
java.util.Map<String,Contract> contracts=(java.util.Map<String,Contract>)
context.getProperties().get(Contract.class.getName());
if (contracts != null) {
- if (conv.getLocatedName().getRole() != null && root) {
- removeRoleContract(conv.getLocatedName().getRole(), contracts);
+ if (conv.getRole() != null && root) {
+ removeRoleContract(conv.getRole(), contracts);
}
// Get list of roles
@@ -170,22 +169,25 @@
*/
@SuppressWarnings("unchecked")
public static void pushRoleContractMapping(ModelChangeContext context,
- Compose run) {
+ Run run) {
if (context.getProperties().containsKey(Contract.class.getName())) {
java.util.Map<String,Contract> contracts=
(java.util.Map<String,Contract>)
context.getProperties().get(Contract.class.getName());
- if (run.getEnclosingDefinition().getLocatedName().getRole() != null &&
- run.getDefinition().getLocatedName().getRole() != null) {
- Contract c=contracts.remove(run.getEnclosingDefinition().getLocatedName().getRole().getName());
+ if (run.enclosingProtocol().getRole() != null &&
+ run.getProtocol().getRole() != null) {
+ Contract c=contracts.remove(run.enclosingProtocol().getRole().getName());
if (c != null) {
- contracts.put(run.getDefinition().getLocatedName().getRole().getName(), c);
+ contracts.put(run.getProtocol().getRole().getName(), c);
}
}
-
+
+ /* GPB: NEED TO CONSIDER HOW ROLES/CONTRACTS WILL BE BOUND USING
+ * POSITIONAL INFO.
+ *
for (DeclarationBinding db : run.getBindings()) {
if (db.getDeclaration() instanceof Role) {
Contract c=contracts.remove(db.getDeclaration().getName());
@@ -195,7 +197,7 @@
}
}
}
-
+ */
}
}
@@ -208,22 +210,25 @@
*/
@SuppressWarnings("unchecked")
public static void popRoleContractMapping(ModelChangeContext context,
- Compose run) {
+ Run run) {
if (context.getProperties().containsKey(Contract.class.getName())) {
java.util.Map<String,Contract> contracts=
(java.util.Map<String,Contract>)
context.getProperties().get(Contract.class.getName());
- if (run.getEnclosingDefinition().getLocatedName().getRole() != null &&
- run.getDefinition().getLocatedName().getRole() != null) {
- Contract c=contracts.remove(run.getDefinition().getLocatedName().getRole().getName());
+ if (run.enclosingProtocol().getRole() != null &&
+ run.getProtocol().getRole() != null) {
+ Contract c=contracts.remove(run.getProtocol().getRole().getName());
if (c != null) {
- contracts.put(run.getEnclosingDefinition().getLocatedName().getRole().getName(), c);
+ contracts.put(run.enclosingProtocol().getRole().getName(), c);
}
}
+ /* GPB: NEED TO CONSIDER HOW ROLES/CONTRACTS WILL BE BOUND USING
+ * POSITIONAL INFO.
+ *
for (DeclarationBinding db : run.getBindings()) {
if (db.getDeclaration() instanceof Role) {
Contract c=contracts.remove(db.getBoundName());
@@ -233,7 +238,7 @@
}
}
}
-
+ */
}
}
}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ProtocolModelChangeRule.java (from rev 502, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/ConversationChangeRule.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ProtocolModelChangeRule.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ProtocolModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,246 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.change;
+
+import org.savara.bpel.generator.GeneratorUtil;
+import org.savara.bpel.model.TImport;
+import org.savara.bpel.model.TProcess;
+import org.savara.bpel.model.TScope;
+import org.savara.bpel.model.TSequence;
+import org.savara.bpel.model2.*;
+import org.savara.bpel.toprotocol.*;
+import org.savara.change.AbstractModelChangeRule;
+import org.savara.change.ModelChangeContext;
+import org.savara.contract.model.Contract;
+import org.savara.contract.model.Interface;
+import org.scribble.protocol.model.*;
+
+/**
+ * This is the model change rule for the Conversation.
+ */
+public class ProtocolModelChangeRule extends AbstractBPELModelChangeRule {
+
+ //private static final String NAME_SUFFIX = "_main";
+
+ /**
+ * This method determines whether the rule is appropriate
+ * for the supplied type of model, parent (in the context) and
+ * model object.
+ *
+ * @param context The context
+ * @param model The model
+ * @param mobj The model object causing the change
+ * @param ref The optional reference model object
+ * @return Whether the rule supports the supplied information
+ */
+ public boolean isInsertSupported(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ boolean ret=false;
+
+ if (mobj instanceof Protocol && isBPELModel(model)) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method adds a new model object, within a
+ * parent model object, with the details supplied in
+ * another model object. The supplied model object
+ * will usually be from a different model representation
+ * (e.g. due to a merge), so the details will be
+ * copied and placed in the representation associated
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
+ *
+ * @param context The context
+ * @param model The model being changed
+ * @param mobj The model object details to be inserted
+ * @param ref The optional reference model object
+ * @return Whether the change has been applied
+ */
+ public boolean insert(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ TProcess bpelModel=getBPELModel(model);
+ Protocol conv=(Protocol)mobj;
+ String roleNamespace=null;
+
+ TSequence seq=new TSequence();
+
+ // Check if root conversation
+ if (conv.getParent() instanceof ProtocolModel) {
+
+ // Set the name of the process
+ bpelModel.setName(conv.getName()+"_"+
+ conv.getRole().getName());
+
+ // Get contract
+ Contract contract=ModelChangeUtils.getContract(context, conv.getRole().getName());
+
+ if (contract != null) {
+ roleNamespace = contract.getNamespace();
+
+ // Set namespace
+ bpelModel.setTargetNamespace(contract.getNamespace());
+
+ /** GPB: NEED TO ESTABLISH NAMESPACE PREFIXES
+ *
+ *
+ // Add other namespaces
+ for (org.savara.contract.model.Namespace ns : contract.getNamespaces()) {
+ bpelModel.initNamespace(ns.getURI(), ns.getPrefix());
+ }
+ */
+ }
+
+ /*
+ String namespace="** GPB: NEED TO GET NAMESPACE FROM PROTOCOL MODEL **";
+
+ String ctype=null;
+
+ // Check if conversation has a 'conforms to' reference
+ if (conv.getConformsTo().size() > 0) {
+ // Set conversation type based on first 'conforms to'
+ // reference
+ ConformanceReference cref=conv.getConformsTo().get(0);
+
+ ctype = cref.getNamespace()+"."+
+ cref.getLocalpart()+"@"+
+ cref.getLocatedRole();
+ } else {
+ // Set conversation type based on conversation
+ // namespace and name
+ ctype = namespace+"."+
+ conv.getLocatedName().getName()+"@"+
+ conv.getLocatedName().getRole().getName();
+ }
+
+ if (ctype != null) {
+ bpelModel.getBPELProcess().setConversationType(ctype);
+ }
+ */
+
+ // Add import for this role
+ addImport(context, bpelModel, conv, context.getRole());
+
+ // Add import statements for partner roles
+ java.util.List<Role> roles=conv.getRoles();
+
+ for (int i=0; i < roles.size(); i++) {
+ addImport(context, bpelModel, conv, roles.get(i));
+ }
+
+ // Add import for partner link types
+ TImport imp=new TImport();
+ imp.setLocation(bpelModel.getName()+"Artifacts.wsdl");
+ imp.setNamespace(roleNamespace);
+ imp.setImportType("http://schemas.xmlsoap.org/wsdl/");
+
+ bpelModel.getImport().add(imp);
+
+ // Add sequence to model
+ bpelModel.setSequence(seq);
+
+ } else if (context.getParent() instanceof TSequence) {
+
+ // Create a scope
+ TScope scope=new TScope();
+
+ ((TSequence)context.getParent()).getActivity().add(scope);
+
+ // NOTE: Currently needs to be added after adding scope
+ // to parent sequence, as otherwise the DOM element
+ // associated with the 'seq' sequence becomes
+ // disconnected from the actual document - due to
+ // the fact that added elements are copied (in
+ // turn due to an xml parser exception).
+ scope.setSequence(seq);
+ }
+
+ // Process the activities within the conversation
+ java.util.List<Activity> acts=conv.getBlock().getContents();
+
+ Object parent=context.getParent();
+
+ context.setParent(seq);
+
+ for (int i=0; i < acts.size(); i++) {
+ //if ((acts.get(i) instanceof Definition) == false) {
+ context.insert(model, acts.get(i), null);
+ //}
+ }
+
+ // Reset old parent
+ context.setParent(parent);
+
+ return(true);
+ }
+
+ /**
+ * This method adds an import statement for the contract associated with the
+ * supplied role.
+ *
+ * @param context The context
+ * @param bpelModel The model
+ * @param conv The conversation
+ * @param role The role
+ */
+ protected void addImport(ModelChangeContext context, TProcess bpelModel,
+ Protocol conv, Role role) {
+ if (role.getProperties().containsKey(Contract.class.getName())) {
+ Contract contract=(Contract)role.getProperties().get(Contract.class.getName());
+
+ boolean gen=false;
+
+ java.util.Iterator<Interface> iter=contract.getInterfaces().iterator();
+
+ while (gen == false && iter.hasNext()) {
+ Interface intf=iter.next();
+
+ if (intf.getMessageExchangePatterns().size() > 0) {
+ gen = true;
+ }
+ }
+
+ if (gen) {
+ String fileName=GeneratorUtil.getWSDLFileName(role,
+ conv.getName(), "");
+
+ TImport imp=new TImport();
+
+ imp.setLocation(fileName);
+ imp.setNamespace(contract.getNamespace());
+ imp.setImportType("http://schemas.xmlsoap.org/wsdl/");
+
+ bpelModel.getImport().add(imp);
+ }
+ }
+ }
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ProtocolModelModelChangeRule.java (from rev 502, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/LanguageToConversationModelChangeRule.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ProtocolModelModelChangeRule.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/ProtocolModelModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,95 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.change;
+
+import org.savara.change.ModelChangeContext;
+import org.scribble.protocol.model.*;
+
+/**
+ * This is the model change rule for the Language Model to
+ * Conversation Model.
+ */
+public class ProtocolModelModelChangeRule extends AbstractBPELModelChangeRule {
+
+ /**
+ * This method determines whether the rule is appropriate
+ * for the supplied type of model, parent (in the context) and inserted
+ * model object.
+ *
+ * @param context The context
+ * @param model The model
+ * @param mobj The model object being inserted
+ * @param ref The optional reference model object
+ * @return Whether the rule supports the supplied information
+ */
+ @Override
+ public boolean isInsertSupported(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ boolean ret=false;
+
+ if (mobj instanceof ProtocolModel && isBPELModel(model)) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method adds a new model object, within a
+ * parent model object, with the details supplied in
+ * another model object. The supplied model object
+ * will usually be from a different model representation
+ * (e.g. due to a merge), so the details will be
+ * copied and placed in the representation associated
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
+ *
+ * @param context The context
+ * @param model The model being changed
+ * @param mobj The model object details to be inserted
+ * @param ref The optional reference model object
+ * @return Whether the change has been applied
+ */
+ @Override
+ public boolean insert(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ ProtocolModel cm=(ProtocolModel)mobj;
+
+ if (cm.getProtocol() != null) {
+ ModelChangeUtils.addContracts(context, cm.getProtocol(), true);
+
+ context.insert(model, cm.getProtocol(), null);
+
+ ModelChangeUtils.removeContracts(context, cm.getProtocol(), true);
+ }
+
+ return(true);
+ }
+
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/RepeatModelChangeRule.java (from rev 502, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/WhileModelChangeRule.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/RepeatModelChangeRule.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/RepeatModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.change;
+
+import org.savara.bpel.model.TSequence;
+import org.savara.bpel.model.TWhile;
+import org.savara.change.ModelChangeContext;
+import org.scribble.protocol.model.*;
+
+/**
+ * This is the model change rule for the While.
+ */
+public class RepeatModelChangeRule extends AbstractBPELModelChangeRule {
+
+ /**
+ * This method determines whether the rule is appropriate
+ * for the supplied type of model, parent (in the context) and
+ * model object.
+ *
+ * @param context The context
+ * @param model The model
+ * @param mobj The model object causing the change
+ * @param ref The optional reference model object
+ * @return Whether the rule supports the supplied information
+ */
+ @Override
+ public boolean isInsertSupported(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ boolean ret=false;
+
+ if (mobj instanceof org.scribble.protocol.model.Repeat && isBPELModel(model)) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method adds a new model object, within a
+ * parent model object, with the details supplied in
+ * another model object. The supplied model object
+ * will usually be from a different model representation
+ * (e.g. due to a merge), so the details will be
+ * copied and placed in the representation associated
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
+ *
+ * @param context The context
+ * @param model The model being changed
+ * @param mobj The model object details to be inserted
+ * @param ref The optional reference model object
+ * @return Whether the change has been applied
+ */
+ @Override
+ public boolean insert(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ //DefaultBPELLanguageModel bpelModel=(DefaultBPELLanguageModel)model;
+ org.scribble.protocol.model.Repeat elem=
+ (org.scribble.protocol.model.Repeat)mobj;
+
+ TWhile act=new TWhile();
+
+ TSequence seq=new TSequence();
+
+ if (context.getParent() instanceof TSequence) {
+ ((TSequence)context.getParent()).getActivity().add(act);
+ }
+
+ // Process the activities within the conversation
+ java.util.List<Activity> acts=elem.getBlock().getContents();
+
+ Object parent=context.getParent();
+
+ context.setParent(seq);
+
+ for (int i=0; i < acts.size(); i++) {
+ context.insert(model, acts.get(i), null);
+ }
+
+ act.setSequence(seq);
+
+ // Reset old parent
+ context.setParent(parent);
+
+ return(true);
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/RunModelChangeRule.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/RunModelChangeRule.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/RunModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,106 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.change;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.component.*;
-import org.scribble.protocol.model.*;
-import org.scribble.model.change.*;
-import org.scribble.conversation.model.*;
-import org.scribble.extensions.RegistryInfo;
-
-/**
- * This is the model change rule for the Run.
- */
- at RegistryInfo(extension=ModelChangeRule.class,notation=BPELNotation.NOTATION_CODE)
-public class RunModelChangeRule extends AbstractModelChangeRule {
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
- * model object.
- *
- * @param context The context
- * @param model The model
- * @param mobj The model object causing the change
- * @param ref The optional reference model object
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isInsertSupported(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- boolean ret=false;
-
- if (mobj instanceof Run &&
- model instanceof DefaultBPELLanguageModel) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method adds a new model object, within a
- * parent model object, with the details supplied in
- * another model object. The supplied model object
- * will usually be from a different model representation
- * (e.g. due to a merge), so the details will be
- * copied and placed in the representation associated
- * with the supplied model and parent model object.<p>
- * <p>
- * If a reference model object is supplied, then the
- * insertion will occur relative to it. If the reference
- * object is a block, then it means that the insertion
- * should occur at the end of the block. Otherwise the
- * new model object should be inserted before the
- * reference object, within the containing block.<p>
- * <p>
- * If the reference object is not supplied, then the
- * new model object should be inserted at the end of
- * the behaviour associated with the parent in the model
- * change context.
- *
- * @param context The context
- * @param model The model being changed
- * @param mobj The model object details to be inserted
- * @param ref The optional reference model object
- * @return Whether the change has been applied
- */
- @Override
- public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- DefaultBPELLanguageModel bpelModel=(DefaultBPELLanguageModel)model;
- Run elem=(Run)mobj;
-
- if (elem.getDefinition() != null) {
-
- ModelChangeUtils.pushRoleContractMapping(context, elem);
-
- ModelChangeUtils.addContracts(context, elem.getDefinition(), false);
-
- context.insert(bpelModel, elem.getDefinition(), ref);
-
- ModelChangeUtils.removeContracts(context, elem.getDefinition(), false);
-
- ModelChangeUtils.popRoleContractMapping(context, elem);
- }
-
- return(true);
- }
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/RunModelChangeRule.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/RunModelChangeRule.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/RunModelChangeRule.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/RunModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,99 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.change;
+
+import org.savara.change.ModelChangeContext;
+import org.scribble.protocol.model.*;
+
+/**
+ * This is the model change rule for the Run.
+ */
+public class RunModelChangeRule extends AbstractBPELModelChangeRule {
+
+ /**
+ * This method determines whether the rule is appropriate
+ * for the supplied type of model, parent (in the context) and
+ * model object.
+ *
+ * @param context The context
+ * @param model The model
+ * @param mobj The model object causing the change
+ * @param ref The optional reference model object
+ * @return Whether the rule supports the supplied information
+ */
+ @Override
+ public boolean isInsertSupported(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ boolean ret=false;
+
+ if (mobj instanceof Run && isBPELModel(model)) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method adds a new model object, within a
+ * parent model object, with the details supplied in
+ * another model object. The supplied model object
+ * will usually be from a different model representation
+ * (e.g. due to a merge), so the details will be
+ * copied and placed in the representation associated
+ * with the supplied model and parent model object.<p>
+ * <p>
+ * If a reference model object is supplied, then the
+ * insertion will occur relative to it. If the reference
+ * object is a block, then it means that the insertion
+ * should occur at the end of the block. Otherwise the
+ * new model object should be inserted before the
+ * reference object, within the containing block.<p>
+ * <p>
+ * If the reference object is not supplied, then the
+ * new model object should be inserted at the end of
+ * the behaviour associated with the parent in the model
+ * change context.
+ *
+ * @param context The context
+ * @param model The model being changed
+ * @param mobj The model object details to be inserted
+ * @param ref The optional reference model object
+ * @return Whether the change has been applied
+ */
+ @Override
+ public boolean insert(ModelChangeContext context,
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ Run elem=(Run)mobj;
+
+ if (elem.getProtocol() != null) {
+
+ ModelChangeUtils.pushRoleContractMapping(context, elem);
+
+ ModelChangeUtils.addContracts(context, elem.getProtocol(), false);
+
+ context.insert(model, elem.getProtocol(), ref);
+
+ ModelChangeUtils.removeContracts(context, elem.getProtocol(), false);
+
+ ModelChangeUtils.popRoleContractMapping(context, elem);
+ }
+
+ return(true);
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/SpawnModelChangeRule.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/SpawnModelChangeRule.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/SpawnModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,105 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.change;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.component.*;
-import org.scribble.protocol.model.*;
-import org.scribble.model.change.*;
-import org.scribble.conversation.model.*;
-import org.scribble.extensions.RegistryInfo;
-
-/**
- * This is the model change rule for the Run.
- */
- at RegistryInfo(extension=ModelChangeRule.class,notation=BPELNotation.NOTATION_CODE)
-public class SpawnModelChangeRule extends AbstractModelChangeRule {
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
- * model object.
- *
- * @param context The context
- * @param model The model
- * @param mobj The model object causing the change
- * @param ref The optional reference model object
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isInsertSupported(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- boolean ret=false;
-
- if (mobj instanceof Spawn &&
- model instanceof DefaultBPELLanguageModel) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method adds a new model object, within a
- * parent model object, with the details supplied in
- * another model object. The supplied model object
- * will usually be from a different model representation
- * (e.g. due to a merge), so the details will be
- * copied and placed in the representation associated
- * with the supplied model and parent model object.<p>
- * <p>
- * If a reference model object is supplied, then the
- * insertion will occur relative to it. If the reference
- * object is a block, then it means that the insertion
- * should occur at the end of the block. Otherwise the
- * new model object should be inserted before the
- * reference object, within the containing block.<p>
- * <p>
- * If the reference object is not supplied, then the
- * new model object should be inserted at the end of
- * the behaviour associated with the parent in the model
- * change context.
- *
- * @param context The context
- * @param model The model being changed
- * @param mobj The model object details to be inserted
- * @param ref The optional reference model object
- * @return Whether the change has been applied
- */
- @Override
- public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- DefaultBPELLanguageModel bpelModel=(DefaultBPELLanguageModel)model;
- Spawn elem=(Spawn)mobj;
-
- if (elem.getDefinition() != null) {
- ModelChangeUtils.pushRoleContractMapping(context, elem);
-
- ModelChangeUtils.addContracts(context, elem.getDefinition(), false);
-
- context.insert(bpelModel, elem.getDefinition(), ref);
-
- ModelChangeUtils.removeContracts(context, elem.getDefinition(), false);
-
- ModelChangeUtils.popRoleContractMapping(context, elem);
- }
-
- return(true);
- }
-
-}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/WhenModelChangeRule.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/WhenModelChangeRule.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/WhenModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,108 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.change;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.component.*;
-import org.scribble.protocol.model.*;
-import org.scribble.model.change.*;
-import org.scribble.conversation.model.*;
-import org.scribble.extensions.RegistryInfo;
-
-/**
- * This is the model change rule for the When.
- */
- at RegistryInfo(extension=ModelChangeRule.class,notation=BPELNotation.NOTATION_CODE)
-public class WhenModelChangeRule extends AbstractModelChangeRule {
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
- * model object.
- *
- * @param context The context
- * @param model The model
- * @param mobj The model object causing the change
- * @param ref The optional reference model object
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isInsertSupported(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- boolean ret=false;
-
- if (mobj instanceof When &&
- model instanceof DefaultBPELLanguageModel) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method adds a new model object, within a
- * parent model object, with the details supplied in
- * another model object. The supplied model object
- * will usually be from a different model representation
- * (e.g. due to a merge), so the details will be
- * copied and placed in the representation associated
- * with the supplied model and parent model object.<p>
- * <p>
- * If a reference model object is supplied, then the
- * insertion will occur relative to it. If the reference
- * object is a block, then it means that the insertion
- * should occur at the end of the block. Otherwise the
- * new model object should be inserted before the
- * reference object, within the containing block.<p>
- * <p>
- * If the reference object is not supplied, then the
- * new model object should be inserted at the end of
- * the behaviour associated with the parent in the model
- * change context.
- *
- * @param context The context
- * @param model The model being changed
- * @param mobj The model object details to be inserted
- * @param ref The optional reference model object
- * @return Whether the change has been applied
- */
- @Override
- public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- DefaultBPELLanguageModel bpelModel=(DefaultBPELLanguageModel)model;
- When elem=(When)mobj;
-
- // TODO: Need to decide best way to deal with single
- // and multi-path when constructs.
-
- if (elem.getPaths().size() == 1) {
- // Single path - so ignore it for now
- Block path=elem.getPaths().get(0);
-
- // Process the activities within the conversation
- java.util.List<Activity> acts=path.getContents();
-
- for (int i=0; i < acts.size(); i++) {
- context.insert(model, acts.get(i), null);
- }
- }
-
- return(true);
- }
-
-}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/WhileModelChangeRule.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/change/WhileModelChangeRule.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/change/WhileModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,117 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.change;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.component.*;
-import org.scribble.protocol.model.*;
-import org.scribble.model.change.*;
-import org.scribble.extensions.RegistryInfo;
-
-/**
- * This is the model change rule for the While.
- */
- at RegistryInfo(extension=ModelChangeRule.class,notation=BPELNotation.NOTATION_CODE)
-public class WhileModelChangeRule extends AbstractModelChangeRule {
-
- /**
- * This method determines whether the rule is appropriate
- * for the supplied type of model, parent (in the context) and
- * model object.
- *
- * @param context The context
- * @param model The model
- * @param mobj The model object causing the change
- * @param ref The optional reference model object
- * @return Whether the rule supports the supplied information
- */
- @Override
- public boolean isInsertSupported(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- boolean ret=false;
-
- if (mobj instanceof org.scribble.conversation.model.While &&
- model instanceof DefaultBPELLanguageModel) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method adds a new model object, within a
- * parent model object, with the details supplied in
- * another model object. The supplied model object
- * will usually be from a different model representation
- * (e.g. due to a merge), so the details will be
- * copied and placed in the representation associated
- * with the supplied model and parent model object.<p>
- * <p>
- * If a reference model object is supplied, then the
- * insertion will occur relative to it. If the reference
- * object is a block, then it means that the insertion
- * should occur at the end of the block. Otherwise the
- * new model object should be inserted before the
- * reference object, within the containing block.<p>
- * <p>
- * If the reference object is not supplied, then the
- * new model object should be inserted at the end of
- * the behaviour associated with the parent in the model
- * change context.
- *
- * @param context The context
- * @param model The model being changed
- * @param mobj The model object details to be inserted
- * @param ref The optional reference model object
- * @return Whether the change has been applied
- */
- @Override
- public boolean insert(ModelChangeContext context,
- Model model, ModelObject mobj, ModelObject ref) {
- DefaultBPELLanguageModel bpelModel=(DefaultBPELLanguageModel)model;
- org.scribble.conversation.model.While elem=
- (org.scribble.conversation.model.While)mobj;
-
- While act=new While(bpelModel);
-
- Sequence seq=new Sequence(bpelModel);
-
- if (context.getParent() instanceof Sequence) {
- ((Sequence)context.getParent()).addActivity(act, -1);
- }
-
- // Process the activities within the conversation
- java.util.List<Activity> acts=elem.getBlock().getContents();
-
- Object parent=context.getParent();
-
- context.setParent(seq);
-
- for (int i=0; i < acts.size(); i++) {
- context.insert(model, acts.get(i), null);
- }
-
- act.setActivity(seq);
-
- // Reset old parent
- context.setParent(parent);
-
- return(true);
- }
-
-}
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TFrom.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TFrom.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TFrom.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -67,9 +67,9 @@
public class TFrom {
@XmlElementRefs({
- @XmlElementRef(name = "literal", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class, required = false),
- @XmlElementRef(name = "documentation", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class, required = false),
- @XmlElementRef(name = "query", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class, required = false)
+ @XmlElementRef(name = "literal", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class),
+ @XmlElementRef(name = "documentation", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class),
+ @XmlElementRef(name = "query", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class)
})
@XmlMixed
@XmlAnyElement(lax = true)
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TOnAlarmEvent.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TOnAlarmEvent.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TOnAlarmEvent.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -54,10 +54,10 @@
{
@XmlElementRefs({
- @XmlElementRef(name = "for", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class, required = false),
- @XmlElementRef(name = "scope", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class, required = false),
- @XmlElementRef(name = "until", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class, required = false),
- @XmlElementRef(name = "repeatEvery", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class, required = false)
+ @XmlElementRef(name = "for", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class),
+ @XmlElementRef(name = "scope", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class),
+ @XmlElementRef(name = "until", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class),
+ @XmlElementRef(name = "repeatEvery", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class)
})
protected List<JAXBElement<?>> rest;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TTo.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TTo.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/TTo.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -63,8 +63,8 @@
public class TTo {
@XmlElementRefs({
- @XmlElementRef(name = "documentation", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class, required = false),
- @XmlElementRef(name = "query", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class, required = false)
+ @XmlElementRef(name = "documentation", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class),
+ @XmlElementRef(name = "query", namespace = "http://docs.oasis-open.org/wsbpel/2.0/process/executable", type = JAXBElement.class)
})
@XmlMixed
@XmlAnyElement(lax = true)
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/util/InteractionUtil.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/util/InteractionUtil.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/util/InteractionUtil.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,168 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.util;
-
-import org.savara.bpel.model.component.BPELActivity;
-import org.savara.bpel.model.component.Invoke;
-import org.savara.bpel.model.component.Sequence;
-import org.scribble.protocol.model.*;
-
-/**
- * This class contains utility functions for dealing with Interactions.
- */
-public class InteractionUtil {
-
- /**
- * This method returns the name associated with the interaction.
- *
- * @param interaction The interaction
- * @return The name
- */
- public static String getName(Interaction interaction) {
- String ret=null;
-
- if (isSend(interaction)) {
- ret = "Send";
- } else {
- ret = "Receive";
- }
-
- for (TypeReference ref : interaction.getMessageSignature().getTypes()) {
- ret += "_"+ref.getLocalpart();
- }
-
- return(ret);
- }
-
- /**
- * This method determines whether the supplied interaction
- * is a send.
- *
- * @param interaction The interaction
- * @return Whether the interaction is a send
- */
- public static boolean isSend(Interaction interaction) {
- boolean ret=false;
- Role role=null;
-
- if (interaction.getEnclosingDefinition() != null) {
- role = interaction.getEnclosingDefinition().
- getLocatedName().getRole();
- }
-
- if (role != null && ((interaction.getFromRole() != null &&
- interaction.getFromRole().equals(
- role)) ||
- (interaction.getToRole() != null &&
- interaction.getToRole().equals(
- role) == false))) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method determines whether the supplied interaction
- * is a request.
- *
- * @param interaction The interaction
- * @return Whether the interaction is a request
- */
- public static boolean isRequest(Interaction interaction) {
- boolean ret=false;
-
- if (interaction.getRequestLabel() != null ||
- interaction.getReplyToLabel() == null) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method determines whether the supplied interaction
- * is a response.
- *
- * @param interaction The interaction
- * @return Whether the interaction is a response
- */
- public static boolean isResponse(Interaction interaction) {
- boolean ret=false;
-
- if (interaction.getReplyToLabel() != null) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method determines whether this is the first interaction
- * associated with the conversation.
- *
- * @param interaction The interaction
- * @return Whether the interaction is the first in the conversation
- */
- /**
- * This method determines whether the supplied activity
- * is either an invoke, or a sequence that has an
- * invoke as its first element.
- *
- * @param act The activity
- * @return The invoke, or null if not found
- */
- public static Invoke getInvoke(BPELActivity act) {
- Invoke ret=null;
-
- if (act instanceof Invoke) {
- ret = (Invoke)act;
- } else if (act instanceof Sequence &&
- ((Sequence)act).getActivities().size() > 0 &&
- ((Sequence)act).getActivities().get(0) instanceof Invoke) {
- ret = (Invoke)((Sequence)act).getActivities().get(0);
- }
-
- return(ret);
- }
-
- /**
- * This method recursively counts the number of 'invoke' activities
- * contained within a DOM element.
- *
- * @param elem The current element
- * @return The number of invokes contained within the element
- */
- public static int countInvokes(org.w3c.dom.Element elem) {
- int ret=0;
-
- if (elem.getLocalName().equals("invoke")) {
- ret = 1;
- } else {
- org.w3c.dom.NodeList nl=elem.getChildNodes();
-
- for (int i=0; i < nl.getLength(); i++) {
- if (nl.item(i) instanceof org.w3c.dom.Element) {
- ret += countInvokes((org.w3c.dom.Element)nl.item(i));
- }
- }
- }
-
- return(ret);
- }
-}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/util/TypeReferenceUtil.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/util/TypeReferenceUtil.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/util/TypeReferenceUtil.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.util;
-
-import javax.xml.namespace.QName;
-
-import org.savara.bpel.model.component.ConversionContext;
-import org.scribble.protocol.model.TypeReference;
-
-public class TypeReferenceUtil {
-
- public static TypeReference createTypeReference(String type, ConversionContext context) {
- TypeReference ret=new TypeReference();
- //ret.derivedFrom(this);
-
- // TODO: Need to set the namespace on the TypeReference
- if (type != null) {
- int index=-1;
-
- if (type.charAt(0) == '{') {
- // Assume a qname
- QName qname=QName.valueOf(type);
-
- ret.setName(qname.getLocalPart());
- //ret.setLocalpart(qname.getLocalPart());
- //ret.setNamespace(qname.getNamespaceURI());
-
- } else if ((index=type.indexOf(':')) == -1) {
- ret.setName(type);
- //ret.setLocalpart(type);
-
- } else {
- ret.setName(type.substring(index+1));
- //ret.setLocalpart(type.substring(index+1));
-
- /*
- String prefix=type.substring(0, index);
- String ns=context.getNamespace(prefix);
-
- if (ns != null) {
- ret.setNamespace(ns);
- } else {
- // TODO: Log error
- }
- */
- }
- }
-
- return(ret);
- }
-
-}
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model2/BPELLanguageModel.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model2/BPELLanguageModel.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model2/BPELLanguageModel.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,7 +17,7 @@
*/
package org.savara.bpel.model2;
-import org.savara.bpel.model.component.Process;
+import org.savara.bpel.toprotocol.Process;
import org.scribble.protocol.model.*;
import org.scribble.common.logging.Journal;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model2/DefaultBPELLanguageModel.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model2/DefaultBPELLanguageModel.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model2/DefaultBPELLanguageModel.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -18,7 +18,7 @@
package org.savara.bpel.model2;
//import org.apache.commons.logging.*;
-import org.savara.bpel.model.component.Process;
+import org.savara.bpel.toprotocol.Process;
import org.scribble.conversation.model.Conversation;
import org.scribble.protocol.model.*;
import org.scribble.model.admin.Context;
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol (from rev 502, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component)
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractCondition.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/AbstractCondition.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractCondition.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,126 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the BPEL condition element.
- */
-public abstract class AbstractCondition extends BPELElement {
-
- private static final long serialVersionUID = 178873060670041144L;
-
- private static final String EXPRESSION_LANGUAGE = "expressionLanguage";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param elem The XML configuration details for the element
- */
- public AbstractCondition(BPELLanguageModel model,
- org.w3c.dom.Element elem) {
- super(model, elem);
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param elemName The condition's element name
- */
- public AbstractCondition(BPELLanguageModel model, String elemName) {
- super(model, elemName);
- }
-
- /**
- * This method returns the expression associated
- * with the condition.
- *
- * @return The expression
- */
- public String getExpression() {
- String ret=null;
-
- getDOMElement().normalize();
-
- if (getDOMElement().getFirstChild() instanceof org.w3c.dom.Text) {
- org.w3c.dom.Text text=(org.w3c.dom.Text)
- getDOMElement().getFirstChild();
-
- ret = text.getNodeValue();
- }
-
- return(ret);
- }
-
- /**
- * This method sets the expression.
- *
- * @param expr The expression
- */
- public void setExpression(String expr) {
-
- getDOMElement().normalize();
-
- if (getDOMElement().getFirstChild() == null) {
- org.w3c.dom.Text text=
- getDOMElement().getOwnerDocument().createTextNode(expr);
-
- getDOMElement().appendChild(text);
-
- } else if (getDOMElement().getFirstChild() instanceof org.w3c.dom.Text) {
- org.w3c.dom.Text text=(org.w3c.dom.Text)
- getDOMElement().getFirstChild();
-
- text.setNodeValue(expr);
- }
- }
-
- /**
- * This method returns the expression language associated
- * with the condition.
- *
- * @return The expression language
- */
- public String getExpressionLanguage() {
- return(getDOMElement().hasAttribute(EXPRESSION_LANGUAGE)?
- getDOMElement().getAttribute(EXPRESSION_LANGUAGE):null);
- }
-
- /**
- * This method sets the expression language.
- *
- * @param lang The expression language
- */
- public void setExpressionLanguage(String lang) {
- getDOMElement().setAttribute(EXPRESSION_LANGUAGE, lang);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
- }
-
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractCondition.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/AbstractCondition.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractCondition.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractCondition.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,126 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the BPEL condition element.
+ */
+public abstract class AbstractCondition extends BPELElement {
+
+ private static final long serialVersionUID = 178873060670041144L;
+
+ private static final String EXPRESSION_LANGUAGE = "expressionLanguage";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param elem The XML configuration details for the element
+ */
+ public AbstractCondition(BPELLanguageModel model,
+ org.w3c.dom.Element elem) {
+ super(model, elem);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param elemName The condition's element name
+ */
+ public AbstractCondition(BPELLanguageModel model, String elemName) {
+ super(model, elemName);
+ }
+
+ /**
+ * This method returns the expression associated
+ * with the condition.
+ *
+ * @return The expression
+ */
+ public String getExpression() {
+ String ret=null;
+
+ getDOMElement().normalize();
+
+ if (getDOMElement().getFirstChild() instanceof org.w3c.dom.Text) {
+ org.w3c.dom.Text text=(org.w3c.dom.Text)
+ getDOMElement().getFirstChild();
+
+ ret = text.getNodeValue();
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method sets the expression.
+ *
+ * @param expr The expression
+ */
+ public void setExpression(String expr) {
+
+ getDOMElement().normalize();
+
+ if (getDOMElement().getFirstChild() == null) {
+ org.w3c.dom.Text text=
+ getDOMElement().getOwnerDocument().createTextNode(expr);
+
+ getDOMElement().appendChild(text);
+
+ } else if (getDOMElement().getFirstChild() instanceof org.w3c.dom.Text) {
+ org.w3c.dom.Text text=(org.w3c.dom.Text)
+ getDOMElement().getFirstChild();
+
+ text.setNodeValue(expr);
+ }
+ }
+
+ /**
+ * This method returns the expression language associated
+ * with the condition.
+ *
+ * @return The expression language
+ */
+ public String getExpressionLanguage() {
+ return(getDOMElement().hasAttribute(EXPRESSION_LANGUAGE)?
+ getDOMElement().getAttribute(EXPRESSION_LANGUAGE):null);
+ }
+
+ /**
+ * This method sets the expression language.
+ *
+ * @param lang The expression language
+ */
+ public void setExpressionLanguage(String lang) {
+ getDOMElement().setAttribute(EXPRESSION_LANGUAGE, lang);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractInteraction.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/AbstractInteraction.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractInteraction.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,158 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import javax.xml.namespace.QName;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.TypeReference;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents an abstract interaction activity.
- *
- * @author gary
- */
-public abstract class AbstractInteraction extends BPELActivity {
-
- private static final String PARTNER_LINK = "partnerLink";
- private static final String PORT_TYPE = "portType";
- private static final String OPERATION = "operation";
-
- private static final long serialVersionUID = -5048477859609625462L;
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public AbstractInteraction(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public AbstractInteraction(BPELLanguageModel model,
- String name) {
- super(model, name);
- }
-
- /**
- * This method sets the operation.
- *
- * @param op The operation
- */
- public void setOperation(String op) {
- getDOMElement().setAttribute(OPERATION, op);
- }
-
- /**
- * This method returns the operation.
- *
- * @return The operation
- */
- public String getOperation() {
- return(getDOMElement().hasAttribute(OPERATION)?
- getDOMElement().getAttribute(OPERATION):null);
- }
-
- /**
- * This method sets the partner link.
- *
- * @param pl The partner link
- */
- public void setPartnerLink(String pl) {
- getDOMElement().setAttribute(PARTNER_LINK, pl);
- }
-
- /**
- * This method returns the partner link.
- *
- * @return The partner link
- */
- public String getPartnerLink() {
- return(getDOMElement().hasAttribute(PARTNER_LINK)?
- getDOMElement().getAttribute(PARTNER_LINK):null);
- }
-
- /**
- * This method sets the port type.
- *
- * @param pt The port type
- */
- public void setPortType(String pt) {
- getDOMElement().setAttribute(PORT_TYPE, pt);
- }
-
- /**
- * This method returns the port type.
- *
- * @return The port type
- */
- public String getPortType() {
- return(getDOMElement().hasAttribute(PORT_TYPE)?
- getDOMElement().getAttribute(PORT_TYPE):null);
- }
-
- /**
- * This method attempts to identify the client's partner role name.
- *
- * @return The partner role
- */
- protected String getClientPartnerRole() {
- String ret=getPartnerLink();
- int index=-1;
-
- if (ret != null && (index=ret.indexOf("To")) != -1) {
- ret = ret.substring(index+2);
- }
-
- return(ret);
- }
-
- /**
- * This method attempts to identify the server's partner role name.
- *
- * @return The partner role
- */
- protected String getServerPartnerRole() {
- String ret=getPartnerLink();
- int index=-1;
-
- if (ret != null && (index=ret.indexOf("To")) != -1) {
- ret = ret.substring(0, index);
- }
-
- return(ret);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- public void validate(Journal l) {
- }
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractInteraction.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/AbstractInteraction.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractInteraction.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/AbstractInteraction.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,158 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import javax.xml.namespace.QName;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.TypeReference;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents an abstract interaction activity.
+ *
+ * @author gary
+ */
+public abstract class AbstractInteraction extends BPELActivity {
+
+ private static final String PARTNER_LINK = "partnerLink";
+ private static final String PORT_TYPE = "portType";
+ private static final String OPERATION = "operation";
+
+ private static final long serialVersionUID = -5048477859609625462L;
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public AbstractInteraction(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public AbstractInteraction(BPELLanguageModel model,
+ String name) {
+ super(model, name);
+ }
+
+ /**
+ * This method sets the operation.
+ *
+ * @param op The operation
+ */
+ public void setOperation(String op) {
+ getDOMElement().setAttribute(OPERATION, op);
+ }
+
+ /**
+ * This method returns the operation.
+ *
+ * @return The operation
+ */
+ public String getOperation() {
+ return(getDOMElement().hasAttribute(OPERATION)?
+ getDOMElement().getAttribute(OPERATION):null);
+ }
+
+ /**
+ * This method sets the partner link.
+ *
+ * @param pl The partner link
+ */
+ public void setPartnerLink(String pl) {
+ getDOMElement().setAttribute(PARTNER_LINK, pl);
+ }
+
+ /**
+ * This method returns the partner link.
+ *
+ * @return The partner link
+ */
+ public String getPartnerLink() {
+ return(getDOMElement().hasAttribute(PARTNER_LINK)?
+ getDOMElement().getAttribute(PARTNER_LINK):null);
+ }
+
+ /**
+ * This method sets the port type.
+ *
+ * @param pt The port type
+ */
+ public void setPortType(String pt) {
+ getDOMElement().setAttribute(PORT_TYPE, pt);
+ }
+
+ /**
+ * This method returns the port type.
+ *
+ * @return The port type
+ */
+ public String getPortType() {
+ return(getDOMElement().hasAttribute(PORT_TYPE)?
+ getDOMElement().getAttribute(PORT_TYPE):null);
+ }
+
+ /**
+ * This method attempts to identify the client's partner role name.
+ *
+ * @return The partner role
+ */
+ protected String getClientPartnerRole() {
+ String ret=getPartnerLink();
+ int index=-1;
+
+ if (ret != null && (index=ret.indexOf("To")) != -1) {
+ ret = ret.substring(index+2);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method attempts to identify the server's partner role name.
+ *
+ * @return The partner role
+ */
+ protected String getServerPartnerRole() {
+ String ret=getPartnerLink();
+ int index=-1;
+
+ if (ret != null && (index=ret.indexOf("To")) != -1) {
+ ret = ret.substring(0, index);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ public void validate(Journal l) {
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELActivity.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/BPELActivity.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELActivity.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,413 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the base class for all BPEL
- * activities.
- */
-public abstract class BPELActivity extends BPELElement {
-
- private static final String SOURCES = "sources";
-
- private static final String TARGETS = "targets";
-
- private static final String SUPPRESS_JOIN_FAILURE = "suppressJoinFailure";
-
- private static final String NAME = "name";
-
- private static final long serialVersionUID = 2885165314780298048L;
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public BPELActivity(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- org.w3c.dom.Element targets=findChildElement(TARGETS);
-
- if (targets != null) {
- org.w3c.dom.NodeList nl=targets.getChildNodes();
-
- for (int i=0; i < nl.getLength(); i++) {
- if (nl.item(i) instanceof org.w3c.dom.Element &&
- nl.item(i).getLocalName().equals(Target.TARGET)
- && nl.item(i) instanceof org.w3c.dom.Element) {
- m_targets.add(new Target(model,
- (org.w3c.dom.Element)nl.item(i)));
- }
- }
- }
-
- org.w3c.dom.Element sources=findChildElement(SOURCES);
-
- if (sources != null) {
- org.w3c.dom.NodeList nl=sources.getChildNodes();
-
- for (int i=0; i < nl.getLength(); i++) {
- if (nl.item(i) instanceof org.w3c.dom.Element &&
- nl.item(i).getLocalName().equals(Source.SOURCE)
- && nl.item(i) instanceof org.w3c.dom.Element) {
- m_sources.add(new Source(model,
- (org.w3c.dom.Element)nl.item(i)));
- }
- }
- }
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public BPELActivity(BPELLanguageModel model,
- String name) {
- super(model, name);
- }
-
- /**
- * This method identifies whether the BPEL element
- * is an activity.
- *
- * @return Whether the element is an activity
- */
- @Override
- public boolean isActivity() {
- return(true);
- }
-
- /**
- * This method sets the name.
- *
- * @param name The name
- */
- public void setName(String name) {
- getDOMElement().setAttribute(NAME, name);
- }
-
- /**
- * This method returns the name.
- *
- * @return The name
- */
- public String getName() {
- return(getDOMElement().hasAttribute(NAME)?
- getDOMElement().getAttribute(NAME):null);
- }
-
- /**
- * This method sets the 'suppress join failure'
- * attribute.
- *
- * @param b Whether to suppress join failure
- */
- public void setSuppressJoinFailure(boolean b) {
- String suppress=(b?"yes":"no");
-
- getDOMElement().setAttribute(SUPPRESS_JOIN_FAILURE, suppress);
- }
-
- /**
- * This method returns whether the join should
- * be suppressed.
- *
- * @return Whether the join should be suppressed
- */
- public boolean getSuppressJoinFailure() {
- boolean ret=false;
- String suppress=
- getDOMElement().getAttribute(SUPPRESS_JOIN_FAILURE);
-
- if (suppress != null &&
- suppress.equals("yes")) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method adds a target to the activity.
- *
- * @param target The target to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addTarget(Target target, int pos) {
-
- org.w3c.dom.Element targets=null;
-
- if (m_targets.size() == 0) {
- targets = getDOMElement().getOwnerDocument().
- createElementNS(BPEL_NS, TARGETS);
-
- if (getDOMElement().getFirstChild() == null) {
- getDOMElement().appendChild(targets);
- } else {
- getDOMElement().insertBefore(targets,
- getDOMElement().getFirstChild());
- }
- } else {
- targets = findChildElement(TARGETS);
- }
-
- org.w3c.dom.Node newNode=target.getDOMElement().cloneNode(true);
-
- getDOMElement().getOwnerDocument().adoptNode(newNode);
-
- target.setDOMElement((org.w3c.dom.Element)newNode);
-
- if (pos == -1 && pos < m_targets.size()) {
- m_targets.add(target);
-
- targets.appendChild(newNode);
- } else {
-
- Target cur=m_targets.get(pos);
-
- m_targets.add(pos, target);
-
- if (cur != null) {
- targets.insertBefore(newNode,
- cur.getDOMElement());
- } else {
- targets.appendChild(newNode);
- }
- }
- }
-
- /**
- * This method removes a target from the activity.
- *
- * @param target The target to be removed
- * @return Whether the target was removed
- */
- public boolean removeTarget(Target target) {
- boolean ret=m_targets.remove(target);
-
- if (ret) {
- org.w3c.dom.Element targets=
- findChildElement(TARGETS);
-
- if (targets != null) {
- targets.removeChild(target.getDOMElement());
-
- if (m_targets.size() == 0) {
- getDOMElement().removeChild(targets);
- }
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of targets associated
- * with the activity.
- *
- * @return The list of targets
- */
- public java.util.List<Target> getTargets() {
- return(m_targets);
- }
-
- /**
- * This method adds a source to the activity.
- *
- * @param source The source to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addSource(Source source, int pos) {
-
- org.w3c.dom.Element sources=null;
-
- if (m_sources.size() == 0) {
- sources = getDOMElement().getOwnerDocument().
- createElementNS(BPEL_NS, SOURCES);
-
- if (getDOMElement().getFirstChild() == null) {
- getDOMElement().appendChild(sources);
- } else {
- getDOMElement().insertBefore(sources,
- getDOMElement().getFirstChild());
- }
- } else {
- sources = findChildElement(SOURCES);
- }
-
- org.w3c.dom.Node newNode=source.getDOMElement().cloneNode(true);
-
- getDOMElement().getOwnerDocument().adoptNode(newNode);
-
- source.setDOMElement((org.w3c.dom.Element)newNode);
-
- if (pos == -1 && pos < m_sources.size()) {
- m_sources.add(source);
-
- sources.appendChild(newNode);
- } else {
-
- Source cur=m_sources.get(pos);
-
- m_sources.add(pos, source);
-
- if (cur != null) {
- sources.insertBefore(newNode,
- cur.getDOMElement());
- } else {
- sources.appendChild(newNode);
- }
- }
- }
-
- /**
- * This method removes a source from the activity.
- *
- * @param source The source to be removed
- * @return Whether the source was removed
- */
- public boolean removesource(Source source) {
- boolean ret=m_sources.remove(source);
-
- if (ret) {
- org.w3c.dom.Element sources=
- findChildElement(SOURCES);
-
- if (sources != null) {
- sources.removeChild(source.getDOMElement());
-
- if (m_sources.size() == 0) {
- getDOMElement().removeChild(sources);
- }
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of sources associated
- * with the activity.
- *
- * @return The list of sources
- */
- public java.util.List<Source> getSources() {
- return(m_sources);
- }
-
- /**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- public void convert(java.util.List<Activity> activities,
- ConversionContext context) {
-
- /* TODO: Currently don't have a 'when' construct similar to CDL
- *
- *
- if (getTargets().size() > 0) {
-
- // Create 'when' construct to wait for inbound links
- // to be satisfied
- org.scribble.expression.xpath.model.XPathExpression expr=
- new org.scribble.expression.xpath.model.XPathExpression();
-
- String query="";
-
- for (int i=0; i < getTargets().size(); i++) {
- if (i > 0) {
- query += " and ";
- }
- query += "$"+getTargets().get(i).getLinkName();
- }
-
- expr.setQuery(query);
-
- org.scribble.protocol.model.When elem=
- new org.scribble.conversation.model.When();
-
- org.scribble.conversation.model.ConditionalBlock block=
- new org.scribble.conversation.model.ConditionalBlock();
- block.setExpression(expr);
-
- elem.getConditionalBlocks().add(block);
-
- activities.add(elem);
-
- activities = block.getContents();
- }
- */
-
- convertActivity(activities, context);
-
- /* TODO: How to deal with sources???
- *
- *
- // If sources, then set boolean variable
- for (int i=0; i < getSources().size(); i++) {
-
- org.scribble.conversation.model.Assignment assign=
- new org.scribble.conversation.model.Assignment();
-
- org.scribble.conversation.model.Variable var=
- new org.scribble.conversation.model.Variable();
-
- var.setName(getSources().get(i).getLinkName());
-
- assign.setVariable(var);
-
- org.scribble.expression.xpath.model.XPathExpression expr=
- new org.scribble.expression.xpath.model.XPathExpression();
-
- expr.setQuery("true()");
- assign.setExpression(expr);
-
- activities.add(assign);
- }
- */
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected abstract void convertActivity(java.util.List<Activity> activities,
- ConversionContext context);
-
- private java.util.List<Target> m_targets=
- new java.util.Vector<Target>();
- private java.util.List<Source> m_sources=
- new java.util.Vector<Source>();
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELActivity.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/BPELActivity.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELActivity.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELActivity.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,413 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the base class for all BPEL
+ * activities.
+ */
+public abstract class BPELActivity extends BPELElement {
+
+ private static final String SOURCES = "sources";
+
+ private static final String TARGETS = "targets";
+
+ private static final String SUPPRESS_JOIN_FAILURE = "suppressJoinFailure";
+
+ private static final String NAME = "name";
+
+ private static final long serialVersionUID = 2885165314780298048L;
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public BPELActivity(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ org.w3c.dom.Element targets=findChildElement(TARGETS);
+
+ if (targets != null) {
+ org.w3c.dom.NodeList nl=targets.getChildNodes();
+
+ for (int i=0; i < nl.getLength(); i++) {
+ if (nl.item(i) instanceof org.w3c.dom.Element &&
+ nl.item(i).getLocalName().equals(Target.TARGET)
+ && nl.item(i) instanceof org.w3c.dom.Element) {
+ m_targets.add(new Target(model,
+ (org.w3c.dom.Element)nl.item(i)));
+ }
+ }
+ }
+
+ org.w3c.dom.Element sources=findChildElement(SOURCES);
+
+ if (sources != null) {
+ org.w3c.dom.NodeList nl=sources.getChildNodes();
+
+ for (int i=0; i < nl.getLength(); i++) {
+ if (nl.item(i) instanceof org.w3c.dom.Element &&
+ nl.item(i).getLocalName().equals(Source.SOURCE)
+ && nl.item(i) instanceof org.w3c.dom.Element) {
+ m_sources.add(new Source(model,
+ (org.w3c.dom.Element)nl.item(i)));
+ }
+ }
+ }
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public BPELActivity(BPELLanguageModel model,
+ String name) {
+ super(model, name);
+ }
+
+ /**
+ * This method identifies whether the BPEL element
+ * is an activity.
+ *
+ * @return Whether the element is an activity
+ */
+ @Override
+ public boolean isActivity() {
+ return(true);
+ }
+
+ /**
+ * This method sets the name.
+ *
+ * @param name The name
+ */
+ public void setName(String name) {
+ getDOMElement().setAttribute(NAME, name);
+ }
+
+ /**
+ * This method returns the name.
+ *
+ * @return The name
+ */
+ public String getName() {
+ return(getDOMElement().hasAttribute(NAME)?
+ getDOMElement().getAttribute(NAME):null);
+ }
+
+ /**
+ * This method sets the 'suppress join failure'
+ * attribute.
+ *
+ * @param b Whether to suppress join failure
+ */
+ public void setSuppressJoinFailure(boolean b) {
+ String suppress=(b?"yes":"no");
+
+ getDOMElement().setAttribute(SUPPRESS_JOIN_FAILURE, suppress);
+ }
+
+ /**
+ * This method returns whether the join should
+ * be suppressed.
+ *
+ * @return Whether the join should be suppressed
+ */
+ public boolean getSuppressJoinFailure() {
+ boolean ret=false;
+ String suppress=
+ getDOMElement().getAttribute(SUPPRESS_JOIN_FAILURE);
+
+ if (suppress != null &&
+ suppress.equals("yes")) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method adds a target to the activity.
+ *
+ * @param target The target to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addTarget(Target target, int pos) {
+
+ org.w3c.dom.Element targets=null;
+
+ if (m_targets.size() == 0) {
+ targets = getDOMElement().getOwnerDocument().
+ createElementNS(BPEL_NS, TARGETS);
+
+ if (getDOMElement().getFirstChild() == null) {
+ getDOMElement().appendChild(targets);
+ } else {
+ getDOMElement().insertBefore(targets,
+ getDOMElement().getFirstChild());
+ }
+ } else {
+ targets = findChildElement(TARGETS);
+ }
+
+ org.w3c.dom.Node newNode=target.getDOMElement().cloneNode(true);
+
+ getDOMElement().getOwnerDocument().adoptNode(newNode);
+
+ target.setDOMElement((org.w3c.dom.Element)newNode);
+
+ if (pos == -1 && pos < m_targets.size()) {
+ m_targets.add(target);
+
+ targets.appendChild(newNode);
+ } else {
+
+ Target cur=m_targets.get(pos);
+
+ m_targets.add(pos, target);
+
+ if (cur != null) {
+ targets.insertBefore(newNode,
+ cur.getDOMElement());
+ } else {
+ targets.appendChild(newNode);
+ }
+ }
+ }
+
+ /**
+ * This method removes a target from the activity.
+ *
+ * @param target The target to be removed
+ * @return Whether the target was removed
+ */
+ public boolean removeTarget(Target target) {
+ boolean ret=m_targets.remove(target);
+
+ if (ret) {
+ org.w3c.dom.Element targets=
+ findChildElement(TARGETS);
+
+ if (targets != null) {
+ targets.removeChild(target.getDOMElement());
+
+ if (m_targets.size() == 0) {
+ getDOMElement().removeChild(targets);
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of targets associated
+ * with the activity.
+ *
+ * @return The list of targets
+ */
+ public java.util.List<Target> getTargets() {
+ return(m_targets);
+ }
+
+ /**
+ * This method adds a source to the activity.
+ *
+ * @param source The source to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addSource(Source source, int pos) {
+
+ org.w3c.dom.Element sources=null;
+
+ if (m_sources.size() == 0) {
+ sources = getDOMElement().getOwnerDocument().
+ createElementNS(BPEL_NS, SOURCES);
+
+ if (getDOMElement().getFirstChild() == null) {
+ getDOMElement().appendChild(sources);
+ } else {
+ getDOMElement().insertBefore(sources,
+ getDOMElement().getFirstChild());
+ }
+ } else {
+ sources = findChildElement(SOURCES);
+ }
+
+ org.w3c.dom.Node newNode=source.getDOMElement().cloneNode(true);
+
+ getDOMElement().getOwnerDocument().adoptNode(newNode);
+
+ source.setDOMElement((org.w3c.dom.Element)newNode);
+
+ if (pos == -1 && pos < m_sources.size()) {
+ m_sources.add(source);
+
+ sources.appendChild(newNode);
+ } else {
+
+ Source cur=m_sources.get(pos);
+
+ m_sources.add(pos, source);
+
+ if (cur != null) {
+ sources.insertBefore(newNode,
+ cur.getDOMElement());
+ } else {
+ sources.appendChild(newNode);
+ }
+ }
+ }
+
+ /**
+ * This method removes a source from the activity.
+ *
+ * @param source The source to be removed
+ * @return Whether the source was removed
+ */
+ public boolean removesource(Source source) {
+ boolean ret=m_sources.remove(source);
+
+ if (ret) {
+ org.w3c.dom.Element sources=
+ findChildElement(SOURCES);
+
+ if (sources != null) {
+ sources.removeChild(source.getDOMElement());
+
+ if (m_sources.size() == 0) {
+ getDOMElement().removeChild(sources);
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of sources associated
+ * with the activity.
+ *
+ * @return The list of sources
+ */
+ public java.util.List<Source> getSources() {
+ return(m_sources);
+ }
+
+ /**
+ * This method converts the BPEL activity into an equivalent
+ * behavioural description for conformance checking.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ public void convert(java.util.List<Activity> activities,
+ ConversionContext context) {
+
+ /* TODO: Currently don't have a 'when' construct similar to CDL
+ *
+ *
+ if (getTargets().size() > 0) {
+
+ // Create 'when' construct to wait for inbound links
+ // to be satisfied
+ org.scribble.expression.xpath.model.XPathExpression expr=
+ new org.scribble.expression.xpath.model.XPathExpression();
+
+ String query="";
+
+ for (int i=0; i < getTargets().size(); i++) {
+ if (i > 0) {
+ query += " and ";
+ }
+ query += "$"+getTargets().get(i).getLinkName();
+ }
+
+ expr.setQuery(query);
+
+ org.scribble.protocol.model.When elem=
+ new org.scribble.conversation.model.When();
+
+ org.scribble.conversation.model.ConditionalBlock block=
+ new org.scribble.conversation.model.ConditionalBlock();
+ block.setExpression(expr);
+
+ elem.getConditionalBlocks().add(block);
+
+ activities.add(elem);
+
+ activities = block.getContents();
+ }
+ */
+
+ convertActivity(activities, context);
+
+ /* TODO: How to deal with sources???
+ *
+ *
+ // If sources, then set boolean variable
+ for (int i=0; i < getSources().size(); i++) {
+
+ org.scribble.conversation.model.Assignment assign=
+ new org.scribble.conversation.model.Assignment();
+
+ org.scribble.conversation.model.Variable var=
+ new org.scribble.conversation.model.Variable();
+
+ var.setName(getSources().get(i).getLinkName());
+
+ assign.setVariable(var);
+
+ org.scribble.expression.xpath.model.XPathExpression expr=
+ new org.scribble.expression.xpath.model.XPathExpression();
+
+ expr.setQuery("true()");
+ assign.setExpression(expr);
+
+ activities.add(assign);
+ }
+ */
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected abstract void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context);
+
+ private java.util.List<Target> m_targets=
+ new java.util.Vector<Target>();
+ private java.util.List<Source> m_sources=
+ new java.util.Vector<Source>();
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElement.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/BPELElement.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElement.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,408 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.savara.util.XMLUtils;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-import org.apache.commons.logging.*;
-
-/**
- * This is the generic BPEL element class.
- *
- * @author gary
- */
-public abstract class BPELElement extends ModelObject {
-
- public static final String BPEL_NS = "http://docs.oasis-open.org/wsbpel/2.0/process/executable";
-
- private static final long serialVersionUID = -7306844554703224704L;
-
- /**
- * The constructor for initializing the BPEL element based on
- * an existing DOM element.
- */
- protected BPELElement(BPELLanguageModel model,
- org.w3c.dom.Element elem) {
- m_model = model;
-
- m_element = elem;
-
- // Set the start/end position information
- // in the source details
- XMLUtils.setStartAndEndPosition(this, model.getOriginalContents(), elem);
-
- //getSource().setObject(this);
- }
-
- /**
- * The contructor for initializing a new element.
- */
- protected BPELElement(BPELLanguageModel model,
- String elemName) {
- m_model = model;
-
- org.w3c.dom.Document doc=null;
-
- if (model.getBPELProcess() == null) {
- try {
- javax.xml.parsers.DocumentBuilderFactory factory=
- javax.xml.parsers.DocumentBuilderFactory.
- newInstance();
- factory.setNamespaceAware(true);
-
- doc = factory.newDocumentBuilder().newDocument();
- } catch(Exception e) {
- logger.error("Failed to create document", e);
- }
- } else {
- doc = model.getBPELProcess().getDOMElement().
- getOwnerDocument();
- }
-
- m_element = doc.createElementNS(BPEL_NS, elemName);
-
- //getSource().setObject(this);
- }
-
- /**
- * This method validates the ESB action and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- public void validate(Journal l) {
- }
-
- /**
- * This method returns the XML configuration representation
- * of the activity.
- *
- * @return The XML configuration for the BPEL node
- */
- public org.w3c.dom.Element getDOMElement() {
- return(m_element);
- }
-
- /**
- * This method sets the XML configuration representation
- * of the activity.
- *
- * @param elem The XML configuration
- */
- protected void setDOMElement(org.w3c.dom.Element elem) {
- m_element = elem;
- }
-
- /**
- * This method identifies whether the BPEL element
- * is an activity.
- *
- * @return Whether the element is an activity
- */
- public boolean isActivity() {
- return(false);
- }
-
- /**
- * This method returns the model.
- *
- * @return The model
- */
- protected BPELLanguageModel getModel() {
- return(m_model);
- }
-
- /**
- * This method returns the BPEL process in which the BPEL element
- * is contained.
- *
- * @return The BPEL process, or null if not found
- */
- protected Process getProcess() {
- Process ret=null;
- ModelObject cur=this;
-
- while (ret == null && cur != null) {
- if (cur instanceof Process) {
- ret = (Process)cur;
- } else {
- cur = cur.getParent();
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the element associated with
- * the supplied name.
- *
- * @param name The name
- * @return The element, or null if not found
- */
- public org.w3c.dom.Element findChildElement(String name) {
- org.w3c.dom.Element ret=null;
-
- org.w3c.dom.NodeList nl=getDOMElement().getChildNodes();
-
- for (int i=0; ret == null && i < nl.getLength(); i++) {
- org.w3c.dom.Node n=nl.item(i);
-
- if (n instanceof org.w3c.dom.Element &&
- n.getLocalName() != null &&
- n.getLocalName().equals(name)) {
- ret = (org.w3c.dom.Element)nl.item(i);
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the first child BPEL activity
- * found within the DOM element.
- *
- * @return The child BPEL activity, or null if not found
- */
- public BPELActivity findChildActivity() {
- BPELActivity ret=null;
-
- org.w3c.dom.NodeList nl=getDOMElement().getChildNodes();
-
- for (int i=0; ret == null &&
- i < nl.getLength(); i++) {
- if (nl.item(i) instanceof org.w3c.dom.Element) {
- BPELElement elem = BPELElementFactory.createBPELElement(m_model,
- (org.w3c.dom.Element)nl.item(i));
-
- if (elem != null && elem.isActivity() &&
- elem instanceof BPELActivity) {
- ret = (BPELActivity)elem;
- }
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the child elements that conform to
- * the supplied class.
- *
- * @param cls The class
- * @return The list of child elements of the type specified
- * by the supplied class
- */
- public java.util.List<BPELElement> findChildElements(Class<? extends BPELElement> cls) {
- return(findChildElements(getDOMElement(), cls));
- }
-
- /**
- * This method returns the child elements that conform to
- * the supplied class.
- *
- * @param root The root element
- * @param cls The class
- * @return The list of child elements of the type specified
- * by the supplied class
- */
- public java.util.List<BPELElement> findChildElements(org.w3c.dom.Element root,
- Class<? extends BPELElement> cls) {
- java.util.List<BPELElement> ret=new java.util.Vector<BPELElement>();
-
- org.w3c.dom.NodeList nl=root.getChildNodes();
-
- for (int i=0; i < nl.getLength(); i++) {
-
- if (nl.item(i) instanceof org.w3c.dom.Element) {
- BPELElement elem=BPELElementFactory.createBPELElement(m_model,
- (org.w3c.dom.Element)nl.item(i));
-
- if (elem != null &&
- cls.isAssignableFrom(elem.getClass())) {
- ret.add(elem);
- }
- }
- }
-
- return(ret);
- }
-
- /**
- * This method sets a new element. If an existing element
- * is specified, then it is replaced with the new element.
- * Otherwise if an insertBefore node is specified, then
- * the new element is inserted before it. If no existing
- * or insertBefore parameters are specified, then the
- * new element will be appended.<b>
- * <b>
- * The new BPEL element will be updated to be associated
- * with a DOM element that is adopted by the document
- * into which it is being added.
- *
- * @param existing The optional existing element to be
- * replaced
- * @param newelem The new element
- * @param insertBefore Optional location to insert new element
- */
- public void setChildElement(org.w3c.dom.Element existing,
- BPELElement newelem, org.w3c.dom.Node insertBefore) {
-
- setChildElement(getDOMElement(), existing, newelem, insertBefore);
- }
-
- /**
- * This method sets a new element. If an existing element
- * is specified, then it is replaced with the new element.
- * Otherwise if an insertBefore node is specified, then
- * the new element is inserted before it. If no existing
- * or insertBefore parameters are specified, then the
- * new element will be appended.<b>
- * <b>
- * The new BPEL element will be updated to be associated
- * with a DOM element that is adopted by the document
- * into which it is being added.
- *
- * @param root The root element to add child to
- * @param existing The optional existing element to be
- * replaced
- * @param newelem The new element
- * @param insertBefore Optional location to insert new element
- */
- public void setChildElement(org.w3c.dom.Element root,
- org.w3c.dom.Element existing,
- BPELElement newelem, org.w3c.dom.Node insertBefore) {
-
- if (newelem != null) {
- org.w3c.dom.Node newNode=newelem.getDOMElement().cloneNode(true);
-
- root.getOwnerDocument().adoptNode(newNode);
-
- newelem.setDOMElement((org.w3c.dom.Element)newNode);
-
- if (existing != null) {
- root.replaceChild(newNode, existing);
- } else if (insertBefore != null) {
- root.insertBefore(newNode, insertBefore);
- } else {
- root.appendChild(newNode);
- }
- }
- }
-
- /**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- public abstract void convert(java.util.List<Activity> activities,
- ConversionContext context);
-
- /**
- * This method returns the URI fragment to the activity within the
- * BPEL model.
- *
- * @return The URI
- */
- public String getURI() {
- String ret="";
-
- BPELElement parent=null;
-
- if (getParent() != null) {
- if (getParent() instanceof BPELElement) {
- parent = (BPELElement)getParent();
- }
- } else if (getDOMElement().getParentNode() instanceof org.w3c.dom.Element) {
- parent = BPELElementFactory.createBPELElement(getModel(),
- (org.w3c.dom.Element)getDOMElement().getParentNode());
- }
-
- if (parent != null) {
- ret = parent.getParentURI(this);
- }
-
- return(ret);
- }
-
- /**
- * This method recursively builds up the URI using the local URI
- * parts for each BPEL element up to the root node.
- *
- * @param elem The child element
- * @return The URI for the parent element
- */
- protected String getParentURI(BPELElement elem) {
- String ret="";
-
- BPELElement parent=null;
-
- if (getParent() != null) {
- if (getParent() instanceof BPELElement) {
- parent = (BPELElement)getParent();
- }
- } else if (elem.getDOMElement().getParentNode() instanceof org.w3c.dom.Element) {
- parent = BPELElementFactory.createBPELElement(getModel(),
- (org.w3c.dom.Element)getDOMElement().getParentNode());
- }
-
- if (parent != null) {
- ret = parent.getParentURI(this)+"/"+getLocalURIPart(elem);
- }
-
- return(ret);
- }
-
- /**
- * This method returns the URI part associated with the supplied child element.
- *
- * @param elem The child element
- * @return The URI part
- */
- protected String getLocalURIPart(BPELElement elem) {
- return("");
- }
-
- public void visit(Visitor visitor) {
- // TODO: Not sure if need visitor implementations
- }
-
- public int hashCode() {
- return(m_element.hashCode());
- }
-
- public boolean equals(Object obj) {
- boolean ret=false;
-
- if (obj instanceof BPELElement) {
- ret = m_element.equals(((BPELElement)obj).getDOMElement());
- }
-
- return(ret);
- }
-
- private static Log logger = LogFactory.getLog(BPELElement.class);
-
- private BPELLanguageModel m_model=null;
- private org.w3c.dom.Element m_element=null;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElement.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/BPELElement.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElement.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElement.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,408 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.savara.util.XMLUtils;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+import org.apache.commons.logging.*;
+
+/**
+ * This is the generic BPEL element class.
+ *
+ * @author gary
+ */
+public abstract class BPELElement extends ModelObject {
+
+ public static final String BPEL_NS = "http://docs.oasis-open.org/wsbpel/2.0/process/executable";
+
+ private static final long serialVersionUID = -7306844554703224704L;
+
+ /**
+ * The constructor for initializing the BPEL element based on
+ * an existing DOM element.
+ */
+ protected BPELElement(BPELLanguageModel model,
+ org.w3c.dom.Element elem) {
+ m_model = model;
+
+ m_element = elem;
+
+ // Set the start/end position information
+ // in the source details
+ XMLUtils.setStartAndEndPosition(this, model.getOriginalContents(), elem);
+
+ //getSource().setObject(this);
+ }
+
+ /**
+ * The contructor for initializing a new element.
+ */
+ protected BPELElement(BPELLanguageModel model,
+ String elemName) {
+ m_model = model;
+
+ org.w3c.dom.Document doc=null;
+
+ if (model.getBPELProcess() == null) {
+ try {
+ javax.xml.parsers.DocumentBuilderFactory factory=
+ javax.xml.parsers.DocumentBuilderFactory.
+ newInstance();
+ factory.setNamespaceAware(true);
+
+ doc = factory.newDocumentBuilder().newDocument();
+ } catch(Exception e) {
+ logger.error("Failed to create document", e);
+ }
+ } else {
+ doc = model.getBPELProcess().getDOMElement().
+ getOwnerDocument();
+ }
+
+ m_element = doc.createElementNS(BPEL_NS, elemName);
+
+ //getSource().setObject(this);
+ }
+
+ /**
+ * This method validates the ESB action and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ public void validate(Journal l) {
+ }
+
+ /**
+ * This method returns the XML configuration representation
+ * of the activity.
+ *
+ * @return The XML configuration for the BPEL node
+ */
+ public org.w3c.dom.Element getDOMElement() {
+ return(m_element);
+ }
+
+ /**
+ * This method sets the XML configuration representation
+ * of the activity.
+ *
+ * @param elem The XML configuration
+ */
+ protected void setDOMElement(org.w3c.dom.Element elem) {
+ m_element = elem;
+ }
+
+ /**
+ * This method identifies whether the BPEL element
+ * is an activity.
+ *
+ * @return Whether the element is an activity
+ */
+ public boolean isActivity() {
+ return(false);
+ }
+
+ /**
+ * This method returns the model.
+ *
+ * @return The model
+ */
+ protected BPELLanguageModel getModel() {
+ return(m_model);
+ }
+
+ /**
+ * This method returns the BPEL process in which the BPEL element
+ * is contained.
+ *
+ * @return The BPEL process, or null if not found
+ */
+ protected Process getProcess() {
+ Process ret=null;
+ ModelObject cur=this;
+
+ while (ret == null && cur != null) {
+ if (cur instanceof Process) {
+ ret = (Process)cur;
+ } else {
+ cur = cur.getParent();
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the element associated with
+ * the supplied name.
+ *
+ * @param name The name
+ * @return The element, or null if not found
+ */
+ public org.w3c.dom.Element findChildElement(String name) {
+ org.w3c.dom.Element ret=null;
+
+ org.w3c.dom.NodeList nl=getDOMElement().getChildNodes();
+
+ for (int i=0; ret == null && i < nl.getLength(); i++) {
+ org.w3c.dom.Node n=nl.item(i);
+
+ if (n instanceof org.w3c.dom.Element &&
+ n.getLocalName() != null &&
+ n.getLocalName().equals(name)) {
+ ret = (org.w3c.dom.Element)nl.item(i);
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the first child BPEL activity
+ * found within the DOM element.
+ *
+ * @return The child BPEL activity, or null if not found
+ */
+ public BPELActivity findChildActivity() {
+ BPELActivity ret=null;
+
+ org.w3c.dom.NodeList nl=getDOMElement().getChildNodes();
+
+ for (int i=0; ret == null &&
+ i < nl.getLength(); i++) {
+ if (nl.item(i) instanceof org.w3c.dom.Element) {
+ BPELElement elem = BPELElementFactory.createBPELElement(m_model,
+ (org.w3c.dom.Element)nl.item(i));
+
+ if (elem != null && elem.isActivity() &&
+ elem instanceof BPELActivity) {
+ ret = (BPELActivity)elem;
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the child elements that conform to
+ * the supplied class.
+ *
+ * @param cls The class
+ * @return The list of child elements of the type specified
+ * by the supplied class
+ */
+ public java.util.List<BPELElement> findChildElements(Class<? extends BPELElement> cls) {
+ return(findChildElements(getDOMElement(), cls));
+ }
+
+ /**
+ * This method returns the child elements that conform to
+ * the supplied class.
+ *
+ * @param root The root element
+ * @param cls The class
+ * @return The list of child elements of the type specified
+ * by the supplied class
+ */
+ public java.util.List<BPELElement> findChildElements(org.w3c.dom.Element root,
+ Class<? extends BPELElement> cls) {
+ java.util.List<BPELElement> ret=new java.util.Vector<BPELElement>();
+
+ org.w3c.dom.NodeList nl=root.getChildNodes();
+
+ for (int i=0; i < nl.getLength(); i++) {
+
+ if (nl.item(i) instanceof org.w3c.dom.Element) {
+ BPELElement elem=BPELElementFactory.createBPELElement(m_model,
+ (org.w3c.dom.Element)nl.item(i));
+
+ if (elem != null &&
+ cls.isAssignableFrom(elem.getClass())) {
+ ret.add(elem);
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method sets a new element. If an existing element
+ * is specified, then it is replaced with the new element.
+ * Otherwise if an insertBefore node is specified, then
+ * the new element is inserted before it. If no existing
+ * or insertBefore parameters are specified, then the
+ * new element will be appended.<b>
+ * <b>
+ * The new BPEL element will be updated to be associated
+ * with a DOM element that is adopted by the document
+ * into which it is being added.
+ *
+ * @param existing The optional existing element to be
+ * replaced
+ * @param newelem The new element
+ * @param insertBefore Optional location to insert new element
+ */
+ public void setChildElement(org.w3c.dom.Element existing,
+ BPELElement newelem, org.w3c.dom.Node insertBefore) {
+
+ setChildElement(getDOMElement(), existing, newelem, insertBefore);
+ }
+
+ /**
+ * This method sets a new element. If an existing element
+ * is specified, then it is replaced with the new element.
+ * Otherwise if an insertBefore node is specified, then
+ * the new element is inserted before it. If no existing
+ * or insertBefore parameters are specified, then the
+ * new element will be appended.<b>
+ * <b>
+ * The new BPEL element will be updated to be associated
+ * with a DOM element that is adopted by the document
+ * into which it is being added.
+ *
+ * @param root The root element to add child to
+ * @param existing The optional existing element to be
+ * replaced
+ * @param newelem The new element
+ * @param insertBefore Optional location to insert new element
+ */
+ public void setChildElement(org.w3c.dom.Element root,
+ org.w3c.dom.Element existing,
+ BPELElement newelem, org.w3c.dom.Node insertBefore) {
+
+ if (newelem != null) {
+ org.w3c.dom.Node newNode=newelem.getDOMElement().cloneNode(true);
+
+ root.getOwnerDocument().adoptNode(newNode);
+
+ newelem.setDOMElement((org.w3c.dom.Element)newNode);
+
+ if (existing != null) {
+ root.replaceChild(newNode, existing);
+ } else if (insertBefore != null) {
+ root.insertBefore(newNode, insertBefore);
+ } else {
+ root.appendChild(newNode);
+ }
+ }
+ }
+
+ /**
+ * This method converts the BPEL activity into an equivalent
+ * behavioural description for conformance checking.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ public abstract void convert(java.util.List<Activity> activities,
+ ConversionContext context);
+
+ /**
+ * This method returns the URI fragment to the activity within the
+ * BPEL model.
+ *
+ * @return The URI
+ */
+ public String getURI() {
+ String ret="";
+
+ BPELElement parent=null;
+
+ if (getParent() != null) {
+ if (getParent() instanceof BPELElement) {
+ parent = (BPELElement)getParent();
+ }
+ } else if (getDOMElement().getParentNode() instanceof org.w3c.dom.Element) {
+ parent = BPELElementFactory.createBPELElement(getModel(),
+ (org.w3c.dom.Element)getDOMElement().getParentNode());
+ }
+
+ if (parent != null) {
+ ret = parent.getParentURI(this);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method recursively builds up the URI using the local URI
+ * parts for each BPEL element up to the root node.
+ *
+ * @param elem The child element
+ * @return The URI for the parent element
+ */
+ protected String getParentURI(BPELElement elem) {
+ String ret="";
+
+ BPELElement parent=null;
+
+ if (getParent() != null) {
+ if (getParent() instanceof BPELElement) {
+ parent = (BPELElement)getParent();
+ }
+ } else if (elem.getDOMElement().getParentNode() instanceof org.w3c.dom.Element) {
+ parent = BPELElementFactory.createBPELElement(getModel(),
+ (org.w3c.dom.Element)getDOMElement().getParentNode());
+ }
+
+ if (parent != null) {
+ ret = parent.getParentURI(this)+"/"+getLocalURIPart(elem);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the URI part associated with the supplied child element.
+ *
+ * @param elem The child element
+ * @return The URI part
+ */
+ protected String getLocalURIPart(BPELElement elem) {
+ return("");
+ }
+
+ public void visit(Visitor visitor) {
+ // TODO: Not sure if need visitor implementations
+ }
+
+ public int hashCode() {
+ return(m_element.hashCode());
+ }
+
+ public boolean equals(Object obj) {
+ boolean ret=false;
+
+ if (obj instanceof BPELElement) {
+ ret = m_element.equals(((BPELElement)obj).getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ private static Log logger = LogFactory.getLog(BPELElement.class);
+
+ private BPELLanguageModel m_model=null;
+ private org.w3c.dom.Element m_element=null;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElementFactory.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/BPELElementFactory.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElementFactory.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.apache.commons.logging.*;
-import org.savara.bpel.model.BPELLanguageModel;
-
-public class BPELElementFactory {
-
- public static final String MODEL_COMPONENTS_PACKAGE = BPELElementFactory.class.getPackage().getName();
-
- /**
- * This method creates a BPELElement instance relevant to the
- * supplied JBossESB action, associated with the supplied
- * service.
- *
- * @param model The BPEL model
- * @param elem The XML configuration of the BPEL activity
- * @return The BPEL element instance
- */
- public static BPELElement createBPELElement(BPELLanguageModel model,
- org.w3c.dom.Element elem) {
- BPELElement ret=null;
- String activityType=elem.getNodeName();
-
- // Make first character capitalised
- char ch=Character.toUpperCase(activityType.charAt(0));
-
- activityType = ch+activityType.substring(1);
-
- String clsName=MODEL_COMPONENTS_PACKAGE+"."+activityType;
-
- try {
- Class<?> cls=(Class<?>)
- Class.forName(clsName);
-
- java.lang.reflect.Constructor<?> con=
- cls.getConstructor(new Class<?>[]{BPELLanguageModel.class,
- org.w3c.dom.Element.class});
-
- ret = (BPELElement)con.newInstance(new Object[]{model, elem});
-
- } catch(Exception e) {
- logger.warn("Unable to find BPEL element class '"+
- clsName+"'");
- }
-
- return(ret);
- }
-
- private static Log logger = LogFactory.getLog(BPELElementFactory.class);
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElementFactory.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/BPELElementFactory.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElementFactory.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELElementFactory.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.apache.commons.logging.*;
+import org.savara.bpel.model2.BPELLanguageModel;
+
+public class BPELElementFactory {
+
+ public static final String MODEL_COMPONENTS_PACKAGE = BPELElementFactory.class.getPackage().getName();
+
+ /**
+ * This method creates a BPELElement instance relevant to the
+ * supplied JBossESB action, associated with the supplied
+ * service.
+ *
+ * @param model The BPEL model
+ * @param elem The XML configuration of the BPEL activity
+ * @return The BPEL element instance
+ */
+ public static BPELElement createBPELElement(BPELLanguageModel model,
+ org.w3c.dom.Element elem) {
+ BPELElement ret=null;
+ String activityType=elem.getNodeName();
+
+ // Make first character capitalised
+ char ch=Character.toUpperCase(activityType.charAt(0));
+
+ activityType = ch+activityType.substring(1);
+
+ String clsName=MODEL_COMPONENTS_PACKAGE+"."+activityType;
+
+ try {
+ Class<?> cls=(Class<?>)
+ Class.forName(clsName);
+
+ java.lang.reflect.Constructor<?> con=
+ cls.getConstructor(new Class<?>[]{BPELLanguageModel.class,
+ org.w3c.dom.Element.class});
+
+ ret = (BPELElement)con.newInstance(new Object[]{model, elem});
+
+ } catch(Exception e) {
+ logger.warn("Unable to find BPEL element class '"+
+ clsName+"'");
+ }
+
+ return(ret);
+ }
+
+ private static Log logger = LogFactory.getLog(BPELElementFactory.class);
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELGroupingConstruct.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/BPELGroupingConstruct.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELGroupingConstruct.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,72 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.apache.commons.logging.*;
-import org.savara.bpel.model.*;
-
-/**
- * This is the generic BPEL activity class.
- *
- * @author gary
- */
-public abstract class BPELGroupingConstruct extends BPELActivity {
-
- private static final long serialVersionUID = -5550042312010190598L;
-
- /**
- * The constructor for initializing the activity based on
- * an existing DOM element.
- */
- protected BPELGroupingConstruct(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
- }
-
- /**
- * The contructor for initializing a new activity.
- */
- protected BPELGroupingConstruct(BPELLanguageModel model,
- String activityName) {
- super(model, activityName);
- }
-
- /**
- * This method sets the contained activity.
- *
- * @param act The contained activity
- */
- public void setActivity(BPELElement act) {
- m_activity = act;
-
- getDOMElement().appendChild(act.getDOMElement());
- }
-
- /**
- * This method returns the contained activity.
- *
- * @return The contained activity
- */
- public BPELElement getActivity() {
- return(m_activity);
- }
-
- private static Log logger = LogFactory.getLog(BPELGroupingConstruct.class);
-
- private BPELElement m_activity=null;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELGroupingConstruct.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/BPELGroupingConstruct.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELGroupingConstruct.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/BPELGroupingConstruct.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.apache.commons.logging.*;
+import org.savara.bpel.model2.*;
+
+/**
+ * This is the generic BPEL activity class.
+ *
+ * @author gary
+ */
+public abstract class BPELGroupingConstruct extends BPELActivity {
+
+ private static final long serialVersionUID = -5550042312010190598L;
+
+ /**
+ * The constructor for initializing the activity based on
+ * an existing DOM element.
+ */
+ protected BPELGroupingConstruct(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+ }
+
+ /**
+ * The contructor for initializing a new activity.
+ */
+ protected BPELGroupingConstruct(BPELLanguageModel model,
+ String activityName) {
+ super(model, activityName);
+ }
+
+ /**
+ * This method sets the contained activity.
+ *
+ * @param act The contained activity
+ */
+ public void setActivity(BPELElement act) {
+ m_activity = act;
+
+ getDOMElement().appendChild(act.getDOMElement());
+ }
+
+ /**
+ * This method returns the contained activity.
+ *
+ * @return The contained activity
+ */
+ public BPELElement getActivity() {
+ return(m_activity);
+ }
+
+ private static Log logger = LogFactory.getLog(BPELGroupingConstruct.class);
+
+ private BPELElement m_activity=null;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Catch.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Catch.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Catch.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,187 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the 'catch' construct contained
- * within the 'faultHandlers' element.
- */
-public class Catch extends BPELElement {
-
- private static final long serialVersionUID = 8191152745680660045L;
-
- public static final String CATCH="catch";
-
- private static final String FAULT_NAME = "faultName";
- private static final String FAULT_VARIABLE = "faultVariable";
- private static final String FAULT_MESSAGE_TYPE = "faultMessageType";
- private static final String FAULT_MESSAGE_ELEMENT = "faultMessageElement";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public Catch(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- m_activity = findChildActivity();
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public Catch(BPELLanguageModel model) {
- super(model, CATCH);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // Catch is not directly converted, only its contents indirectly as
- // a fault response in a scope
- }
-
- /**
- * This method sets the activity associated with
- * the 'else' construct.
- *
- * @param act The activity
- */
- public void setActivity(BPELActivity act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'else' construct.
- *
- * @return The activity
- */
- public BPELActivity getActivity() {
- return(m_activity);
- }
-
- /**
- * This method sets the fault name.
- *
- * @param faultName The fault name
- */
- public void setFaultName(String faultName) {
- getDOMElement().setAttribute(FAULT_NAME, faultName);
- }
-
- /**
- * This method returns the fault name.
- *
- * @return The fault name
- */
- public String getFaultName() {
- return(getDOMElement().hasAttribute(FAULT_NAME)?
- getDOMElement().getAttribute(FAULT_NAME):null);
- }
-
- /**
- * This method sets the fault variable.
- *
- * @param faultVariable The fault variable
- */
- public void setFaultVariable(String faultVariable) {
- getDOMElement().setAttribute(FAULT_VARIABLE, faultVariable);
- }
-
- /**
- * This method returns the fault variable.
- *
- * @return The fault variable
- */
- public String getFaultVariable() {
- return(getDOMElement().hasAttribute(FAULT_VARIABLE)?
- getDOMElement().getAttribute(FAULT_VARIABLE):null);
- }
-
- /**
- * This method sets the fault message type.
- *
- * @param faultName The fault message type
- */
- public void setFaultMessageType(String faultMessageType) {
- getDOMElement().setAttribute(FAULT_MESSAGE_TYPE, faultMessageType);
- }
-
- /**
- * This method returns the fault message type.
- *
- * @return The fault message type
- */
- public String getFaultMessageType() {
- return(getDOMElement().hasAttribute(FAULT_MESSAGE_TYPE)?
- getDOMElement().getAttribute(FAULT_MESSAGE_TYPE):null);
- }
-
- /**
- * This method sets the fault message element.
- *
- * @param faultName The fault message element
- */
- public void setFaultMessageElement(String faultMessageElement) {
- getDOMElement().setAttribute(FAULT_MESSAGE_ELEMENT, faultMessageElement);
- }
-
- /**
- * This method returns the fault message element.
- *
- * @return The fault message element
- */
- public String getFaultMessageElement() {
- return(getDOMElement().hasAttribute(FAULT_MESSAGE_ELEMENT)?
- getDOMElement().getAttribute(FAULT_MESSAGE_ELEMENT):null);
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof BPELActivity) {
- ret = "@activity";
- }
-
- return(ret);
- }
-
- private BPELActivity m_activity;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Catch.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Catch.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Catch.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Catch.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,187 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the 'catch' construct contained
+ * within the 'faultHandlers' element.
+ */
+public class Catch extends BPELElement {
+
+ private static final long serialVersionUID = 8191152745680660045L;
+
+ public static final String CATCH="catch";
+
+ private static final String FAULT_NAME = "faultName";
+ private static final String FAULT_VARIABLE = "faultVariable";
+ private static final String FAULT_MESSAGE_TYPE = "faultMessageType";
+ private static final String FAULT_MESSAGE_ELEMENT = "faultMessageElement";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public Catch(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ m_activity = findChildActivity();
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Catch(BPELLanguageModel model) {
+ super(model, CATCH);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // Catch is not directly converted, only its contents indirectly as
+ // a fault response in a scope
+ }
+
+ /**
+ * This method sets the activity associated with
+ * the 'else' construct.
+ *
+ * @param act The activity
+ */
+ public void setActivity(BPELActivity act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'else' construct.
+ *
+ * @return The activity
+ */
+ public BPELActivity getActivity() {
+ return(m_activity);
+ }
+
+ /**
+ * This method sets the fault name.
+ *
+ * @param faultName The fault name
+ */
+ public void setFaultName(String faultName) {
+ getDOMElement().setAttribute(FAULT_NAME, faultName);
+ }
+
+ /**
+ * This method returns the fault name.
+ *
+ * @return The fault name
+ */
+ public String getFaultName() {
+ return(getDOMElement().hasAttribute(FAULT_NAME)?
+ getDOMElement().getAttribute(FAULT_NAME):null);
+ }
+
+ /**
+ * This method sets the fault variable.
+ *
+ * @param faultVariable The fault variable
+ */
+ public void setFaultVariable(String faultVariable) {
+ getDOMElement().setAttribute(FAULT_VARIABLE, faultVariable);
+ }
+
+ /**
+ * This method returns the fault variable.
+ *
+ * @return The fault variable
+ */
+ public String getFaultVariable() {
+ return(getDOMElement().hasAttribute(FAULT_VARIABLE)?
+ getDOMElement().getAttribute(FAULT_VARIABLE):null);
+ }
+
+ /**
+ * This method sets the fault message type.
+ *
+ * @param faultName The fault message type
+ */
+ public void setFaultMessageType(String faultMessageType) {
+ getDOMElement().setAttribute(FAULT_MESSAGE_TYPE, faultMessageType);
+ }
+
+ /**
+ * This method returns the fault message type.
+ *
+ * @return The fault message type
+ */
+ public String getFaultMessageType() {
+ return(getDOMElement().hasAttribute(FAULT_MESSAGE_TYPE)?
+ getDOMElement().getAttribute(FAULT_MESSAGE_TYPE):null);
+ }
+
+ /**
+ * This method sets the fault message element.
+ *
+ * @param faultName The fault message element
+ */
+ public void setFaultMessageElement(String faultMessageElement) {
+ getDOMElement().setAttribute(FAULT_MESSAGE_ELEMENT, faultMessageElement);
+ }
+
+ /**
+ * This method returns the fault message element.
+ *
+ * @return The fault message element
+ */
+ public String getFaultMessageElement() {
+ return(getDOMElement().hasAttribute(FAULT_MESSAGE_ELEMENT)?
+ getDOMElement().getAttribute(FAULT_MESSAGE_ELEMENT):null);
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof BPELActivity) {
+ ret = "@activity";
+ }
+
+ return(ret);
+ }
+
+ private BPELActivity m_activity;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CatchAll.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/CatchAll.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CatchAll.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,106 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the 'catchAll' construct contained
- * within the 'faultHandlers' element.
- */
-public class CatchAll extends BPELElement {
-
- private static final long serialVersionUID = 975038289163694699L;
-
- public static final String CATCHALL="catchAll";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public CatchAll(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- m_activity = findChildActivity();
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public CatchAll(BPELLanguageModel model) {
- super(model, CATCHALL);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * This method sets the activity associated with
- * the 'else' construct.
- *
- * @param act The activity
- */
- public void setActivity(BPELActivity act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'else' construct.
- *
- * @return The activity
- */
- public BPELActivity getActivity() {
- return(m_activity);
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof BPELActivity) {
- ret = "@activity";
- }
-
- return(ret);
- }
-
- private BPELActivity m_activity;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CatchAll.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/CatchAll.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CatchAll.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CatchAll.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,106 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the 'catchAll' construct contained
+ * within the 'faultHandlers' element.
+ */
+public class CatchAll extends BPELElement {
+
+ private static final long serialVersionUID = 975038289163694699L;
+
+ public static final String CATCHALL="catchAll";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public CatchAll(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ m_activity = findChildActivity();
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public CatchAll(BPELLanguageModel model) {
+ super(model, CATCHALL);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * This method sets the activity associated with
+ * the 'else' construct.
+ *
+ * @param act The activity
+ */
+ public void setActivity(BPELActivity act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'else' construct.
+ *
+ * @return The activity
+ */
+ public BPELActivity getActivity() {
+ return(m_activity);
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof BPELActivity) {
+ ret = "@activity";
+ }
+
+ return(ret);
+ }
+
+ private BPELActivity m_activity;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CompensationHandler.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/CompensationHandler.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CompensationHandler.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the 'compensationHandler' construct contained
- * within the 'scope' activity.
- */
-public class CompensationHandler extends BPELElement {
-
- private static final long serialVersionUID = -1994083560689296558L;
-
- public static final String COMPENSATIONHANDLER="compensationHandler";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public CompensationHandler(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- m_activity = findChildActivity();
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public CompensationHandler(BPELLanguageModel model) {
- super(model, COMPENSATIONHANDLER);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * This method sets the activity associated with
- * the 'else' construct.
- *
- * @param act The activity
- */
- public void setActivity(BPELElement act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'else' construct.
- *
- * @return The activity
- */
- public BPELElement getActivity() {
- return(m_activity);
- }
-
- private BPELElement m_activity;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CompensationHandler.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/CompensationHandler.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CompensationHandler.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/CompensationHandler.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the 'compensationHandler' construct contained
+ * within the 'scope' activity.
+ */
+public class CompensationHandler extends BPELElement {
+
+ private static final long serialVersionUID = -1994083560689296558L;
+
+ public static final String COMPENSATIONHANDLER="compensationHandler";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public CompensationHandler(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ m_activity = findChildActivity();
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public CompensationHandler(BPELLanguageModel model) {
+ super(model, COMPENSATIONHANDLER);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * This method sets the activity associated with
+ * the 'else' construct.
+ *
+ * @param act The activity
+ */
+ public void setActivity(BPELElement act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'else' construct.
+ *
+ * @return The activity
+ */
+ public BPELElement getActivity() {
+ return(m_activity);
+ }
+
+ private BPELElement m_activity;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Condition.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Condition.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Condition.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.BPELLanguageModel;
-
-/**
- * This class represents the BPEL condition element.
- */
-public class Condition extends AbstractCondition {
-
- private static final long serialVersionUID = 8666349106632652777L;
-
- public static final String CONDITION="condition";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param elem The XML configuration details for the element
- */
- public Condition(BPELLanguageModel model,
- org.w3c.dom.Element elem) {
- super(model, elem);
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public Condition(BPELLanguageModel model) {
- super(model, CONDITION);
- }
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Condition.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Condition.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Condition.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Condition.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,51 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+
+/**
+ * This class represents the BPEL condition element.
+ */
+public class Condition extends AbstractCondition {
+
+ private static final long serialVersionUID = 8666349106632652777L;
+
+ public static final String CONDITION="condition";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param elem The XML configuration details for the element
+ */
+ public Condition(BPELLanguageModel model,
+ org.w3c.dom.Element elem) {
+ super(model, elem);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Condition(BPELLanguageModel model) {
+ super(model, CONDITION);
+ }
+
+}
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ConversionContext.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/ConversionContext.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ConversionContext.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -15,7 +15,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
-package org.savara.bpel.model.component;
+package org.savara.bpel.toprotocol;
import org.scribble.model.admin.Context;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/DefaultConversionContext.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/DefaultConversionContext.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/DefaultConversionContext.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -15,7 +15,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
-package org.savara.bpel.model.component;
+package org.savara.bpel.toprotocol;
import org.scribble.model.admin.Context;
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Else.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Else.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Else.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,108 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the 'else' construct contained
- * within the 'if' activity.
- */
-public class Else extends BPELElement {
-
- private static final long serialVersionUID = 1243775332210724718L;
-
- public static final String ELSE="else";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public Else(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- m_activity = findChildActivity();
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public Else(BPELLanguageModel model) {
- super(model, ELSE);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
-
- if (getActivity() != null) {
- getActivity().convert(activities, context);
- }
- }
-
- /**
- * This method sets the activity associated with
- * the 'else' construct.
- *
- * @param act The activity
- */
- public void setActivity(BPELElement act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'else' construct.
- *
- * @return The activity
- */
- public BPELElement getActivity() {
- return(m_activity);
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof BPELActivity) {
- ret = "@activity";
- }
-
- return(ret);
- }
-
- private BPELElement m_activity;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Else.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Else.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Else.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Else.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,108 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the 'else' construct contained
+ * within the 'if' activity.
+ */
+public class Else extends BPELElement {
+
+ private static final long serialVersionUID = 1243775332210724718L;
+
+ public static final String ELSE="else";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public Else(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ m_activity = findChildActivity();
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Else(BPELLanguageModel model) {
+ super(model, ELSE);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+
+ if (getActivity() != null) {
+ getActivity().convert(activities, context);
+ }
+ }
+
+ /**
+ * This method sets the activity associated with
+ * the 'else' construct.
+ *
+ * @param act The activity
+ */
+ public void setActivity(BPELElement act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'else' construct.
+ *
+ * @return The activity
+ */
+ public BPELElement getActivity() {
+ return(m_activity);
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof BPELActivity) {
+ ret = "@activity";
+ }
+
+ return(ret);
+ }
+
+ private BPELElement m_activity;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Elseif.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Elseif.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Elseif.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,139 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the 'elseif' construct contained
- * within the 'if' activity.
- */
-public class Elseif extends BPELElement {
-
- private static final long serialVersionUID = 6371029130621912170L;
-
- public static final String ELSEIF="elseif";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public Elseif(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- org.w3c.dom.Element cond=
- findChildElement(Condition.CONDITION);
-
- if (cond == null) {
- m_condition = new Condition(model);
- } else {
- m_condition = new Condition(model, cond);
- }
-
- m_activity = findChildActivity();
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public Elseif(BPELLanguageModel model) {
- super(model, ELSEIF);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
-
- if (getActivity() != null) {
- getActivity().convert(activities, context);
- }
- }
-
- /**
- * This method sets the condition.
- *
- * @param cond The condition
- */
- public void setCondition(Condition cond) {
- m_condition = cond;
-
- setChildElement(findChildElement(Condition.CONDITION),
- cond, getDOMElement().getFirstChild());
- }
-
- /**
- * This method returns the condition.
- *
- * @return The condition
- */
- public Condition getCondition() {
- return(m_condition);
- }
-
- /**
- * This method sets the activity associated with
- * the 'else' construct.
- *
- * @param act The activity
- */
- public void setActivity(BPELElement act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'else' construct.
- *
- * @return The activity
- */
- public BPELElement getActivity() {
- return(m_activity);
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof BPELActivity) {
- ret = "@activity";
- }
-
- return(ret);
- }
-
- private Condition m_condition;
- private BPELElement m_activity;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Elseif.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Elseif.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Elseif.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Elseif.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the 'elseif' construct contained
+ * within the 'if' activity.
+ */
+public class Elseif extends BPELElement {
+
+ private static final long serialVersionUID = 6371029130621912170L;
+
+ public static final String ELSEIF="elseif";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public Elseif(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ org.w3c.dom.Element cond=
+ findChildElement(Condition.CONDITION);
+
+ if (cond == null) {
+ m_condition = new Condition(model);
+ } else {
+ m_condition = new Condition(model, cond);
+ }
+
+ m_activity = findChildActivity();
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Elseif(BPELLanguageModel model) {
+ super(model, ELSEIF);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+
+ if (getActivity() != null) {
+ getActivity().convert(activities, context);
+ }
+ }
+
+ /**
+ * This method sets the condition.
+ *
+ * @param cond The condition
+ */
+ public void setCondition(Condition cond) {
+ m_condition = cond;
+
+ setChildElement(findChildElement(Condition.CONDITION),
+ cond, getDOMElement().getFirstChild());
+ }
+
+ /**
+ * This method returns the condition.
+ *
+ * @return The condition
+ */
+ public Condition getCondition() {
+ return(m_condition);
+ }
+
+ /**
+ * This method sets the activity associated with
+ * the 'else' construct.
+ *
+ * @param act The activity
+ */
+ public void setActivity(BPELElement act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'else' construct.
+ *
+ * @return The activity
+ */
+ public BPELElement getActivity() {
+ return(m_activity);
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof BPELActivity) {
+ ret = "@activity";
+ }
+
+ return(ret);
+ }
+
+ private Condition m_condition;
+ private BPELElement m_activity;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/EventHandlers.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/EventHandlers.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/EventHandlers.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,230 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents the 'eventHandlers' component within
- * a 'scope' element.
- *
- * @author gary
- */
-public class EventHandlers extends BPELElement {
-
- private static final long serialVersionUID = 118381918664522750L;
-
- public static final String EVENTHANDLERS = "eventHandlers";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public EventHandlers(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- java.util.List<BPELElement> onevts=
- findChildElements(OnEvent.class);
-
- for (int i=0; i < onevts.size(); i++) {
- if (onevts.get(i) instanceof OnEvent) {
- m_onEvents.add((OnEvent)onevts.get(i));
- }
- }
-
- java.util.List<BPELElement> onalrms=
- findChildElements(OnAlarm.class);
-
- for (int i=0; i < onalrms.size(); i++) {
- if (onalrms.get(i) instanceof OnAlarm) {
- m_onAlarms.add((OnAlarm)onalrms.get(i));
- }
- }
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public EventHandlers(BPELLanguageModel model) {
- super(model, EVENTHANDLERS);
- }
-
- /**
- * This method adds an 'onEvent' to the grouping construct.
- *
- * @param on The 'onEvent' to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addOnEvent(OnEvent on, int pos) {
- if (pos == -1 || pos >= m_onEvents.size()) {
- m_onEvents.add(on);
-
- org.w3c.dom.Element insertBefore=null;
-
- if (m_onAlarms.size() > 0) {
- insertBefore = m_onAlarms.get(0).getDOMElement();
- }
-
- setChildElement(null, on, insertBefore);
- } else {
-
- OnEvent cur=m_onEvents.get(pos);
-
- m_onEvents.add(pos, on);
-
- if (cur != null) {
- setChildElement(null, on,
- cur.getDOMElement());
- } else {
- org.w3c.dom.Element insertBefore=null;
-
- if (m_onAlarms.size() > 0) {
- insertBefore = m_onAlarms.get(0).getDOMElement();
- }
-
- setChildElement(null, on, insertBefore);
- }
- }
- }
-
- /**
- * This method removes an 'onEvent' from the grouping
- * construct.
- *
- * @param on The 'onEvent' to be removed
- * @return Whether the 'onEvent' was removed
- */
- public boolean removeOnEvent(OnEvent on) {
- boolean ret=m_onEvents.remove(on);
-
- if (ret) {
- getDOMElement().removeChild(on.getDOMElement());
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of 'onEvent' associated
- * with the grouping construct.
- *
- * @return The list of 'onEvent' elements
- */
- public java.util.List<OnEvent> getOnEvents() {
- return(m_onEvents);
- }
-
- /**
- * This method adds an 'onAlarm' to the grouping construct.
- *
- * @param on The 'onAlarm' to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addOnAlarm(OnAlarm on, int pos) {
- if (pos == -1 || pos >= m_onAlarms.size()) {
- m_onAlarms.add(on);
-
- setChildElement(null, on, null);
- } else {
-
- OnAlarm cur=m_onAlarms.get(pos);
-
- m_onAlarms.add(pos, on);
-
- if (cur != null) {
- setChildElement(null, on,
- cur.getDOMElement());
- } else {
- setChildElement(null, on, null);
- }
- }
- }
-
- /**
- * This method removes an 'onAlarm' from the grouping
- * construct.
- *
- * @param on The 'onAlarm' to be removed
- * @return Whether the 'onAlarm' was removed
- */
- public boolean removeOnAlarm(OnAlarm on) {
- boolean ret=m_onAlarms.remove(on);
-
- if (ret) {
- getDOMElement().removeChild(on.getDOMElement());
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of 'onAlarm' associated
- * with the grouping construct.
- *
- * @return The list of 'onAlarm' elements
- */
- public java.util.List<OnAlarm> getOnAlarms() {
- return(m_onAlarms);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(Journal l) {
- }
-
- /**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- public void convert(java.util.List<Activity> activities,
- ConversionContext context) {
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof OnEvent) {
- ret += "@onEvent."+getOnEvents().indexOf(elem);
- } else if (elem instanceof OnAlarm) {
- ret += "@onAlarm."+getOnAlarms().indexOf(elem);
- }
-
- return(ret);
- }
-
- private java.util.List<OnEvent> m_onEvents=
- new java.util.Vector<OnEvent>();
- private java.util.List<OnAlarm> m_onAlarms=
- new java.util.Vector<OnAlarm>();
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/EventHandlers.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/EventHandlers.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/EventHandlers.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/EventHandlers.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,230 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents the 'eventHandlers' component within
+ * a 'scope' element.
+ *
+ * @author gary
+ */
+public class EventHandlers extends BPELElement {
+
+ private static final long serialVersionUID = 118381918664522750L;
+
+ public static final String EVENTHANDLERS = "eventHandlers";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public EventHandlers(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ java.util.List<BPELElement> onevts=
+ findChildElements(OnEvent.class);
+
+ for (int i=0; i < onevts.size(); i++) {
+ if (onevts.get(i) instanceof OnEvent) {
+ m_onEvents.add((OnEvent)onevts.get(i));
+ }
+ }
+
+ java.util.List<BPELElement> onalrms=
+ findChildElements(OnAlarm.class);
+
+ for (int i=0; i < onalrms.size(); i++) {
+ if (onalrms.get(i) instanceof OnAlarm) {
+ m_onAlarms.add((OnAlarm)onalrms.get(i));
+ }
+ }
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public EventHandlers(BPELLanguageModel model) {
+ super(model, EVENTHANDLERS);
+ }
+
+ /**
+ * This method adds an 'onEvent' to the grouping construct.
+ *
+ * @param on The 'onEvent' to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addOnEvent(OnEvent on, int pos) {
+ if (pos == -1 || pos >= m_onEvents.size()) {
+ m_onEvents.add(on);
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_onAlarms.size() > 0) {
+ insertBefore = m_onAlarms.get(0).getDOMElement();
+ }
+
+ setChildElement(null, on, insertBefore);
+ } else {
+
+ OnEvent cur=m_onEvents.get(pos);
+
+ m_onEvents.add(pos, on);
+
+ if (cur != null) {
+ setChildElement(null, on,
+ cur.getDOMElement());
+ } else {
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_onAlarms.size() > 0) {
+ insertBefore = m_onAlarms.get(0).getDOMElement();
+ }
+
+ setChildElement(null, on, insertBefore);
+ }
+ }
+ }
+
+ /**
+ * This method removes an 'onEvent' from the grouping
+ * construct.
+ *
+ * @param on The 'onEvent' to be removed
+ * @return Whether the 'onEvent' was removed
+ */
+ public boolean removeOnEvent(OnEvent on) {
+ boolean ret=m_onEvents.remove(on);
+
+ if (ret) {
+ getDOMElement().removeChild(on.getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of 'onEvent' associated
+ * with the grouping construct.
+ *
+ * @return The list of 'onEvent' elements
+ */
+ public java.util.List<OnEvent> getOnEvents() {
+ return(m_onEvents);
+ }
+
+ /**
+ * This method adds an 'onAlarm' to the grouping construct.
+ *
+ * @param on The 'onAlarm' to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addOnAlarm(OnAlarm on, int pos) {
+ if (pos == -1 || pos >= m_onAlarms.size()) {
+ m_onAlarms.add(on);
+
+ setChildElement(null, on, null);
+ } else {
+
+ OnAlarm cur=m_onAlarms.get(pos);
+
+ m_onAlarms.add(pos, on);
+
+ if (cur != null) {
+ setChildElement(null, on,
+ cur.getDOMElement());
+ } else {
+ setChildElement(null, on, null);
+ }
+ }
+ }
+
+ /**
+ * This method removes an 'onAlarm' from the grouping
+ * construct.
+ *
+ * @param on The 'onAlarm' to be removed
+ * @return Whether the 'onAlarm' was removed
+ */
+ public boolean removeOnAlarm(OnAlarm on) {
+ boolean ret=m_onAlarms.remove(on);
+
+ if (ret) {
+ getDOMElement().removeChild(on.getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of 'onAlarm' associated
+ * with the grouping construct.
+ *
+ * @return The list of 'onAlarm' elements
+ */
+ public java.util.List<OnAlarm> getOnAlarms() {
+ return(m_onAlarms);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(Journal l) {
+ }
+
+ /**
+ * This method converts the BPEL activity into an equivalent
+ * behavioural description for conformance checking.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ public void convert(java.util.List<Activity> activities,
+ ConversionContext context) {
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof OnEvent) {
+ ret += "@onEvent."+getOnEvents().indexOf(elem);
+ } else if (elem instanceof OnAlarm) {
+ ret += "@onAlarm."+getOnAlarms().indexOf(elem);
+ }
+
+ return(ret);
+ }
+
+ private java.util.List<OnEvent> m_onEvents=
+ new java.util.Vector<OnEvent>();
+ private java.util.List<OnAlarm> m_onAlarms=
+ new java.util.Vector<OnAlarm>();
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Exit.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Exit.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Exit.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents the exit activity.
- *
- * @author gary
- */
-public class Exit extends BPELActivity {
-
- private static final long serialVersionUID = -5261386654111234711L;
-
- public static final String EXIT = "exit";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Exit(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Exit(BPELLanguageModel model) {
- super(model, EXIT);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(Journal l) {
- // Don't validate unsupported actions
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- //getSource().setComponentURI(getURI());
- }
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Exit.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Exit.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Exit.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Exit.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents the exit activity.
+ *
+ * @author gary
+ */
+public class Exit extends BPELActivity {
+
+ private static final long serialVersionUID = -5261386654111234711L;
+
+ public static final String EXIT = "exit";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Exit(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Exit(BPELLanguageModel model) {
+ super(model, EXIT);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(Journal l) {
+ // Don't validate unsupported actions
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ //getSource().setComponentURI(getURI());
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/FaultHandlers.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/FaultHandlers.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/FaultHandlers.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,148 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.apache.commons.logging.*;
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the 'faultHandlers' construct contained
- * within the 'scope' activity.
- */
-public class FaultHandlers extends BPELElement {
-
- private static final long serialVersionUID = 4136137332367247503L;
-
- public static final String FAULTHANDLERS="faultHandlers";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public FaultHandlers(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- java.util.List<BPELElement> paths=
- findChildElements(Catch.class);
-
- for (int i=0; i < paths.size(); i++) {
- m_catchPaths.add((Catch)paths.get(i));
- }
-
- paths = findChildElements(CatchAll.class);
-
- if (paths.size() > 0) {
- m_catchAll = (CatchAll)paths.get(0);
-
- if (paths.size() > 1) {
- logger.error("BPEL 'faultHandlers' has multiple 'catchAll' constructs");
- }
- }
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public FaultHandlers(BPELLanguageModel model) {
- super(model, FAULTHANDLERS);
- }
-
- /**
- * This method adds a 'catch' path.
- *
- * @param act The 'catch' path
- */
- public void addCatch(Catch act) {
- m_catchPaths.add(act);
-
- org.w3c.dom.Element insertBefore=null;
-
- if (m_catchAll != null) {
- insertBefore = m_catchAll.getDOMElement();
- }
-
- setChildElement(null, act,
- insertBefore);
- }
-
- /**
- * This method returns the list of 'catch' paths.
- *
- * @return The list of 'catch' paths
- */
- public java.util.List<Catch> getCatchPaths() {
- return(m_catchPaths);
- }
-
- /**
- * This method sets the 'catchAll' path.
- *
- * @param act The 'catchAll' path
- */
- public void setCatchAll(CatchAll act) {
- org.w3c.dom.Element existingElem=null;
-
- if (m_catchAll != null) {
- existingElem = m_catchAll.getDOMElement();
- }
-
- m_catchAll = act;
-
- setChildElement(existingElem, act,
- null);
- }
-
- /**
- * This method returns the 'catchAll' path.
- *
- * @return The 'catchAll' path
- */
- public CatchAll getCatchAll() {
- return(m_catchAll);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof Catch) {
- ret += "@catch."+getCatchPaths().indexOf(elem);
- } else if (elem instanceof CatchAll) {
- ret += "@catchAll";
- }
-
- return(ret);
- }
-
- private static Log logger=LogFactory.getLog(FaultHandlers.class);
-
- private CatchAll m_catchAll=null;
- private java.util.List<Catch> m_catchPaths=
- new java.util.Vector<Catch>();
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/FaultHandlers.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/FaultHandlers.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/FaultHandlers.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/FaultHandlers.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,148 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.apache.commons.logging.*;
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the 'faultHandlers' construct contained
+ * within the 'scope' activity.
+ */
+public class FaultHandlers extends BPELElement {
+
+ private static final long serialVersionUID = 4136137332367247503L;
+
+ public static final String FAULTHANDLERS="faultHandlers";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public FaultHandlers(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ java.util.List<BPELElement> paths=
+ findChildElements(Catch.class);
+
+ for (int i=0; i < paths.size(); i++) {
+ m_catchPaths.add((Catch)paths.get(i));
+ }
+
+ paths = findChildElements(CatchAll.class);
+
+ if (paths.size() > 0) {
+ m_catchAll = (CatchAll)paths.get(0);
+
+ if (paths.size() > 1) {
+ logger.error("BPEL 'faultHandlers' has multiple 'catchAll' constructs");
+ }
+ }
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public FaultHandlers(BPELLanguageModel model) {
+ super(model, FAULTHANDLERS);
+ }
+
+ /**
+ * This method adds a 'catch' path.
+ *
+ * @param act The 'catch' path
+ */
+ public void addCatch(Catch act) {
+ m_catchPaths.add(act);
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_catchAll != null) {
+ insertBefore = m_catchAll.getDOMElement();
+ }
+
+ setChildElement(null, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the list of 'catch' paths.
+ *
+ * @return The list of 'catch' paths
+ */
+ public java.util.List<Catch> getCatchPaths() {
+ return(m_catchPaths);
+ }
+
+ /**
+ * This method sets the 'catchAll' path.
+ *
+ * @param act The 'catchAll' path
+ */
+ public void setCatchAll(CatchAll act) {
+ org.w3c.dom.Element existingElem=null;
+
+ if (m_catchAll != null) {
+ existingElem = m_catchAll.getDOMElement();
+ }
+
+ m_catchAll = act;
+
+ setChildElement(existingElem, act,
+ null);
+ }
+
+ /**
+ * This method returns the 'catchAll' path.
+ *
+ * @return The 'catchAll' path
+ */
+ public CatchAll getCatchAll() {
+ return(m_catchAll);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof Catch) {
+ ret += "@catch."+getCatchPaths().indexOf(elem);
+ } else if (elem instanceof CatchAll) {
+ ret += "@catchAll";
+ }
+
+ return(ret);
+ }
+
+ private static Log logger=LogFactory.getLog(FaultHandlers.class);
+
+ private CatchAll m_catchAll=null;
+ private java.util.List<Catch> m_catchPaths=
+ new java.util.Vector<Catch>();
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Flow.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Flow.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Flow.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,292 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents a flow grouping activity.
- *
- */
-public class Flow extends BPELActivity {
-
- private static final long serialVersionUID = -5165269453306785719L;
-
- public static final String FLOW = "flow";
- public static final String LINKS = "links";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Flow(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- org.w3c.dom.Element links=findChildElement("links");
-
- if (links != null) {
- org.w3c.dom.NodeList nl=links.getChildNodes();
-
- for (int i=0; i < nl.getLength(); i++) {
- if (nl.item(i) instanceof org.w3c.dom.Element &&
- nl.item(i).getLocalName().equals(Link.LINK)
- && nl.item(i) instanceof org.w3c.dom.Element) {
- m_links.add(new Link(model,
- (org.w3c.dom.Element)nl.item(i)));
- }
- }
- }
-
- java.util.List<BPELElement> acts=
- findChildElements(BPELActivity.class);
-
- for (int i=0; i < acts.size(); i++) {
- if (acts.get(i).isActivity() &&
- acts.get(i) instanceof BPELActivity) {
- m_activities.add((BPELActivity)acts.get(i));
- }
- }
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Flow(BPELLanguageModel model) {
- super(model, FLOW);
- }
-
- /**
- * This method adds a link to the grouping construct.
- *
- * @param link The link to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addLink(Link link, int pos) {
-
- org.w3c.dom.Element links=null;
-
- if (m_links.size() == 0) {
- links = getDOMElement().getOwnerDocument().
- createElementNS(BPEL_NS, LINKS);
-
- if (getDOMElement().getFirstChild() == null) {
- getDOMElement().appendChild(links);
- } else {
- getDOMElement().insertBefore(links,
- getDOMElement().getFirstChild());
- }
- } else {
- links = findChildElement(LINKS);
- }
-
- org.w3c.dom.Node newNode=link.getDOMElement().cloneNode(true);
-
- getDOMElement().getOwnerDocument().adoptNode(newNode);
-
- link.setDOMElement((org.w3c.dom.Element)newNode);
-
- if (pos == -1 && pos < m_links.size()) {
- m_links.add(link);
-
- links.appendChild(newNode);
- } else {
-
- Link cur=m_links.get(pos);
-
- m_links.add(pos, link);
-
- if (cur != null) {
- links.insertBefore(newNode,
- cur.getDOMElement());
- } else {
- links.appendChild(newNode);
- }
- }
- }
-
- /**
- * This method removes a link from the grouping
- * construct.
- *
- * @param link The link to be removed
- * @return Whether the link was removed
- */
- public boolean removeLink(Link link) {
- boolean ret=m_links.remove(link);
-
- if (ret) {
- org.w3c.dom.Element links=
- findChildElement(LINKS);
-
- if (links != null) {
- links.removeChild(link.getDOMElement());
-
- if (m_links.size() == 0) {
- getDOMElement().removeChild(links);
- }
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of links associated
- * with the grouping construct.
- *
- * @return The list of links
- */
- public java.util.List<Link> getLinks() {
- return(m_links);
- }
-
- /**
- * This method adds an activity to the grouping construct.
- *
- * @param act The activity to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addActivity(BPELActivity act, int pos) {
- if (pos == -1 && pos < m_activities.size()) {
- m_activities.add(act);
-
- setChildElement(null, act, null);
- } else {
-
- BPELActivity cur=m_activities.get(pos);
-
- m_activities.add(pos, act);
-
- if (cur != null) {
- setChildElement(null, act,
- cur.getDOMElement());
- } else {
- setChildElement(null, act, null);
- }
- }
- }
-
- /**
- * This method removes an activity from the grouping
- * construct.
- *
- * @param act The activity to be removed
- * @return Whether the activity was removed
- */
- public boolean removeActivity(BPELActivity act) {
- boolean ret=m_activities.remove(act);
-
- if (ret) {
- getDOMElement().removeChild(act.getDOMElement());
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of activities associated
- * with the grouping construct.
- *
- * @return The list of activities
- */
- public java.util.List<BPELActivity> getActivities() {
- return(m_activities);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(Journal l) {
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- //getSource().setComponentURI(getURI());
-
- // If links have been defined, represent them as boolean
- // variables that can be tested using a 'when' clause
-
- /* TODO: Basis for source link mechanism - but no variables
- * supported yet
- *
- if (getLinks().size() > 0) {
- org.scribble.conversation.model.VariableList vl=
- new org.scribble.conversation.model.VariableList();
-
- org.scribble.protocol.model.TypeReference tref=
- new org.scribble.protocol.model.TypeReference();
- tref.setName("boolean");
-
- vl.setType(tref);
-
- for (int i=0; i < getLinks().size(); i++) {
- Link l=getLinks().get(i);
-
- org.scribble.conversation.model.Variable var=
- new org.scribble.conversation.model.Variable();
-
- var.setName(l.getName());
-
- vl.getVariables().add(var);
- }
-
- activities.add(vl);
- }
- */
-
- org.scribble.protocol.model.Parallel parallel=
- new org.scribble.protocol.model.Parallel();
-
- for (int i=0; i < getActivities().size(); i++) {
- Block b=new Block();
-
- getActivities().get(i).convert(b.getContents(), context);
-
- parallel.getBlocks().add(b);
- }
-
- activities.add(parallel);
- }
-
- private java.util.List<Link> m_links=
- new java.util.Vector<Link>();
- private java.util.List<BPELActivity> m_activities=
- new java.util.Vector<BPELActivity>();
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Flow.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Flow.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Flow.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Flow.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,292 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents a flow grouping activity.
+ *
+ */
+public class Flow extends BPELActivity {
+
+ private static final long serialVersionUID = -5165269453306785719L;
+
+ public static final String FLOW = "flow";
+ public static final String LINKS = "links";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Flow(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ org.w3c.dom.Element links=findChildElement("links");
+
+ if (links != null) {
+ org.w3c.dom.NodeList nl=links.getChildNodes();
+
+ for (int i=0; i < nl.getLength(); i++) {
+ if (nl.item(i) instanceof org.w3c.dom.Element &&
+ nl.item(i).getLocalName().equals(Link.LINK)
+ && nl.item(i) instanceof org.w3c.dom.Element) {
+ m_links.add(new Link(model,
+ (org.w3c.dom.Element)nl.item(i)));
+ }
+ }
+ }
+
+ java.util.List<BPELElement> acts=
+ findChildElements(BPELActivity.class);
+
+ for (int i=0; i < acts.size(); i++) {
+ if (acts.get(i).isActivity() &&
+ acts.get(i) instanceof BPELActivity) {
+ m_activities.add((BPELActivity)acts.get(i));
+ }
+ }
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Flow(BPELLanguageModel model) {
+ super(model, FLOW);
+ }
+
+ /**
+ * This method adds a link to the grouping construct.
+ *
+ * @param link The link to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addLink(Link link, int pos) {
+
+ org.w3c.dom.Element links=null;
+
+ if (m_links.size() == 0) {
+ links = getDOMElement().getOwnerDocument().
+ createElementNS(BPEL_NS, LINKS);
+
+ if (getDOMElement().getFirstChild() == null) {
+ getDOMElement().appendChild(links);
+ } else {
+ getDOMElement().insertBefore(links,
+ getDOMElement().getFirstChild());
+ }
+ } else {
+ links = findChildElement(LINKS);
+ }
+
+ org.w3c.dom.Node newNode=link.getDOMElement().cloneNode(true);
+
+ getDOMElement().getOwnerDocument().adoptNode(newNode);
+
+ link.setDOMElement((org.w3c.dom.Element)newNode);
+
+ if (pos == -1 && pos < m_links.size()) {
+ m_links.add(link);
+
+ links.appendChild(newNode);
+ } else {
+
+ Link cur=m_links.get(pos);
+
+ m_links.add(pos, link);
+
+ if (cur != null) {
+ links.insertBefore(newNode,
+ cur.getDOMElement());
+ } else {
+ links.appendChild(newNode);
+ }
+ }
+ }
+
+ /**
+ * This method removes a link from the grouping
+ * construct.
+ *
+ * @param link The link to be removed
+ * @return Whether the link was removed
+ */
+ public boolean removeLink(Link link) {
+ boolean ret=m_links.remove(link);
+
+ if (ret) {
+ org.w3c.dom.Element links=
+ findChildElement(LINKS);
+
+ if (links != null) {
+ links.removeChild(link.getDOMElement());
+
+ if (m_links.size() == 0) {
+ getDOMElement().removeChild(links);
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of links associated
+ * with the grouping construct.
+ *
+ * @return The list of links
+ */
+ public java.util.List<Link> getLinks() {
+ return(m_links);
+ }
+
+ /**
+ * This method adds an activity to the grouping construct.
+ *
+ * @param act The activity to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addActivity(BPELActivity act, int pos) {
+ if (pos == -1 && pos < m_activities.size()) {
+ m_activities.add(act);
+
+ setChildElement(null, act, null);
+ } else {
+
+ BPELActivity cur=m_activities.get(pos);
+
+ m_activities.add(pos, act);
+
+ if (cur != null) {
+ setChildElement(null, act,
+ cur.getDOMElement());
+ } else {
+ setChildElement(null, act, null);
+ }
+ }
+ }
+
+ /**
+ * This method removes an activity from the grouping
+ * construct.
+ *
+ * @param act The activity to be removed
+ * @return Whether the activity was removed
+ */
+ public boolean removeActivity(BPELActivity act) {
+ boolean ret=m_activities.remove(act);
+
+ if (ret) {
+ getDOMElement().removeChild(act.getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of activities associated
+ * with the grouping construct.
+ *
+ * @return The list of activities
+ */
+ public java.util.List<BPELActivity> getActivities() {
+ return(m_activities);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(Journal l) {
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ //getSource().setComponentURI(getURI());
+
+ // If links have been defined, represent them as boolean
+ // variables that can be tested using a 'when' clause
+
+ /* TODO: Basis for source link mechanism - but no variables
+ * supported yet
+ *
+ if (getLinks().size() > 0) {
+ org.scribble.conversation.model.VariableList vl=
+ new org.scribble.conversation.model.VariableList();
+
+ org.scribble.protocol.model.TypeReference tref=
+ new org.scribble.protocol.model.TypeReference();
+ tref.setName("boolean");
+
+ vl.setType(tref);
+
+ for (int i=0; i < getLinks().size(); i++) {
+ Link l=getLinks().get(i);
+
+ org.scribble.conversation.model.Variable var=
+ new org.scribble.conversation.model.Variable();
+
+ var.setName(l.getName());
+
+ vl.getVariables().add(var);
+ }
+
+ activities.add(vl);
+ }
+ */
+
+ org.scribble.protocol.model.Parallel parallel=
+ new org.scribble.protocol.model.Parallel();
+
+ for (int i=0; i < getActivities().size(); i++) {
+ Block b=new Block();
+
+ getActivities().get(i).convert(b.getContents(), context);
+
+ parallel.getBlocks().add(b);
+ }
+
+ activities.add(parallel);
+ }
+
+ private java.util.List<Link> m_links=
+ new java.util.Vector<Link>();
+ private java.util.List<BPELActivity> m_activities=
+ new java.util.Vector<BPELActivity>();
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/For.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/For.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/For.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.BPELLanguageModel;
-
-/**
- * This class represents the BPEL 'for' element.
- */
-public class For extends AbstractCondition {
-
- private static final long serialVersionUID = -3123540793706121742L;
-
- public static final String FOR="for";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param elem The XML configuration details for the element
- */
- public For(BPELLanguageModel model,
- org.w3c.dom.Element elem) {
- super(model, elem);
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public For(BPELLanguageModel model) {
- super(model, FOR);
- }
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/For.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/For.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/For.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/For.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+
+/**
+ * This class represents the BPEL 'for' element.
+ */
+public class For extends AbstractCondition {
+
+ private static final long serialVersionUID = -3123540793706121742L;
+
+ public static final String FOR="for";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param elem The XML configuration details for the element
+ */
+ public For(BPELLanguageModel model,
+ org.w3c.dom.Element elem) {
+ super(model, elem);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public For(BPELLanguageModel model) {
+ super(model, FOR);
+ }
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ForEach.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/ForEach.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ForEach.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,124 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents a forEach grouping activity.
- *
- * @author gary
- */
-public class ForEach extends BPELGroupingConstruct {
-
- private static final long serialVersionUID = -4302270930464272401L;
-
- public static final String FOREACH = "forEach";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public ForEach(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- org.w3c.dom.Element scopeElem=
- findChildElement(Scope.SCOPE);
-
- if (scopeElem == null) {
- m_scope = new Scope(model);
- } else {
- m_scope = new Scope(model, scopeElem);
- }
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public ForEach(BPELLanguageModel model) {
- super(model, FOREACH);
- }
-
- /**
- * This method sets the scope.
- *
- * @param scope The scope
- */
- public void setScope(Scope scope) {
- m_scope = scope;
-
- org.w3c.dom.Element existingElem=this.findChildElement(Scope.SCOPE);
-
- setChildElement(existingElem, scope,
- null);
- }
-
- /**
- * This method returns the scope.
- *
- * @return The scope
- */
- public Scope getScope() {
- return(m_scope);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(Journal l) {
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- //getSource().setComponentURI(getURI());
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof Scope) {
- ret += "@scope";
- }
-
- return(ret);
- }
-
- private Scope m_scope=null;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ForEach.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/ForEach.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ForEach.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ForEach.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,124 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents a forEach grouping activity.
+ *
+ * @author gary
+ */
+public class ForEach extends BPELGroupingConstruct {
+
+ private static final long serialVersionUID = -4302270930464272401L;
+
+ public static final String FOREACH = "forEach";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public ForEach(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ org.w3c.dom.Element scopeElem=
+ findChildElement(Scope.SCOPE);
+
+ if (scopeElem == null) {
+ m_scope = new Scope(model);
+ } else {
+ m_scope = new Scope(model, scopeElem);
+ }
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public ForEach(BPELLanguageModel model) {
+ super(model, FOREACH);
+ }
+
+ /**
+ * This method sets the scope.
+ *
+ * @param scope The scope
+ */
+ public void setScope(Scope scope) {
+ m_scope = scope;
+
+ org.w3c.dom.Element existingElem=this.findChildElement(Scope.SCOPE);
+
+ setChildElement(existingElem, scope,
+ null);
+ }
+
+ /**
+ * This method returns the scope.
+ *
+ * @return The scope
+ */
+ public Scope getScope() {
+ return(m_scope);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(Journal l) {
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ //getSource().setComponentURI(getURI());
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof Scope) {
+ ret += "@scope";
+ }
+
+ return(ret);
+ }
+
+ private Scope m_scope=null;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/If.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/If.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/If.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,289 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-import org.apache.commons.logging.*;
-
-/**
- * This class represents an 'if' grouping construct.
- *
- * @author gary
- */
-public class If extends BPELActivity {
-
- private static final long serialVersionUID = -763221632866464831L;
-
- public static final String IF = "if";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public If(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- org.w3c.dom.Element cond=
- findChildElement(Condition.CONDITION);
-
- if (cond == null) {
- m_condition = new Condition(model);
- } else {
- m_condition = new Condition(model, cond);
- }
-
- m_activity = findChildActivity();
-
- java.util.List<BPELElement> paths=
- findChildElements(Elseif.class);
-
- for (int i=0; i < paths.size(); i++) {
- m_elseIfPaths.add((Elseif)paths.get(i));
- }
-
- paths = findChildElements(Else.class);
-
- if (paths.size() > 0) {
- m_elsePath = (Else)paths.get(0);
-
- if (paths.size() > 1) {
- logger.error("BPEL 'if' has multiple 'else' constructs");
- }
- }
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public If(BPELLanguageModel model) {
- super(model, IF);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(Journal l) {
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- //getSource().setComponentURI(getURI());
-
- org.scribble.protocol.model.Choice elem=
- new org.scribble.protocol.model.Choice();
-
- When cb=new When();
-
- // TODO: Convert the conditional expression
-
- if (getActivity() != null) {
- getActivity().convert(cb.getBlock().getContents(), context);
- }
-
- elem.getWhens().add(cb);
-
- // Convert 'else if' paths
- for (int i=0; i < getElseIfPaths().size(); i++) {
- Elseif elseIfElem=getElseIfPaths().get(i);
-
- cb = new When();
-
- elseIfElem.convert(cb.getBlock().getContents(), context);
-
- elem.getWhens().add(cb);
- }
-
- // Convert 'else' path
- if (getElsePath() != null) {
- cb = new When();
-
- getElsePath().convert(cb.getBlock().getContents(), context);
-
- elem.getWhens().add(cb);
- }
-
- activities.add(elem);
- }
-
- /**
- * This method sets the condition.
- *
- * @param cond The condition
- */
- public void setCondition(Condition cond) {
- m_condition = cond;
-
- org.w3c.dom.Element insertBefore=null;
-
- if (m_activity != null) {
- insertBefore = m_activity.getDOMElement();
- } else if (m_elseIfPaths.size() > 0) {
- insertBefore = m_elseIfPaths.get(0).getDOMElement();
- } else if (m_elsePath != null) {
- insertBefore = m_elsePath.getDOMElement();
- }
-
- setChildElement(findChildElement(Condition.CONDITION),
- cond, insertBefore);
- }
-
- /**
- * This method returns the condition.
- *
- * @return The condition
- */
- public Condition getCondition() {
- return(m_condition);
- }
-
- /**
- * This method sets the main 'if' activity.
- *
- * @param act The activity associated with the 'if'
- */
- public void setActivity(BPELElement act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- if (m_elseIfPaths.size() > 0) {
- insertBefore = m_elseIfPaths.get(0).getDOMElement();
- } else if (m_elsePath != null) {
- insertBefore = m_elsePath.getDOMElement();
- }
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'if' path.
- *
- * @return The 'if' activity
- */
- public BPELElement getActivity() {
- return(m_activity);
- }
-
- /**
- * This method adds an 'else if' path.
- *
- * @param act The 'else if' path
- */
- public void addElseIfPath(Elseif act) {
- m_elseIfPaths.add(act);
-
- org.w3c.dom.Element insertBefore=null;
-
- if (m_elsePath != null) {
- insertBefore = m_elsePath.getDOMElement();
- }
-
- setChildElement(null, act,
- insertBefore);
- }
-
- /**
- * This method returns the list of 'else if' paths.
- *
- * @return The list of 'else if' paths
- */
- public java.util.List<Elseif> getElseIfPaths() {
- return(m_elseIfPaths);
- }
-
- /**
- * This method sets the 'else' path.
- *
- * @param act The 'else' path
- */
- public void setElsePath(Else act) {
- org.w3c.dom.Element existingElem=null;
-
- if (m_elsePath != null) {
- existingElem = m_elsePath.getDOMElement();
- }
-
- m_elsePath = act;
-
- setChildElement(existingElem, act,
- null);
- }
-
- /**
- * This method returns the 'else' path.
- *
- * @return The 'else' path
- */
- public Else getElsePath() {
- return(m_elsePath);
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof Elseif) {
- int pos=getElseIfPaths().indexOf(elem);
- ret = "@elseif."+pos;
- } else if (elem instanceof Else) {
- ret = "@else";
- } else {
- ret = "@activity";
- }
-
- return(ret);
- }
-
- private static Log logger=LogFactory.getLog(If.class);
-
- private Condition m_condition=null;
- private BPELElement m_activity=null;
- private Else m_elsePath=null;
- private java.util.List<Elseif> m_elseIfPaths=
- new java.util.Vector<Elseif>();
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/If.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/If.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/If.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/If.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,289 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+import org.apache.commons.logging.*;
+
+/**
+ * This class represents an 'if' grouping construct.
+ *
+ * @author gary
+ */
+public class If extends BPELActivity {
+
+ private static final long serialVersionUID = -763221632866464831L;
+
+ public static final String IF = "if";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public If(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ org.w3c.dom.Element cond=
+ findChildElement(Condition.CONDITION);
+
+ if (cond == null) {
+ m_condition = new Condition(model);
+ } else {
+ m_condition = new Condition(model, cond);
+ }
+
+ m_activity = findChildActivity();
+
+ java.util.List<BPELElement> paths=
+ findChildElements(Elseif.class);
+
+ for (int i=0; i < paths.size(); i++) {
+ m_elseIfPaths.add((Elseif)paths.get(i));
+ }
+
+ paths = findChildElements(Else.class);
+
+ if (paths.size() > 0) {
+ m_elsePath = (Else)paths.get(0);
+
+ if (paths.size() > 1) {
+ logger.error("BPEL 'if' has multiple 'else' constructs");
+ }
+ }
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public If(BPELLanguageModel model) {
+ super(model, IF);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(Journal l) {
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ //getSource().setComponentURI(getURI());
+
+ org.scribble.protocol.model.Choice elem=
+ new org.scribble.protocol.model.Choice();
+
+ When cb=new When();
+
+ // TODO: Convert the conditional expression
+
+ if (getActivity() != null) {
+ getActivity().convert(cb.getBlock().getContents(), context);
+ }
+
+ elem.getWhens().add(cb);
+
+ // Convert 'else if' paths
+ for (int i=0; i < getElseIfPaths().size(); i++) {
+ Elseif elseIfElem=getElseIfPaths().get(i);
+
+ cb = new When();
+
+ elseIfElem.convert(cb.getBlock().getContents(), context);
+
+ elem.getWhens().add(cb);
+ }
+
+ // Convert 'else' path
+ if (getElsePath() != null) {
+ cb = new When();
+
+ getElsePath().convert(cb.getBlock().getContents(), context);
+
+ elem.getWhens().add(cb);
+ }
+
+ activities.add(elem);
+ }
+
+ /**
+ * This method sets the condition.
+ *
+ * @param cond The condition
+ */
+ public void setCondition(Condition cond) {
+ m_condition = cond;
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_activity != null) {
+ insertBefore = m_activity.getDOMElement();
+ } else if (m_elseIfPaths.size() > 0) {
+ insertBefore = m_elseIfPaths.get(0).getDOMElement();
+ } else if (m_elsePath != null) {
+ insertBefore = m_elsePath.getDOMElement();
+ }
+
+ setChildElement(findChildElement(Condition.CONDITION),
+ cond, insertBefore);
+ }
+
+ /**
+ * This method returns the condition.
+ *
+ * @return The condition
+ */
+ public Condition getCondition() {
+ return(m_condition);
+ }
+
+ /**
+ * This method sets the main 'if' activity.
+ *
+ * @param act The activity associated with the 'if'
+ */
+ public void setActivity(BPELElement act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_elseIfPaths.size() > 0) {
+ insertBefore = m_elseIfPaths.get(0).getDOMElement();
+ } else if (m_elsePath != null) {
+ insertBefore = m_elsePath.getDOMElement();
+ }
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'if' path.
+ *
+ * @return The 'if' activity
+ */
+ public BPELElement getActivity() {
+ return(m_activity);
+ }
+
+ /**
+ * This method adds an 'else if' path.
+ *
+ * @param act The 'else if' path
+ */
+ public void addElseIfPath(Elseif act) {
+ m_elseIfPaths.add(act);
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_elsePath != null) {
+ insertBefore = m_elsePath.getDOMElement();
+ }
+
+ setChildElement(null, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the list of 'else if' paths.
+ *
+ * @return The list of 'else if' paths
+ */
+ public java.util.List<Elseif> getElseIfPaths() {
+ return(m_elseIfPaths);
+ }
+
+ /**
+ * This method sets the 'else' path.
+ *
+ * @param act The 'else' path
+ */
+ public void setElsePath(Else act) {
+ org.w3c.dom.Element existingElem=null;
+
+ if (m_elsePath != null) {
+ existingElem = m_elsePath.getDOMElement();
+ }
+
+ m_elsePath = act;
+
+ setChildElement(existingElem, act,
+ null);
+ }
+
+ /**
+ * This method returns the 'else' path.
+ *
+ * @return The 'else' path
+ */
+ public Else getElsePath() {
+ return(m_elsePath);
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof Elseif) {
+ int pos=getElseIfPaths().indexOf(elem);
+ ret = "@elseif."+pos;
+ } else if (elem instanceof Else) {
+ ret = "@else";
+ } else {
+ ret = "@activity";
+ }
+
+ return(ret);
+ }
+
+ private static Log logger=LogFactory.getLog(If.class);
+
+ private Condition m_condition=null;
+ private BPELElement m_activity=null;
+ private Else m_elsePath=null;
+ private java.util.List<Elseif> m_elseIfPaths=
+ new java.util.Vector<Elseif>();
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Import.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Import.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Import.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,120 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the 'import' construct.
- */
-public class Import extends BPELElement {
-
- private static final long serialVersionUID = -7103589689575940289L;
-
- private static final String IMPORT_TYPE = "importType";
- private static final String NAMESPACE = "namespace";
- private static final String LOCATION = "location";
-
- public static final String IMPORT="import";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public Import(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public Import(BPELLanguageModel model) {
- super(model, IMPORT);
- }
-
- /**
- * This method sets the import type.
- *
- * @param importType The import type
- */
- public void setImportType(String importType) {
- getDOMElement().setAttribute(IMPORT_TYPE, importType);
- }
-
- /**
- * This method returns the iport type.
- *
- * @return The import type
- */
- public String getImportType() {
- return(getDOMElement().hasAttribute(IMPORT_TYPE)?
- getDOMElement().getAttribute(IMPORT_TYPE):null);
- }
-
- /**
- * This method sets the namespace.
- *
- * @param ns The namespace
- */
- public void setNamespace(String ns) {
- getDOMElement().setAttribute(NAMESPACE, ns);
- }
-
- /**
- * This method returns the namespace.
- *
- * @return The namespace
- */
- public String getNamespace() {
- return(getDOMElement().hasAttribute(NAMESPACE)?
- getDOMElement().getAttribute(NAMESPACE):null);
- }
-
- /**
- * This method sets the location.
- *
- * @param location The location
- */
- public void setLocation(String location) {
- getDOMElement().setAttribute(LOCATION, location);
- }
-
- /**
- * This method returns the location.
- *
- * @return The location
- */
- public String getLocation() {
- return(getDOMElement().hasAttribute(LOCATION)?
- getDOMElement().getAttribute(LOCATION):null);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
- }
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Import.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Import.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Import.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Import.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,120 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the 'import' construct.
+ */
+public class Import extends BPELElement {
+
+ private static final long serialVersionUID = -7103589689575940289L;
+
+ private static final String IMPORT_TYPE = "importType";
+ private static final String NAMESPACE = "namespace";
+ private static final String LOCATION = "location";
+
+ public static final String IMPORT="import";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public Import(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Import(BPELLanguageModel model) {
+ super(model, IMPORT);
+ }
+
+ /**
+ * This method sets the import type.
+ *
+ * @param importType The import type
+ */
+ public void setImportType(String importType) {
+ getDOMElement().setAttribute(IMPORT_TYPE, importType);
+ }
+
+ /**
+ * This method returns the iport type.
+ *
+ * @return The import type
+ */
+ public String getImportType() {
+ return(getDOMElement().hasAttribute(IMPORT_TYPE)?
+ getDOMElement().getAttribute(IMPORT_TYPE):null);
+ }
+
+ /**
+ * This method sets the namespace.
+ *
+ * @param ns The namespace
+ */
+ public void setNamespace(String ns) {
+ getDOMElement().setAttribute(NAMESPACE, ns);
+ }
+
+ /**
+ * This method returns the namespace.
+ *
+ * @return The namespace
+ */
+ public String getNamespace() {
+ return(getDOMElement().hasAttribute(NAMESPACE)?
+ getDOMElement().getAttribute(NAMESPACE):null);
+ }
+
+ /**
+ * This method sets the location.
+ *
+ * @param location The location
+ */
+ public void setLocation(String location) {
+ getDOMElement().setAttribute(LOCATION, location);
+ }
+
+ /**
+ * This method returns the location.
+ *
+ * @return The location
+ */
+ public String getLocation() {
+ return(getDOMElement().hasAttribute(LOCATION)?
+ getDOMElement().getAttribute(LOCATION):null);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Invoke.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Invoke.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Invoke.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,318 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.util.TypeReferenceUtil;
-import org.savara.util.XMLUtils;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents an unsupported (or custom) action within
- * the conversation based ESB service descriptor.
- *
- * @author gary
- */
-public class Invoke extends AbstractInteraction {
-
- private static final String INPUT_VARIABLE = "inputVariable";
- private static final String OUTPUT_VARIABLE = "outputVariable";
- public static final String INVOKE = "invoke";
-
- private static final long serialVersionUID = 928076947383263387L;
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Invoke(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Invoke(BPELLanguageModel model) {
- super(model, INVOKE);
- }
-
- /**
- * This method sets the input variable.
- *
- * @param var The input variable
- */
- public void setInputVariable(String var) {
- getDOMElement().setAttribute(INPUT_VARIABLE, var);
- }
-
- /**
- * This method returns the input variable.
- *
- * @return The input variable
- */
- public String getInputVariable() {
- return(getDOMElement().hasAttribute(INPUT_VARIABLE)?
- getDOMElement().getAttribute(INPUT_VARIABLE):null);
- }
-
- /**
- * This method sets the output variable.
- *
- * @param var The output variable
- */
- public void setOutputVariable(String var) {
- getDOMElement().setAttribute(OUTPUT_VARIABLE, var);
- }
-
- /**
- * This method returns the output variable.
- *
- * @return The output variable
- */
- public String getOutputVariable() {
- return(getDOMElement().hasAttribute(OUTPUT_VARIABLE)?
- getDOMElement().getAttribute(OUTPUT_VARIABLE):null);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(Journal l) {
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- //getSource().setComponentURI(getURI());
-
- convertRequest(activities, context);
-
- // Check if invoke is contained within a scope that defines
- // fault handlers. If so, then generate choice to throw
- // fault exceptions.
- ScopeActivity scope=null;
- org.w3c.dom.Element cur=getDOMElement();
-
- while (cur != null && cur.getParentNode() instanceof org.w3c.dom.Element &&
- scope == null) {
- cur = (org.w3c.dom.Element)cur.getParentNode();
-
- if (cur != null) {
- BPELElement elem=BPELElementFactory.createBPELElement(getModel(),
- cur);
-
- if (elem instanceof ScopeActivity) {
- scope = (ScopeActivity)elem;
- }
- }
- }
-
- if (scope != null && scope.getFaultHandlers() != null &&
- (scope.getFaultHandlers().getCatchPaths().size() > 0 ||
- scope.getFaultHandlers().getCatchAll() != null)) {
- org.scribble.protocol.model.Choice te=
- new org.scribble.protocol.model.Choice();
- te.derivedFrom(this);
-
- activities.add(te);
-
- org.scribble.protocol.model.When when=
- new org.scribble.protocol.model.When();
- te.getWhens().add(when);
-
- activities = when.getBlock().getContents();
-
- for (int i=0; i < scope.getFaultHandlers().getCatchPaths().size(); i++) {
- Catch catchBlock=scope.getFaultHandlers().getCatchPaths().get(i);
-
- org.scribble.protocol.model.When fcb=
- new org.scribble.protocol.model.When();
-
- String mesgType=catchBlock.getFaultMessageType();
-
- if (mesgType == null) {
- mesgType = catchBlock.getFaultMessageElement();
- }
-
- Variable faultVar=null;
-
- if (catchBlock.getFaultVariable() != null) {
- faultVar = new Variable(getModel());
- faultVar.setName(catchBlock.getFaultVariable());
- faultVar.setMessageType(catchBlock.getFaultMessageType());
- faultVar.setElement(catchBlock.getFaultMessageElement());
- context.addVariable(faultVar);
- }
-
- convertFaultResponse(fcb.getBlock().getContents(), catchBlock.getFaultVariable(),
- mesgType, context);
-
- org.scribble.protocol.model.Raise raise=
- new org.scribble.protocol.model.Raise();
-
- TypeReference tref=new TypeReference();
- tref.setName(XMLUtils.getLocalname(catchBlock.getFaultName()));
- raise.setType(tref);
-
- fcb.getBlock().add(raise);
-
- te.getWhens().add(fcb);
-
- if (faultVar != null) {
- context.removeVariable(faultVar);
- }
- }
- }
-
- if (getOutputVariable() != null) {
-
- convertResponse(activities, context);
- }
- }
-
- protected void convertRequest(java.util.List<Activity> activities,
- ConversionContext context) {
- // Create interaction for request
- Interaction interaction=new Interaction();
- interaction.derivedFrom(this);
-
- Variable var=context.getVariable(getInputVariable());
-
- String xmlType=context.getProcess().getXMLType(var.getMessageType(),
- context.getEnvironmentContext());
-
- TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
-
- MessageSignature ms=new MessageSignature();
- ms.setOperation(getOperation());
- ms.getTypeReferences().add(tref);
-
- if (context.getRole() != null) {
- interaction.setFromRole(new Role(context.getRole()));
- }
-
- String toRole=getClientPartnerRole();
-
- if (toRole != null) {
- interaction.getToRoles().add(new Role(toRole));
- }
-
- interaction.setMessageSignature(ms);
-
- activities.add(interaction);
- }
-
- protected void convertResponse(java.util.List<Activity> activities,
- ConversionContext context) {
-
- // Create interaction for request
- Interaction interaction=new Interaction();
- interaction.derivedFrom(this);
-
- Variable var=context.getVariable(getOutputVariable());
-
- String xmlType=context.getProcess().getXMLType(var.getMessageType(),
- context.getEnvironmentContext());
-
- TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
-
- MessageSignature ms=new MessageSignature();
- ms.setOperation(getOperation());
- ms.getTypeReferences().add(tref);
-
- String fromRole=getClientPartnerRole();
-
- if (fromRole != null) {
- interaction.setFromRole(new Role(fromRole));
- }
-
- if (context.getRole() != null) {
- interaction.getToRoles().add(new Role(context.getRole()));
- }
-
- interaction.setMessageSignature(ms);
-
- activities.add(interaction);
- }
-
- protected void convertFaultResponse(java.util.List<Activity> activities,
- String faultVar, String faultMesgType, ConversionContext context) {
-
- // Create interaction for request
- Interaction interaction=new Interaction();
- interaction.derivedFrom(this);
-
- TypeReference tref=null;
-
- // TODO: Not sure if fault variable is supposed to be declared
- // in catch scope, or reused from outer scope?? If declared,
- // then without the message type/element, may be difficult to
- // define the message signature.
-
- Variable var=context.getVariable(faultVar);
-
- if (var != null) {
- String xmlType=context.getProcess().getXMLType(var.getMessageType(),
- context.getEnvironmentContext());
-
- tref = TypeReferenceUtil.createTypeReference(xmlType, context);
- //tref.setLocalpart(var.getMessageType());
- } else if (faultMesgType != null) {
- tref = TypeReferenceUtil.createTypeReference(faultMesgType, context);
- //tref.setLocalpart(faultMesgType);
- }
-
- MessageSignature ms=new MessageSignature();
- ms.setOperation(getOperation());
- ms.getTypeReferences().add(tref);
-
- String fromRole=getClientPartnerRole();
-
- if (fromRole != null) {
- interaction.setFromRole(new Role(fromRole));
- }
-
- if (context.getRole() != null) {
- interaction.getToRoles().add(new Role(context.getRole()));
- }
-
- interaction.setMessageSignature(ms);
-
- activities.add(interaction);
- }
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Invoke.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Invoke.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Invoke.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Invoke.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,318 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.savara.bpel.util.TypeReferenceUtil;
+import org.savara.util.XMLUtils;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents an unsupported (or custom) action within
+ * the conversation based ESB service descriptor.
+ *
+ * @author gary
+ */
+public class Invoke extends AbstractInteraction {
+
+ private static final String INPUT_VARIABLE = "inputVariable";
+ private static final String OUTPUT_VARIABLE = "outputVariable";
+ public static final String INVOKE = "invoke";
+
+ private static final long serialVersionUID = 928076947383263387L;
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Invoke(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Invoke(BPELLanguageModel model) {
+ super(model, INVOKE);
+ }
+
+ /**
+ * This method sets the input variable.
+ *
+ * @param var The input variable
+ */
+ public void setInputVariable(String var) {
+ getDOMElement().setAttribute(INPUT_VARIABLE, var);
+ }
+
+ /**
+ * This method returns the input variable.
+ *
+ * @return The input variable
+ */
+ public String getInputVariable() {
+ return(getDOMElement().hasAttribute(INPUT_VARIABLE)?
+ getDOMElement().getAttribute(INPUT_VARIABLE):null);
+ }
+
+ /**
+ * This method sets the output variable.
+ *
+ * @param var The output variable
+ */
+ public void setOutputVariable(String var) {
+ getDOMElement().setAttribute(OUTPUT_VARIABLE, var);
+ }
+
+ /**
+ * This method returns the output variable.
+ *
+ * @return The output variable
+ */
+ public String getOutputVariable() {
+ return(getDOMElement().hasAttribute(OUTPUT_VARIABLE)?
+ getDOMElement().getAttribute(OUTPUT_VARIABLE):null);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(Journal l) {
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ //getSource().setComponentURI(getURI());
+
+ convertRequest(activities, context);
+
+ // Check if invoke is contained within a scope that defines
+ // fault handlers. If so, then generate choice to throw
+ // fault exceptions.
+ ScopeActivity scope=null;
+ org.w3c.dom.Element cur=getDOMElement();
+
+ while (cur != null && cur.getParentNode() instanceof org.w3c.dom.Element &&
+ scope == null) {
+ cur = (org.w3c.dom.Element)cur.getParentNode();
+
+ if (cur != null) {
+ BPELElement elem=BPELElementFactory.createBPELElement(getModel(),
+ cur);
+
+ if (elem instanceof ScopeActivity) {
+ scope = (ScopeActivity)elem;
+ }
+ }
+ }
+
+ if (scope != null && scope.getFaultHandlers() != null &&
+ (scope.getFaultHandlers().getCatchPaths().size() > 0 ||
+ scope.getFaultHandlers().getCatchAll() != null)) {
+ org.scribble.protocol.model.Choice te=
+ new org.scribble.protocol.model.Choice();
+ te.derivedFrom(this);
+
+ activities.add(te);
+
+ org.scribble.protocol.model.When when=
+ new org.scribble.protocol.model.When();
+ te.getWhens().add(when);
+
+ activities = when.getBlock().getContents();
+
+ for (int i=0; i < scope.getFaultHandlers().getCatchPaths().size(); i++) {
+ Catch catchBlock=scope.getFaultHandlers().getCatchPaths().get(i);
+
+ org.scribble.protocol.model.When fcb=
+ new org.scribble.protocol.model.When();
+
+ String mesgType=catchBlock.getFaultMessageType();
+
+ if (mesgType == null) {
+ mesgType = catchBlock.getFaultMessageElement();
+ }
+
+ Variable faultVar=null;
+
+ if (catchBlock.getFaultVariable() != null) {
+ faultVar = new Variable(getModel());
+ faultVar.setName(catchBlock.getFaultVariable());
+ faultVar.setMessageType(catchBlock.getFaultMessageType());
+ faultVar.setElement(catchBlock.getFaultMessageElement());
+ context.addVariable(faultVar);
+ }
+
+ convertFaultResponse(fcb.getBlock().getContents(), catchBlock.getFaultVariable(),
+ mesgType, context);
+
+ org.scribble.protocol.model.Raise raise=
+ new org.scribble.protocol.model.Raise();
+
+ TypeReference tref=new TypeReference();
+ tref.setName(XMLUtils.getLocalname(catchBlock.getFaultName()));
+ raise.setType(tref);
+
+ fcb.getBlock().add(raise);
+
+ te.getWhens().add(fcb);
+
+ if (faultVar != null) {
+ context.removeVariable(faultVar);
+ }
+ }
+ }
+
+ if (getOutputVariable() != null) {
+
+ convertResponse(activities, context);
+ }
+ }
+
+ protected void convertRequest(java.util.List<Activity> activities,
+ ConversionContext context) {
+ // Create interaction for request
+ Interaction interaction=new Interaction();
+ interaction.derivedFrom(this);
+
+ Variable var=context.getVariable(getInputVariable());
+
+ String xmlType=context.getProcess().getXMLType(var.getMessageType(),
+ context.getEnvironmentContext());
+
+ TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
+
+ MessageSignature ms=new MessageSignature();
+ ms.setOperation(getOperation());
+ ms.getTypeReferences().add(tref);
+
+ if (context.getRole() != null) {
+ interaction.setFromRole(new Role(context.getRole()));
+ }
+
+ String toRole=getClientPartnerRole();
+
+ if (toRole != null) {
+ interaction.getToRoles().add(new Role(toRole));
+ }
+
+ interaction.setMessageSignature(ms);
+
+ activities.add(interaction);
+ }
+
+ protected void convertResponse(java.util.List<Activity> activities,
+ ConversionContext context) {
+
+ // Create interaction for request
+ Interaction interaction=new Interaction();
+ interaction.derivedFrom(this);
+
+ Variable var=context.getVariable(getOutputVariable());
+
+ String xmlType=context.getProcess().getXMLType(var.getMessageType(),
+ context.getEnvironmentContext());
+
+ TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
+
+ MessageSignature ms=new MessageSignature();
+ ms.setOperation(getOperation());
+ ms.getTypeReferences().add(tref);
+
+ String fromRole=getClientPartnerRole();
+
+ if (fromRole != null) {
+ interaction.setFromRole(new Role(fromRole));
+ }
+
+ if (context.getRole() != null) {
+ interaction.getToRoles().add(new Role(context.getRole()));
+ }
+
+ interaction.setMessageSignature(ms);
+
+ activities.add(interaction);
+ }
+
+ protected void convertFaultResponse(java.util.List<Activity> activities,
+ String faultVar, String faultMesgType, ConversionContext context) {
+
+ // Create interaction for request
+ Interaction interaction=new Interaction();
+ interaction.derivedFrom(this);
+
+ TypeReference tref=null;
+
+ // TODO: Not sure if fault variable is supposed to be declared
+ // in catch scope, or reused from outer scope?? If declared,
+ // then without the message type/element, may be difficult to
+ // define the message signature.
+
+ Variable var=context.getVariable(faultVar);
+
+ if (var != null) {
+ String xmlType=context.getProcess().getXMLType(var.getMessageType(),
+ context.getEnvironmentContext());
+
+ tref = TypeReferenceUtil.createTypeReference(xmlType, context);
+ //tref.setLocalpart(var.getMessageType());
+ } else if (faultMesgType != null) {
+ tref = TypeReferenceUtil.createTypeReference(faultMesgType, context);
+ //tref.setLocalpart(faultMesgType);
+ }
+
+ MessageSignature ms=new MessageSignature();
+ ms.setOperation(getOperation());
+ ms.getTypeReferences().add(tref);
+
+ String fromRole=getClientPartnerRole();
+
+ if (fromRole != null) {
+ interaction.setFromRole(new Role(fromRole));
+ }
+
+ if (context.getRole() != null) {
+ interaction.getToRoles().add(new Role(context.getRole()));
+ }
+
+ interaction.setMessageSignature(ms);
+
+ activities.add(interaction);
+ }
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Link.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Link.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Link.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the BPEL link element, contained within
- * the flow activity.
- */
-public class Link extends BPELElement {
-
- private static final long serialVersionUID = 6889776538490515074L;
-
- private static final String NAME = "name";
-
- public static final String LINK="link";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param elem The XML configuration details for the element
- */
- public Link(BPELLanguageModel model,
- org.w3c.dom.Element elem) {
- super(model, elem);
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public Link(BPELLanguageModel model) {
- super(model, LINK);
- }
-
- /**
- * This method returns the name associated
- * with the link.
- *
- * @return The link name
- */
- public String getName() {
- return(getDOMElement().getAttribute(NAME));
- }
-
- /**
- * This method sets the link name.
- *
- * @param name The name
- */
- public void setName(String name) {
- getDOMElement().setAttribute(NAME, name);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
- }
-
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Link.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Link.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Link.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Link.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the BPEL link element, contained within
+ * the flow activity.
+ */
+public class Link extends BPELElement {
+
+ private static final long serialVersionUID = 6889776538490515074L;
+
+ private static final String NAME = "name";
+
+ public static final String LINK="link";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param elem The XML configuration details for the element
+ */
+ public Link(BPELLanguageModel model,
+ org.w3c.dom.Element elem) {
+ super(model, elem);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Link(BPELLanguageModel model) {
+ super(model, LINK);
+ }
+
+ /**
+ * This method returns the name associated
+ * with the link.
+ *
+ * @return The link name
+ */
+ public String getName() {
+ return(getDOMElement().getAttribute(NAME));
+ }
+
+ /**
+ * This method sets the link name.
+ *
+ * @param name The name
+ */
+ public void setName(String name) {
+ getDOMElement().setAttribute(NAME, name);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnAlarm.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/OnAlarm.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnAlarm.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,182 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the 'onAlarm' construct contained
- * within the 'pick' activity.
- */
-public class OnAlarm extends BPELElement {
-
- private static final long serialVersionUID = 271323368015539L;
-
- public static final String ONALARM="onAlarm";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public OnAlarm(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- m_activity = findChildActivity();
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public OnAlarm(BPELLanguageModel model) {
- super(model, ONALARM);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
- }
-
- /**
- * This method sets the 'until' condition.
- *
- * @param cond The 'until' condition
- */
- public void setUntil(Until cond) {
- org.w3c.dom.Element insertBefore=null;
-
- if (m_activity != null) {
- insertBefore = m_activity.getDOMElement();
- }
-
- setChildElement(findChildElement(Until.UNTIL),
- cond, insertBefore);
-
- org.w3c.dom.Element elem=findChildElement(For.FOR);
- if (elem != null) {
- getDOMElement().removeChild(elem);
- }
- }
-
- /**
- * This method returns the 'until' condition.
- *
- * @return The 'until' condition
- */
- public Until getUntil() {
- Until ret=null;
-
- org.w3c.dom.Element elem=findChildElement(Until.UNTIL);
- if (elem != null) {
- ret = new Until(getModel(), elem);
- }
-
- return(ret);
- }
-
- /**
- * This method sets the 'for' condition.
- *
- * @param cond The 'for' condition
- */
- public void setFor(For cond) {
- org.w3c.dom.Element insertBefore=null;
-
- if (m_activity != null) {
- insertBefore = m_activity.getDOMElement();
- }
-
- setChildElement(findChildElement(For.FOR),
- cond, insertBefore);
-
- org.w3c.dom.Element elem=findChildElement(Until.UNTIL);
- if (elem != null) {
- getDOMElement().removeChild(elem);
- }
- }
-
- /**
- * This method returns the 'for' condition.
- *
- * @return The 'for' condition
- */
- public For getFor() {
- For ret=null;
-
- org.w3c.dom.Element elem=findChildElement(For.FOR);
- if (elem != null) {
- ret = new For(getModel(), elem);
- }
-
- return(ret);
- }
-
- /**
- * This method sets the activity associated with
- * the 'else' construct.
- *
- * @param act The activity
- */
- public void setActivity(BPELElement act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'else' construct.
- *
- * @return The activity
- */
- public BPELElement getActivity() {
- return(m_activity);
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof Scope) {
- ret = "@scope";
- } else {
- ret = "@activity";
- }
-
- return(ret);
- }
-
- private BPELElement m_activity;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnAlarm.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/OnAlarm.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnAlarm.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnAlarm.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,182 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the 'onAlarm' construct contained
+ * within the 'pick' activity.
+ */
+public class OnAlarm extends BPELElement {
+
+ private static final long serialVersionUID = 271323368015539L;
+
+ public static final String ONALARM="onAlarm";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public OnAlarm(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ m_activity = findChildActivity();
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public OnAlarm(BPELLanguageModel model) {
+ super(model, ONALARM);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+ /**
+ * This method sets the 'until' condition.
+ *
+ * @param cond The 'until' condition
+ */
+ public void setUntil(Until cond) {
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_activity != null) {
+ insertBefore = m_activity.getDOMElement();
+ }
+
+ setChildElement(findChildElement(Until.UNTIL),
+ cond, insertBefore);
+
+ org.w3c.dom.Element elem=findChildElement(For.FOR);
+ if (elem != null) {
+ getDOMElement().removeChild(elem);
+ }
+ }
+
+ /**
+ * This method returns the 'until' condition.
+ *
+ * @return The 'until' condition
+ */
+ public Until getUntil() {
+ Until ret=null;
+
+ org.w3c.dom.Element elem=findChildElement(Until.UNTIL);
+ if (elem != null) {
+ ret = new Until(getModel(), elem);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method sets the 'for' condition.
+ *
+ * @param cond The 'for' condition
+ */
+ public void setFor(For cond) {
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_activity != null) {
+ insertBefore = m_activity.getDOMElement();
+ }
+
+ setChildElement(findChildElement(For.FOR),
+ cond, insertBefore);
+
+ org.w3c.dom.Element elem=findChildElement(Until.UNTIL);
+ if (elem != null) {
+ getDOMElement().removeChild(elem);
+ }
+ }
+
+ /**
+ * This method returns the 'for' condition.
+ *
+ * @return The 'for' condition
+ */
+ public For getFor() {
+ For ret=null;
+
+ org.w3c.dom.Element elem=findChildElement(For.FOR);
+ if (elem != null) {
+ ret = new For(getModel(), elem);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method sets the activity associated with
+ * the 'else' construct.
+ *
+ * @param act The activity
+ */
+ public void setActivity(BPELElement act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'else' construct.
+ *
+ * @return The activity
+ */
+ public BPELElement getActivity() {
+ return(m_activity);
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof Scope) {
+ ret = "@scope";
+ } else {
+ ret = "@activity";
+ }
+
+ return(ret);
+ }
+
+ private BPELElement m_activity;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnEvent.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/OnEvent.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnEvent.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,191 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the 'onEvent' construct contained
- * within the 'EventHandler' element.
- */
-public class OnEvent extends BPELElement {
-
- private static final long serialVersionUID = -2444989267977027500L;
-
- private static final String PARTNER_LINK = "partnerLink";
- private static final String PORT_TYPE = "portType";
- private static final String OPERATION = "operation";
- private static final String VARIABLE = "variable";
-
- public static final String ONEVENT="onEvent";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public OnEvent(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- BPELElement elem=findChildActivity();
-
- if (elem instanceof Scope) {
- m_scope = (Scope)elem;
- }
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public OnEvent(BPELLanguageModel model) {
- super(model, ONEVENT);
- }
-
- /**
- * This method sets the operation.
- *
- * @param op The operation
- */
- public void setOperation(String op) {
- getDOMElement().setAttribute(OPERATION, op);
- }
-
- /**
- * This method returns the operation.
- *
- * @return The operation
- */
- public String getOperation() {
- return(getDOMElement().hasAttribute(OPERATION)?
- getDOMElement().getAttribute(OPERATION):null);
- }
-
- /**
- * This method sets the partner link.
- *
- * @param pl The partner link
- */
- public void setPartnerLink(String pl) {
- getDOMElement().setAttribute(PARTNER_LINK, pl);
- }
-
- /**
- * This method returns the partner link.
- *
- * @return The partner link
- */
- public String getPartnerLink() {
- return(getDOMElement().hasAttribute(PARTNER_LINK)?
- getDOMElement().getAttribute(PARTNER_LINK):null);
- }
-
- /**
- * This method sets the port type.
- *
- * @param pt The port type
- */
- public void setPortType(String pt) {
- getDOMElement().setAttribute(PORT_TYPE, pt);
- }
-
- /**
- * This method returns the port type.
- *
- * @return The port type
- */
- public String getPortType() {
- return(getDOMElement().hasAttribute(PORT_TYPE)?
- getDOMElement().getAttribute(PORT_TYPE):null);
- }
-
- /**
- * This method sets the variable.
- *
- * @param var The variable
- */
- public void setVariable(String var) {
- getDOMElement().setAttribute(VARIABLE, var);
- }
-
- /**
- * This method returns the variable.
- *
- * @return The variable
- */
- public String getVariable() {
- return(getDOMElement().hasAttribute(VARIABLE)?
- getDOMElement().getAttribute(VARIABLE):null);
- }
-
- /**
- * This method sets the scope associated with
- * the 'onEvent' construct.
- *
- * @param scope The scope
- */
- public void setScope(Scope scope) {
- m_scope = scope;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, scope,
- insertBefore);
- }
-
- /**
- * This method returns the scope associated with
- * the 'onEvent' construct.
- *
- * @return The scope
- */
- public Scope getScope() {
- return(m_scope);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof Scope) {
- ret += "@scope";
- }
-
- return(ret);
- }
-
- private Scope m_scope;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnEvent.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/OnEvent.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnEvent.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnEvent.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,191 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the 'onEvent' construct contained
+ * within the 'EventHandler' element.
+ */
+public class OnEvent extends BPELElement {
+
+ private static final long serialVersionUID = -2444989267977027500L;
+
+ private static final String PARTNER_LINK = "partnerLink";
+ private static final String PORT_TYPE = "portType";
+ private static final String OPERATION = "operation";
+ private static final String VARIABLE = "variable";
+
+ public static final String ONEVENT="onEvent";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public OnEvent(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ BPELElement elem=findChildActivity();
+
+ if (elem instanceof Scope) {
+ m_scope = (Scope)elem;
+ }
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public OnEvent(BPELLanguageModel model) {
+ super(model, ONEVENT);
+ }
+
+ /**
+ * This method sets the operation.
+ *
+ * @param op The operation
+ */
+ public void setOperation(String op) {
+ getDOMElement().setAttribute(OPERATION, op);
+ }
+
+ /**
+ * This method returns the operation.
+ *
+ * @return The operation
+ */
+ public String getOperation() {
+ return(getDOMElement().hasAttribute(OPERATION)?
+ getDOMElement().getAttribute(OPERATION):null);
+ }
+
+ /**
+ * This method sets the partner link.
+ *
+ * @param pl The partner link
+ */
+ public void setPartnerLink(String pl) {
+ getDOMElement().setAttribute(PARTNER_LINK, pl);
+ }
+
+ /**
+ * This method returns the partner link.
+ *
+ * @return The partner link
+ */
+ public String getPartnerLink() {
+ return(getDOMElement().hasAttribute(PARTNER_LINK)?
+ getDOMElement().getAttribute(PARTNER_LINK):null);
+ }
+
+ /**
+ * This method sets the port type.
+ *
+ * @param pt The port type
+ */
+ public void setPortType(String pt) {
+ getDOMElement().setAttribute(PORT_TYPE, pt);
+ }
+
+ /**
+ * This method returns the port type.
+ *
+ * @return The port type
+ */
+ public String getPortType() {
+ return(getDOMElement().hasAttribute(PORT_TYPE)?
+ getDOMElement().getAttribute(PORT_TYPE):null);
+ }
+
+ /**
+ * This method sets the variable.
+ *
+ * @param var The variable
+ */
+ public void setVariable(String var) {
+ getDOMElement().setAttribute(VARIABLE, var);
+ }
+
+ /**
+ * This method returns the variable.
+ *
+ * @return The variable
+ */
+ public String getVariable() {
+ return(getDOMElement().hasAttribute(VARIABLE)?
+ getDOMElement().getAttribute(VARIABLE):null);
+ }
+
+ /**
+ * This method sets the scope associated with
+ * the 'onEvent' construct.
+ *
+ * @param scope The scope
+ */
+ public void setScope(Scope scope) {
+ m_scope = scope;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, scope,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the scope associated with
+ * the 'onEvent' construct.
+ *
+ * @return The scope
+ */
+ public Scope getScope() {
+ return(m_scope);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof Scope) {
+ ret += "@scope";
+ }
+
+ return(ret);
+ }
+
+ private Scope m_scope;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnMessage.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/OnMessage.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnMessage.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,233 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.savara.bpel.model.util.TypeReferenceUtil;
-import org.scribble.protocol.model.*;
-
-/**
- * This class represents the 'onMessage' construct contained
- * within the 'pick' activity.
- */
-public class OnMessage extends BPELElement {
-
- private static final long serialVersionUID = -827946684365823245L;
-
- private static final String PARTNER_LINK = "partnerLink";
- private static final String PORT_TYPE = "portType";
- private static final String OPERATION = "operation";
- private static final String VARIABLE = "variable";
-
- public static final String ONMESSAGE="onMessage";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public OnMessage(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- m_activity = findChildActivity();
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public OnMessage(BPELLanguageModel model) {
- super(model, ONMESSAGE);
- }
-
- /**
- * This method sets the operation.
- *
- * @param op The operation
- */
- public void setOperation(String op) {
- getDOMElement().setAttribute(OPERATION, op);
- }
-
- /**
- * This method returns the operation.
- *
- * @return The operation
- */
- public String getOperation() {
- return(getDOMElement().hasAttribute(OPERATION)?
- getDOMElement().getAttribute(OPERATION):null);
- }
-
- /**
- * This method sets the partner link.
- *
- * @param pl The partner link
- */
- public void setPartnerLink(String pl) {
- getDOMElement().setAttribute(PARTNER_LINK, pl);
- }
-
- /**
- * This method returns the partner link.
- *
- * @return The partner link
- */
- public String getPartnerLink() {
- return(getDOMElement().hasAttribute(PARTNER_LINK)?
- getDOMElement().getAttribute(PARTNER_LINK):null);
- }
-
- /**
- * This method sets the port type.
- *
- * @param pt The port type
- */
- public void setPortType(String pt) {
- getDOMElement().setAttribute(PORT_TYPE, pt);
- }
-
- /**
- * This method returns the port type.
- *
- * @return The port type
- */
- public String getPortType() {
- return(getDOMElement().hasAttribute(PORT_TYPE)?
- getDOMElement().getAttribute(PORT_TYPE):null);
- }
-
- /**
- * This method sets the variable.
- *
- * @param var The variable
- */
- public void setVariable(String var) {
- getDOMElement().setAttribute(VARIABLE, var);
- }
-
- /**
- * This method returns the variable.
- *
- * @return The variable
- */
- public String getVariable() {
- return(getDOMElement().hasAttribute(VARIABLE)?
- getDOMElement().getAttribute(VARIABLE):null);
- }
-
- /**
- * This method sets the activity associated with
- * the 'else' construct.
- *
- * @param act The activity
- */
- public void setActivity(BPELElement act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'else' construct.
- *
- * @return The activity
- */
- public BPELElement getActivity() {
- return(m_activity);
- }
-
- /**
- * This method attempts to identify the server's partner role name.
- *
- * @return The partner role
- */
- protected String getServerPartnerRole() {
- String ret=getPartnerLink();
- int index=-1;
-
- if (ret != null && (index=ret.indexOf("To")) != -1) {
- ret = ret.substring(0, index);
- }
-
- return(ret);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
-
- Interaction interaction=new Interaction();
-
- Variable var=context.getVariable(getVariable());
-
- String xmlType=context.getProcess().getXMLType(var.getMessageType(),
- context.getEnvironmentContext());
-
- TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
-
- MessageSignature ms=new MessageSignature();
- ms.setOperation(getOperation());
- ms.getTypeReferences().add(tref);
-
- String fromRole=getServerPartnerRole();
-
- if (fromRole != null) {
- interaction.setFromRole(new Role(fromRole));
- }
-
- if (context.getRole() != null) {
- interaction.getToRoles().add(new Role(context.getRole()));
- }
-
- interaction.setMessageSignature(ms);
-
- activities.add(interaction);
-
- if (getActivity() != null) {
- getActivity().convert(activities, context);
- }
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof BPELActivity) {
- ret = "@activity";
- }
-
- return(ret);
- }
-
- private BPELElement m_activity;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnMessage.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/OnMessage.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnMessage.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/OnMessage.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,233 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.savara.bpel.util.TypeReferenceUtil;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class represents the 'onMessage' construct contained
+ * within the 'pick' activity.
+ */
+public class OnMessage extends BPELElement {
+
+ private static final long serialVersionUID = -827946684365823245L;
+
+ private static final String PARTNER_LINK = "partnerLink";
+ private static final String PORT_TYPE = "portType";
+ private static final String OPERATION = "operation";
+ private static final String VARIABLE = "variable";
+
+ public static final String ONMESSAGE="onMessage";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public OnMessage(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ m_activity = findChildActivity();
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public OnMessage(BPELLanguageModel model) {
+ super(model, ONMESSAGE);
+ }
+
+ /**
+ * This method sets the operation.
+ *
+ * @param op The operation
+ */
+ public void setOperation(String op) {
+ getDOMElement().setAttribute(OPERATION, op);
+ }
+
+ /**
+ * This method returns the operation.
+ *
+ * @return The operation
+ */
+ public String getOperation() {
+ return(getDOMElement().hasAttribute(OPERATION)?
+ getDOMElement().getAttribute(OPERATION):null);
+ }
+
+ /**
+ * This method sets the partner link.
+ *
+ * @param pl The partner link
+ */
+ public void setPartnerLink(String pl) {
+ getDOMElement().setAttribute(PARTNER_LINK, pl);
+ }
+
+ /**
+ * This method returns the partner link.
+ *
+ * @return The partner link
+ */
+ public String getPartnerLink() {
+ return(getDOMElement().hasAttribute(PARTNER_LINK)?
+ getDOMElement().getAttribute(PARTNER_LINK):null);
+ }
+
+ /**
+ * This method sets the port type.
+ *
+ * @param pt The port type
+ */
+ public void setPortType(String pt) {
+ getDOMElement().setAttribute(PORT_TYPE, pt);
+ }
+
+ /**
+ * This method returns the port type.
+ *
+ * @return The port type
+ */
+ public String getPortType() {
+ return(getDOMElement().hasAttribute(PORT_TYPE)?
+ getDOMElement().getAttribute(PORT_TYPE):null);
+ }
+
+ /**
+ * This method sets the variable.
+ *
+ * @param var The variable
+ */
+ public void setVariable(String var) {
+ getDOMElement().setAttribute(VARIABLE, var);
+ }
+
+ /**
+ * This method returns the variable.
+ *
+ * @return The variable
+ */
+ public String getVariable() {
+ return(getDOMElement().hasAttribute(VARIABLE)?
+ getDOMElement().getAttribute(VARIABLE):null);
+ }
+
+ /**
+ * This method sets the activity associated with
+ * the 'else' construct.
+ *
+ * @param act The activity
+ */
+ public void setActivity(BPELElement act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'else' construct.
+ *
+ * @return The activity
+ */
+ public BPELElement getActivity() {
+ return(m_activity);
+ }
+
+ /**
+ * This method attempts to identify the server's partner role name.
+ *
+ * @return The partner role
+ */
+ protected String getServerPartnerRole() {
+ String ret=getPartnerLink();
+ int index=-1;
+
+ if (ret != null && (index=ret.indexOf("To")) != -1) {
+ ret = ret.substring(0, index);
+ }
+
+ return(ret);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+
+ Interaction interaction=new Interaction();
+
+ Variable var=context.getVariable(getVariable());
+
+ String xmlType=context.getProcess().getXMLType(var.getMessageType(),
+ context.getEnvironmentContext());
+
+ TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
+
+ MessageSignature ms=new MessageSignature();
+ ms.setOperation(getOperation());
+ ms.getTypeReferences().add(tref);
+
+ String fromRole=getServerPartnerRole();
+
+ if (fromRole != null) {
+ interaction.setFromRole(new Role(fromRole));
+ }
+
+ if (context.getRole() != null) {
+ interaction.getToRoles().add(new Role(context.getRole()));
+ }
+
+ interaction.setMessageSignature(ms);
+
+ activities.add(interaction);
+
+ if (getActivity() != null) {
+ getActivity().convert(activities, context);
+ }
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof BPELActivity) {
+ ret = "@activity";
+ }
+
+ return(ret);
+ }
+
+ private BPELElement m_activity;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/PartnerLink.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/PartnerLink.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/PartnerLink.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,140 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the 'partnerLink' construct.
- */
-public class PartnerLink extends BPELElement {
-
- private static final long serialVersionUID = 8342639172267763736L;
-
- private static final String NAME = "name";
- private static final String PARTNER_LINK_TYPE = "partnerLinkType";
- private static final String MY_ROLE = "myRole";
- private static final String PARTNER_ROLE = "partnerRole";
-
- public static final String PARTNERLINK="partnerLink";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public PartnerLink(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public PartnerLink(BPELLanguageModel model) {
- super(model, PARTNERLINK);
- }
-
- /**
- * This method sets the name.
- *
- * @param name The name
- */
- public void setName(String name) {
- getDOMElement().setAttribute(NAME, name);
- }
-
- /**
- * This method returns the name.
- *
- * @return The name
- */
- public String getName() {
- return(getDOMElement().hasAttribute(NAME)?
- getDOMElement().getAttribute(NAME):null);
- }
-
- /**
- * This method sets the partner link type.
- *
- * @param pl The partner link type
- */
- public void setPartnerLinkType(String pl) {
- getDOMElement().setAttribute(PARTNER_LINK_TYPE, pl);
- }
-
- /**
- * This method returns the partner link type.
- *
- * @return The partner link type
- */
- public String getPartnerLinkType() {
- return(getDOMElement().hasAttribute(PARTNER_LINK_TYPE)?
- getDOMElement().getAttribute(PARTNER_LINK_TYPE):null);
- }
-
- /**
- * This method sets my role.
- *
- * @param role My role
- */
- public void setMyRole(String role) {
- getDOMElement().setAttribute(MY_ROLE, role);
- }
-
- /**
- * This method returns my role.
- *
- * @return My role
- */
- public String getMyRole() {
- return(getDOMElement().hasAttribute(MY_ROLE)?
- getDOMElement().getAttribute(MY_ROLE):null);
- }
-
- /**
- * This method sets partner role.
- *
- * @param role Partner role
- */
- public void setPartnerRole(String role) {
- getDOMElement().setAttribute(PARTNER_ROLE, role);
- }
-
- /**
- * This method returns partner role.
- *
- * @return Partner role
- */
- public String getPartnerRole() {
- return(getDOMElement().hasAttribute(PARTNER_ROLE)?
- getDOMElement().getAttribute(PARTNER_ROLE):null);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
- }
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/PartnerLink.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/PartnerLink.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/PartnerLink.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/PartnerLink.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,140 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the 'partnerLink' construct.
+ */
+public class PartnerLink extends BPELElement {
+
+ private static final long serialVersionUID = 8342639172267763736L;
+
+ private static final String NAME = "name";
+ private static final String PARTNER_LINK_TYPE = "partnerLinkType";
+ private static final String MY_ROLE = "myRole";
+ private static final String PARTNER_ROLE = "partnerRole";
+
+ public static final String PARTNERLINK="partnerLink";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public PartnerLink(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public PartnerLink(BPELLanguageModel model) {
+ super(model, PARTNERLINK);
+ }
+
+ /**
+ * This method sets the name.
+ *
+ * @param name The name
+ */
+ public void setName(String name) {
+ getDOMElement().setAttribute(NAME, name);
+ }
+
+ /**
+ * This method returns the name.
+ *
+ * @return The name
+ */
+ public String getName() {
+ return(getDOMElement().hasAttribute(NAME)?
+ getDOMElement().getAttribute(NAME):null);
+ }
+
+ /**
+ * This method sets the partner link type.
+ *
+ * @param pl The partner link type
+ */
+ public void setPartnerLinkType(String pl) {
+ getDOMElement().setAttribute(PARTNER_LINK_TYPE, pl);
+ }
+
+ /**
+ * This method returns the partner link type.
+ *
+ * @return The partner link type
+ */
+ public String getPartnerLinkType() {
+ return(getDOMElement().hasAttribute(PARTNER_LINK_TYPE)?
+ getDOMElement().getAttribute(PARTNER_LINK_TYPE):null);
+ }
+
+ /**
+ * This method sets my role.
+ *
+ * @param role My role
+ */
+ public void setMyRole(String role) {
+ getDOMElement().setAttribute(MY_ROLE, role);
+ }
+
+ /**
+ * This method returns my role.
+ *
+ * @return My role
+ */
+ public String getMyRole() {
+ return(getDOMElement().hasAttribute(MY_ROLE)?
+ getDOMElement().getAttribute(MY_ROLE):null);
+ }
+
+ /**
+ * This method sets partner role.
+ *
+ * @param role Partner role
+ */
+ public void setPartnerRole(String role) {
+ getDOMElement().setAttribute(PARTNER_ROLE, role);
+ }
+
+ /**
+ * This method returns partner role.
+ *
+ * @return Partner role
+ */
+ public String getPartnerRole() {
+ return(getDOMElement().hasAttribute(PARTNER_ROLE)?
+ getDOMElement().getAttribute(PARTNER_ROLE):null);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Pick.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Pick.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Pick.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,283 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents a pick grouping activity.
- *
- * @author gary
- */
-public class Pick extends BPELActivity {
-
- private static final long serialVersionUID = -2235972351406517577L;
-
- public static final String PICK = "pick";
- public static final String CREATE_INSTANCE = "createInstance";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Pick(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- java.util.List<BPELElement> onmesgs=
- findChildElements(OnMessage.class);
-
- for (int i=0; i < onmesgs.size(); i++) {
- if (onmesgs.get(i) instanceof OnMessage) {
- m_onMessages.add((OnMessage)onmesgs.get(i));
- }
- }
-
- java.util.List<BPELElement> onalrms=
- findChildElements(OnAlarm.class);
-
- for (int i=0; i < onalrms.size(); i++) {
- if (onalrms.get(i) instanceof OnAlarm) {
- m_onAlarms.add((OnAlarm)onalrms.get(i));
- }
- }
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Pick(BPELLanguageModel model) {
- super(model, PICK);
- }
-
- /**
- * This method sets the 'create instance'
- * attribute.
- *
- * @param b Whether to create instance
- */
- public void setCreateInstance(boolean b) {
- String create=(b?"yes":"no");
-
- getDOMElement().setAttribute(CREATE_INSTANCE, create);
- }
-
- /**
- * This method returns whether to create instance.
- *
- * @return Whether to create instance
- */
- public boolean getCreateInstance() {
- boolean ret=false;
- String create=
- getDOMElement().getAttribute(CREATE_INSTANCE);
-
- if (create != null &&
- create.equals("yes")) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method adds an 'onMessage' to the grouping construct.
- *
- * @param on The 'onMessage' to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addOnMessage(OnMessage on, int pos) {
- if (pos == -1 || pos >= m_onMessages.size()) {
- m_onMessages.add(on);
-
- org.w3c.dom.Element insertBefore=null;
-
- if (m_onAlarms.size() > 0) {
- insertBefore = m_onAlarms.get(0).getDOMElement();
- }
-
- setChildElement(null, on, insertBefore);
- } else {
-
- OnMessage cur=m_onMessages.get(pos);
-
- m_onMessages.add(pos, on);
-
- if (cur != null) {
- setChildElement(null, on,
- cur.getDOMElement());
- } else {
- org.w3c.dom.Element insertBefore=null;
-
- if (m_onAlarms.size() > 0) {
- insertBefore = m_onAlarms.get(0).getDOMElement();
- }
-
- setChildElement(null, on, insertBefore);
- }
- }
- }
-
- /**
- * This method removes an 'onMessage' from the grouping
- * construct.
- *
- * @param on The 'onMessage' to be removed
- * @return Whether the 'onMessage' was removed
- */
- public boolean removeOnMessage(OnMessage on) {
- boolean ret=m_onMessages.remove(on);
-
- if (ret) {
- getDOMElement().removeChild(on.getDOMElement());
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of 'onMessage' associated
- * with the grouping construct.
- *
- * @return The list of 'onMessage' elements
- */
- public java.util.List<OnMessage> getOnMessages() {
- return(m_onMessages);
- }
-
- /**
- * This method adds an 'onAlarm' to the grouping construct.
- *
- * @param on The 'onAlarm' to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addOnAlarm(OnAlarm on, int pos) {
- if (pos == -1 || pos >= m_onAlarms.size()) {
- m_onAlarms.add(on);
-
- setChildElement(null, on, null);
- } else {
-
- OnAlarm cur=m_onAlarms.get(pos);
-
- m_onAlarms.add(pos, on);
-
- if (cur != null) {
- setChildElement(null, on,
- cur.getDOMElement());
- } else {
- setChildElement(null, on, null);
- }
- }
- }
-
- /**
- * This method removes an 'onAlarm' from the grouping
- * construct.
- *
- * @param on The 'onAlarm' to be removed
- * @return Whether the 'onAlarm' was removed
- */
- public boolean removeOnAlarm(OnAlarm on) {
- boolean ret=m_onAlarms.remove(on);
-
- if (ret) {
- getDOMElement().removeChild(on.getDOMElement());
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of 'onAlarm' associated
- * with the grouping construct.
- *
- * @return The list of 'onAlarm' elements
- */
- public java.util.List<OnAlarm> getOnAlarms() {
- return(m_onAlarms);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(Journal l) {
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- //getSource().setComponentURI(getURI());
-
- org.scribble.protocol.model.Choice elem=
- new org.scribble.protocol.model.Choice();
-
- // Convert 'onMessage' paths
- for (int i=0; i < getOnMessages().size(); i++) {
- OnMessage onMessageElem=getOnMessages().get(i);
-
- When cb = new When();
-
- onMessageElem.convert(cb.getBlock().getContents(), context);
-
- elem.getWhens().add(cb);
- }
-
- // TODO: If alarms defined, then model these using a
- // try/catch with interrupt?
-
- activities.add(elem);
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof OnMessage) {
- ret += "@onMessage."+getOnMessages().indexOf(elem);
- } else if (elem instanceof OnAlarm) {
- ret += "@onAlarm."+getOnAlarms().indexOf(elem);
- }
-
- return(ret);
- }
-
- private java.util.List<OnMessage> m_onMessages=
- new java.util.Vector<OnMessage>();
- private java.util.List<OnAlarm> m_onAlarms=
- new java.util.Vector<OnAlarm>();
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Pick.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Pick.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Pick.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Pick.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,283 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents a pick grouping activity.
+ *
+ * @author gary
+ */
+public class Pick extends BPELActivity {
+
+ private static final long serialVersionUID = -2235972351406517577L;
+
+ public static final String PICK = "pick";
+ public static final String CREATE_INSTANCE = "createInstance";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Pick(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ java.util.List<BPELElement> onmesgs=
+ findChildElements(OnMessage.class);
+
+ for (int i=0; i < onmesgs.size(); i++) {
+ if (onmesgs.get(i) instanceof OnMessage) {
+ m_onMessages.add((OnMessage)onmesgs.get(i));
+ }
+ }
+
+ java.util.List<BPELElement> onalrms=
+ findChildElements(OnAlarm.class);
+
+ for (int i=0; i < onalrms.size(); i++) {
+ if (onalrms.get(i) instanceof OnAlarm) {
+ m_onAlarms.add((OnAlarm)onalrms.get(i));
+ }
+ }
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Pick(BPELLanguageModel model) {
+ super(model, PICK);
+ }
+
+ /**
+ * This method sets the 'create instance'
+ * attribute.
+ *
+ * @param b Whether to create instance
+ */
+ public void setCreateInstance(boolean b) {
+ String create=(b?"yes":"no");
+
+ getDOMElement().setAttribute(CREATE_INSTANCE, create);
+ }
+
+ /**
+ * This method returns whether to create instance.
+ *
+ * @return Whether to create instance
+ */
+ public boolean getCreateInstance() {
+ boolean ret=false;
+ String create=
+ getDOMElement().getAttribute(CREATE_INSTANCE);
+
+ if (create != null &&
+ create.equals("yes")) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method adds an 'onMessage' to the grouping construct.
+ *
+ * @param on The 'onMessage' to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addOnMessage(OnMessage on, int pos) {
+ if (pos == -1 || pos >= m_onMessages.size()) {
+ m_onMessages.add(on);
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_onAlarms.size() > 0) {
+ insertBefore = m_onAlarms.get(0).getDOMElement();
+ }
+
+ setChildElement(null, on, insertBefore);
+ } else {
+
+ OnMessage cur=m_onMessages.get(pos);
+
+ m_onMessages.add(pos, on);
+
+ if (cur != null) {
+ setChildElement(null, on,
+ cur.getDOMElement());
+ } else {
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_onAlarms.size() > 0) {
+ insertBefore = m_onAlarms.get(0).getDOMElement();
+ }
+
+ setChildElement(null, on, insertBefore);
+ }
+ }
+ }
+
+ /**
+ * This method removes an 'onMessage' from the grouping
+ * construct.
+ *
+ * @param on The 'onMessage' to be removed
+ * @return Whether the 'onMessage' was removed
+ */
+ public boolean removeOnMessage(OnMessage on) {
+ boolean ret=m_onMessages.remove(on);
+
+ if (ret) {
+ getDOMElement().removeChild(on.getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of 'onMessage' associated
+ * with the grouping construct.
+ *
+ * @return The list of 'onMessage' elements
+ */
+ public java.util.List<OnMessage> getOnMessages() {
+ return(m_onMessages);
+ }
+
+ /**
+ * This method adds an 'onAlarm' to the grouping construct.
+ *
+ * @param on The 'onAlarm' to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addOnAlarm(OnAlarm on, int pos) {
+ if (pos == -1 || pos >= m_onAlarms.size()) {
+ m_onAlarms.add(on);
+
+ setChildElement(null, on, null);
+ } else {
+
+ OnAlarm cur=m_onAlarms.get(pos);
+
+ m_onAlarms.add(pos, on);
+
+ if (cur != null) {
+ setChildElement(null, on,
+ cur.getDOMElement());
+ } else {
+ setChildElement(null, on, null);
+ }
+ }
+ }
+
+ /**
+ * This method removes an 'onAlarm' from the grouping
+ * construct.
+ *
+ * @param on The 'onAlarm' to be removed
+ * @return Whether the 'onAlarm' was removed
+ */
+ public boolean removeOnAlarm(OnAlarm on) {
+ boolean ret=m_onAlarms.remove(on);
+
+ if (ret) {
+ getDOMElement().removeChild(on.getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of 'onAlarm' associated
+ * with the grouping construct.
+ *
+ * @return The list of 'onAlarm' elements
+ */
+ public java.util.List<OnAlarm> getOnAlarms() {
+ return(m_onAlarms);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(Journal l) {
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ //getSource().setComponentURI(getURI());
+
+ org.scribble.protocol.model.Choice elem=
+ new org.scribble.protocol.model.Choice();
+
+ // Convert 'onMessage' paths
+ for (int i=0; i < getOnMessages().size(); i++) {
+ OnMessage onMessageElem=getOnMessages().get(i);
+
+ When cb = new When();
+
+ onMessageElem.convert(cb.getBlock().getContents(), context);
+
+ elem.getWhens().add(cb);
+ }
+
+ // TODO: If alarms defined, then model these using a
+ // try/catch with interrupt?
+
+ activities.add(elem);
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof OnMessage) {
+ ret += "@onMessage."+getOnMessages().indexOf(elem);
+ } else if (elem instanceof OnAlarm) {
+ ret += "@onAlarm."+getOnAlarms().indexOf(elem);
+ }
+
+ return(ret);
+ }
+
+ private java.util.List<OnMessage> m_onMessages=
+ new java.util.Vector<OnMessage>();
+ private java.util.List<OnAlarm> m_onAlarms=
+ new java.util.Vector<OnAlarm>();
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Process.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Process.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Process.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,976 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import javax.wsdl.xml.WSDLReader;
-import javax.xml.namespace.QName;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.util.InteractionUtil;
-import org.savara.util.XMLUtils;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-/**
- * This class represents a BPEL process.
- *
- * @author gary
- */
-public class Process extends BPELElement implements ScopeActivity {
-
- private static final long serialVersionUID = 3400962966628415184L;
-
- public static final String PROCESS = "process";
- public static final String NAME = "name";
- public static final String TARGET_NAMESPACE = "targetNamespace";
- public static final String CONVERSATION_TYPE = "conversationType";
- public static final String BPEL_PREFIX = "bpel";
-
- public static final String CONVERSATION_NS="http://www.scribble.org/conversation";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Process(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- java.util.List<BPELElement> imports=findChildElements(Import.class);
- for (BPELElement elem : imports) {
- m_imports.add((Import)elem);
- }
-
- m_partnerLinksElem = findChildElement("partnerLinks");
-
- if (m_partnerLinksElem != null) {
- java.util.List<BPELElement> elems=
- findChildElements(m_partnerLinksElem,
- PartnerLink.class);
-
- for (int i=0; i < elems.size(); i++) {
- m_partnerLinks.add((PartnerLink)elems.get(i));
- }
- }
-
- m_variablesElem = findChildElement("variables");
-
- if (m_variablesElem != null) {
- java.util.List<BPELElement> elems=
- findChildElements(m_variablesElem,
- Variable.class);
-
- for (int i=0; i < elems.size(); i++) {
- m_variables.add((Variable)elems.get(i));
- }
- }
-
- //m_messageExchangesElem = findChildElement("messageExchanges");
- //m_correlationSetsElem = findChildElement("correlationSets");
-
- org.w3c.dom.Element ehs=findChildElement(EventHandlers.EVENTHANDLERS);
- if (ehs != null) {
- m_eventHandlers = new EventHandlers(model, ehs);
- }
-
- org.w3c.dom.Element fhs=findChildElement(FaultHandlers.FAULTHANDLERS);
- if (fhs != null) {
- m_faultHandlers = new FaultHandlers(model, fhs);
- }
-
- m_activity = findChildActivity();
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Process(BPELLanguageModel model) {
- super(model, PROCESS);
-
- initNamespace(BPEL_NS, BPEL_PREFIX);
- }
-
- /**
- * This method adds an import to the scope.
- *
- * @param imp The import to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addImport(Import imp, int pos) {
-
- if (pos != -1 && pos < m_imports.size()) {
- m_imports.add(pos, imp);
- } else {
- m_imports.add(imp);
- }
-
- java.util.List<BPELElement> children=findChildElements(BPELElement.class);
-
- org.w3c.dom.Node newNode=imp.getDOMElement().cloneNode(true);
-
- getDOMElement().getOwnerDocument().adoptNode(newNode);
-
- if (pos != -1 && pos < children.size()) {
- getDOMElement().insertBefore(newNode, children.get(pos).getDOMElement());
- } else {
- getDOMElement().appendChild(newNode);
- }
- }
-
- /**
- * This method removes a partner link from the grouping
- * construct.
- *
- * @param pl The partner link to be removed
- * @return Whether the partner link was removed
- */
- public boolean removeImport(Import imp) {
- boolean ret=m_imports.remove(imp);
-
- if (ret) {
- getDOMElement().removeChild(imp.getDOMElement());
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of imports.
- *
- * @return The imports
- */
- public java.util.List<Import> getImports() {
- return(m_imports);
- }
-
- /**
- * This method searches the defined WSDL definitions to identify
- * the underlying XML element/type associated with the supplied
- * WSDL message type.
- *
- * @param wsdlMessageType The WSDL message type
- * @param context The context
- * @return The underlying XML element/type, or null if not found
- */
- public String getXMLType(String wsdlMessageType, Context context) {
- String ret=null;
-
- // Resolve the namespace prefix
- int index=wsdlMessageType.indexOf(':');
-
- if (index != -1 && context != null) {
- String prefix=wsdlMessageType.substring(0, index);
-
- String namespace=getNamespace(prefix);
-
- wsdlMessageType = wsdlMessageType.substring(index+1);
-
- for (Import imp : getImports()) {
-
- // Check if import relates to the correct namespace
- if (imp.getNamespace() != null &&
- imp.getNamespace().equals(namespace) &&
- imp.getLocation() != null &&
- imp.getLocation().endsWith(".wsdl")) {
-
- java.net.URI uri=
- context.getResourceURI(getModel().getModelReference(),
- imp.getLocation());
-
- if (uri != null) {
- ret = getXMLType(imp.getNamespace(), wsdlMessageType, uri);
-
- if (ret != null) {
- break;
- }
- }
- }
- }
- }
-
- return(ret);
- }
-
- protected String getXMLType(String namespace, String wsdlMessageType, java.net.URI uri) {
- String ret=null;
-
- try {
- WSDLReader reader=javax.wsdl.factory.WSDLFactory.newInstance().newWSDLReader();
-
- javax.wsdl.Definition defn=reader.readWSDL(uri.toString());
-
- if (defn != null) {
- javax.wsdl.Message mesg=defn.getMessage(new QName(namespace, wsdlMessageType));
-
- if (mesg != null && mesg.getParts().size() == 1) {
- javax.wsdl.Part part=(javax.wsdl.Part)
- mesg.getParts().values().iterator().next();
-
- if (part.getElementName() != null) {
- ret = part.getElementName().toString();
- } else if (part.getTypeName() != null) {
- ret = part.getTypeName().toString();
- }
- }
- }
-
- } catch(Exception e) {
- logger.error("Failed to read WSDL", e);
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of partner links.
- *
- * @return The partner links
- */
- public java.util.List<PartnerLink> getPartnerLinks() {
- return(m_partnerLinks);
- }
-
- /**
- * This method returns the partner link associated
- * with the supplied name.
- *
- * @param name The name
- * @return The partner link, or null if not found
- */
- public PartnerLink getPartnerLink(String name) {
- PartnerLink ret=null;
-
- for (int i=0; ret == null && i < m_partnerLinks.size(); i++) {
- if (m_partnerLinks.get(i).getName().equals(name)) {
- ret = m_partnerLinks.get(i);
- }
- }
-
- return(ret);
- }
-
- /**
- * This method adds a partner link to the scope.
- *
- * @param pl The partner link to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addPartnerLink(PartnerLink pl, int pos) {
-
- if (m_partnerLinksElem == null) {
- m_partnerLinksElem = getDOMElement().getOwnerDocument().
- createElementNS(BPEL_NS, "partnerLinks");
-
- // Add to parent
- org.w3c.dom.Element insertBefore=
- findChildElement("messageExchanges");
-
- if (insertBefore == null) {
- insertBefore = findChildElement("variables");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("correlationSets");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("faultHandlers");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("eventHandlers");
- }
-
- if (insertBefore == null) {
- BPELElement elem=findChildActivity();
-
- if (elem != null) {
- insertBefore = elem.getDOMElement();
- }
- }
-
- if (insertBefore != null) {
- getDOMElement().insertBefore(m_partnerLinksElem, insertBefore);
- } else {
- getDOMElement().appendChild(m_partnerLinksElem);
- }
- }
-
- if (pos == -1 || pos >= m_partnerLinks.size()) {
- m_partnerLinks.add(pl);
-
- setChildElement(m_partnerLinksElem, null, pl, null);
- } else {
-
- PartnerLink cur=m_partnerLinks.get(pos);
-
- m_partnerLinks.add(pos, pl);
-
- if (cur != null) {
- setChildElement(m_partnerLinksElem, null, pl,
- cur.getDOMElement());
- } else {
- setChildElement(m_partnerLinksElem, null, pl, null);
- }
- }
- }
-
- /**
- * This method removes a partner link from the grouping
- * construct.
- *
- * @param pl The partner link to be removed
- * @return Whether the partner link was removed
- */
- public boolean removePartnerLink(PartnerLink pl) {
- boolean ret=m_partnerLinks.remove(pl);
-
- if (ret) {
- m_partnerLinksElem.removeChild(pl.getDOMElement());
- }
-
- return(ret);
- }
-
- /**
- * This method sets the name.
- *
- * @param name The name
- */
- public void setName(String name) {
- getDOMElement().setAttribute(NAME, name);
- }
-
- /**
- * This method returns the name.
- *
- * @return The name
- */
- public String getName() {
- return(getDOMElement().hasAttribute(NAME)?
- getDOMElement().getAttribute(NAME):null);
- }
-
- /**
- * This method sets the target namespace.
- *
- * @param tns The target namespace
- */
- public void setTargetNamespace(String tns) {
- getDOMElement().setAttribute(TARGET_NAMESPACE, tns);
- }
-
- /**
- * This method returns the target namespace.
- *
- * @return The target namespace
- */
- public String getTargetNamespace() {
- return(getDOMElement().hasAttribute(TARGET_NAMESPACE)?
- getDOMElement().getAttribute(TARGET_NAMESPACE):null);
- }
-
- /**
- * This method sets the conversation type.
- *
- * @param ctype The conversation type
- */
- public void setConversationType(String ctype) {
- getDOMElement().setAttributeNS(CONVERSATION_NS, CONVERSATION_TYPE, ctype);
- }
-
- /**
- * This method returns the conversation type.
- *
- * @return The conversation type
- */
- public String getConversationType() {
- return(getDOMElement().hasAttributeNS(CONVERSATION_NS, CONVERSATION_TYPE)?
- getDOMElement().getAttributeNS(CONVERSATION_NS, CONVERSATION_TYPE):null);
- }
-
- /**
- * This method returns the prefix associated with the
- * supplied namespace.
- *
- * @param namespace The namespace
- * @return The prefix, or null if not found
- */
- public String getPrefix(String namespace) {
- String ret=null;
-
- org.w3c.dom.NamedNodeMap map=getDOMElement().getAttributes();
-
- for (int i=0; ret == null && i < map.getLength(); i++) {
- org.w3c.dom.Node node=map.item(i);
-
- if (node instanceof org.w3c.dom.Attr) {
- org.w3c.dom.Attr attr=(org.w3c.dom.Attr)node;
-
- if (attr.getNodeValue().equals(namespace) &&
- attr.getNodeName().startsWith("xmlns:")) {
- ret = attr.getNodeName().substring(6);
- }
- }
- }
-
- return(ret);
- }
-
- /**
- * This method returns the namespace for the supplied prefix.
- *
- * @param prefix The prefix
- * @return The namespace, or null if not found
- */
- public String getNamespace(String prefix) {
- String ret=null;
-
- org.w3c.dom.NamedNodeMap map=getDOMElement().getAttributes();
-
- for (int i=0; ret == null && i < map.getLength(); i++) {
- org.w3c.dom.Node node=map.item(i);
-
- if (node instanceof org.w3c.dom.Attr) {
- org.w3c.dom.Attr attr=(org.w3c.dom.Attr)node;
-
- if (attr.getNodeName().equals("xmlns:"+prefix) ||
- attr.getNodeName().equals(prefix)) {
- ret = attr.getNodeValue();
- }
- }
- }
-
- return(ret);
- }
-
- /**
- * This method initialises the prefix associated with the supplied
- * namespace.
- *
- * @param namespace
- * @param prefix
- */
- public void initNamespace(String namespace, String prefix) {
- getDOMElement().setAttribute("xmlns:"+prefix, namespace);
- }
-
- /**
- * This method adds a new namespace and returns the
- * prefix allocated to it.
- *
- * @param namespace The namespace to be added
- * @return The prefix
- */
- public String addNamespace(String namespace) {
- String ret=getPrefix(namespace);
- int i=1;
-
- while (ret == null) {
- String prefix="ns"+(i++);
-
- if (getDOMElement().hasAttribute("xmlns:"+prefix) == false) {
- ret = prefix;
-
- getDOMElement().setAttribute("xmlns:"+prefix, namespace);
- }
- }
-
- return(ret);
- }
-
- /**
- * This method adds a variable to the scope.
- *
- * @param var The variable to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addVariable(Variable var, int pos) {
-
- if (m_variablesElem == null) {
- m_variablesElem = getDOMElement().getOwnerDocument().
- createElementNS(BPEL_NS, "variables");
-
- // Add to parent
- org.w3c.dom.Element insertBefore=
- findChildElement("correlationSets");
-
- if (insertBefore == null) {
- insertBefore = findChildElement("faultHandlers");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("eventHandlers");
- }
-
- if (insertBefore == null) {
- BPELElement elem=findChildActivity();
-
- if (elem != null) {
- insertBefore = elem.getDOMElement();
- }
- }
-
- if (insertBefore != null) {
- getDOMElement().insertBefore(m_variablesElem, insertBefore);
- } else {
- getDOMElement().appendChild(m_variablesElem);
- }
- }
-
- if (pos == -1 || pos >= m_variables.size()) {
- m_variables.add(var);
-
- setChildElement(m_variablesElem, null, var, null);
- } else {
-
- Variable cur=m_variables.get(pos);
-
- m_variables.add(pos, var);
-
- if (cur != null) {
- setChildElement(m_variablesElem, null, var,
- cur.getDOMElement());
- } else {
- setChildElement(m_variablesElem, null, var, null);
- }
- }
- }
-
- /**
- * This method removes an activity from the grouping
- * construct.
- *
- * @param act The activity to be removed
- * @return Whether the activity was removed
- */
- public boolean removeVariable(Variable var) {
- boolean ret=m_variables.remove(var);
-
- if (ret) {
- m_variablesElem.removeChild(var.getDOMElement());
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of variables.
- *
- * @return The
- */
- public java.util.List<Variable> getVariables() {
- return(m_variables);
- }
-
- /**
- * This method returns the variable associated
- * with the supplied name.
- *
- * @param name The name
- * @return The variable, or null if not found
- */
- public Variable getVariable(String name) {
- Variable ret=null;
-
- for (int i=0; ret == null && i < m_variables.size(); i++) {
- if (m_variables.get(i).getName().equals(name)) {
- ret = m_variables.get(i);
- }
- }
-
- return(ret);
- }
-
- /**
- * This method sets the activity associated with
- * the 'else' construct.
- *
- * @param act The activity
- */
- public void setActivity(BPELActivity act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'else' construct.
- *
- * @return The activity
- */
- public BPELActivity getActivity() {
- return(m_activity);
- }
-
- /**
- * This method sets the 'eventHandlers' path.
- *
- * @param elem The 'eventHandlers' path
- */
- public void setEventHandlers(EventHandlers elem) {
- org.w3c.dom.Element existingElem=null;
-
- if (m_eventHandlers != null) {
- existingElem = m_eventHandlers.getDOMElement();
- }
-
- m_eventHandlers = elem;
-
- org.w3c.dom.Element insertBefore=null;
-
- if (insertBefore == null) {
- BPELElement act=findChildActivity();
-
- if (elem != null) {
- insertBefore = act.getDOMElement();
- }
- }
-
- setChildElement(existingElem, elem,
- insertBefore);
- }
-
- /**
- * This method returns the 'eventHandlers' path.
- *
- * @return The 'eventHandlers' path
- */
- public EventHandlers getEventHandlers() {
- return(m_eventHandlers);
- }
-
- /**
- * This method sets the 'faultHandlers' path.
- *
- * @param elem The 'faultHandlers' path
- */
- public void setFaultHandlers(FaultHandlers elem) {
- org.w3c.dom.Element existingElem=null;
-
- if (m_faultHandlers != null) {
- existingElem = m_faultHandlers.getDOMElement();
- }
-
- m_faultHandlers = elem;
-
- org.w3c.dom.Element insertBefore=null;
-
- if (insertBefore == null) {
- insertBefore = findChildElement("eventHandlers");
- }
-
- if (insertBefore == null) {
- BPELElement act=findChildActivity();
-
- if (elem != null) {
- insertBefore = act.getDOMElement();
- }
- }
-
- setChildElement(existingElem, elem,
- insertBefore);
- }
-
- /**
- * This method returns the 'faultHandlers' path.
- *
- * @return The 'faultHandlers' path
- */
- public FaultHandlers getFaultHandlers() {
- return(m_faultHandlers);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(Journal l) {
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- public void convert(java.util.List<Activity> activities,
- ConversionContext context) {
-
- // Add variables to the context
- for (int i=0; i < m_variables.size(); i++) {
- context.addVariable(m_variables.get(i));
- }
-
- // Count number of invoke activities
- int invokeCount=InteractionUtil.countInvokes(getActivity().getDOMElement());
-
- // Check whether scope has been defined to represent
- // an interaction with one or more fault responses and
- // no event handlers
- Invoke invoke=null;
-
- if (invokeCount == 1 &&
- m_faultHandlers != null && (m_faultHandlers.getCatchPaths().size() > 0 ||
- m_faultHandlers.getCatchAll() != null) &&
- (m_eventHandlers == null || (m_eventHandlers.getOnEvents().size() == 0 &&
- m_eventHandlers.getOnAlarms().size() == 0)) &&
- (invoke = InteractionUtil.getInvoke(m_activity)) != null) {
-
- invoke.convertRequest(activities, context);
-
- // Create choice with normal response and fault paths
- org.scribble.protocol.model.Choice choice=new org.scribble.protocol.model.Choice();
-
- When cb=new When();
-
- invoke.convertResponse(cb.getBlock().getContents(), context);
-
- // Include remaining activities
- if (m_activity instanceof Sequence) {
- for (int i=1; i < ((Sequence)m_activity).getActivities().size(); i++) {
- ((Sequence)m_activity).getActivities().get(i).convert(cb.getBlock().getContents(), context);
- }
- }
-
- choice.getWhens().add(cb);
-
- // Process fault handlers
- for (int i=0; i < m_faultHandlers.getCatchPaths().size(); i++) {
- Catch catchBlock=m_faultHandlers.getCatchPaths().get(i);
-
- When fcb=new When();
-
- String mesgType=catchBlock.getFaultMessageType();
-
- if (mesgType == null) {
- mesgType = catchBlock.getFaultMessageElement();
- }
-
- Variable faultVar=null;
-
- if (catchBlock.getFaultVariable() != null) {
- faultVar = new Variable(getModel());
- faultVar.setName(catchBlock.getFaultVariable());
- faultVar.setMessageType(catchBlock.getFaultMessageType());
- faultVar.setElement(catchBlock.getFaultMessageElement());
- context.addVariable(faultVar);
- }
-
- invoke.convertFaultResponse(fcb.getBlock().getContents(), catchBlock.getFaultVariable(),
- mesgType, context);
-
- if (catchBlock.getActivity() != null) {
- catchBlock.getActivity().convert(fcb.getBlock().getContents(), context);
- }
-
- choice.getWhens().add(fcb);
-
- if (faultVar != null) {
- context.removeVariable(faultVar);
- }
- }
-
- activities.add(choice);
- } else {
- // Store in local var, in case try/catch block needs to be
- // added
- java.util.List<Activity> acts=activities;
-
- // Check if try/catch block is required
- if (getFaultHandlers() != null &&
- (getFaultHandlers().getCatchPaths().size() > 0 ||
- getFaultHandlers().getCatchAll() != null)) {
- org.scribble.protocol.model.Try te=
- new org.scribble.protocol.model.Try();
- te.derivedFrom(this);
- te.getBlock().derivedFrom(this);
-
- acts.add(te);
-
- acts = te.getBlock().getContents();
-
- for (int i=0; i < getFaultHandlers().getCatchPaths().size(); i++) {
- Catch catchPath=getFaultHandlers().getCatchPaths().get(i);
-
- org.scribble.protocol.model.Catch cb=
- new org.scribble.protocol.model.Catch();
- cb.derivedFrom(catchPath);
-
- /* TODO: How to deal with catch based on type?
- *
- *
- TypeReference tref=new TypeReference();
- tref.setName(XMLUtils.getLocalname(catchPath.getFaultName()));
- cb.setType(tref);
- */
-
- Variable faultVar=null;
-
- if (catchPath.getFaultVariable() != null) {
- faultVar = new Variable(getModel());
- faultVar.setName(catchPath.getFaultVariable());
- faultVar.setMessageType(catchPath.getFaultMessageType());
- faultVar.setElement(catchPath.getFaultMessageElement());
- context.addVariable(faultVar);
- }
-
- if (catchPath.getActivity() != null) {
- catchPath.getActivity().convert(cb.getBlock().getContents(), context);
- }
-
- if (faultVar != null) {
- context.removeVariable(faultVar);
- }
-
- te.getCatches().add(cb);
- }
- }
-
- // Convert normal activities in scope
- if (getActivity() != null) {
- getActivity().convert(acts, context);
- }
- }
- }
-
- /**
- * This method returns the conversion associated with the
- * BPEL process.
- *
- * @param envContext The environment context
- * @return The conversation
- */
- public Protocol convert(Context envContext) {
- Protocol ret=new Protocol();
-
- ret.derivedFrom(this);
- ret.getBlock().derivedFrom(this);
-
- // Configure model name
- ret.setName(getName());
-
- // Define implements reference for conversation type
- //String convType=getConversationType();
- String role=null;
-
- /*
- if (convType != null) {
- int index=convType.indexOf('@');
-
- if (index != -1) {
- // TODO: Need to think whether this should be
- // 'implements' reference. If so, then need to change
- // Java Lang Model parser and also Lang Model conformance
- // rule.
- ImplementsReference iref=
- new ImplementsReference(ConversationNotation.NOTATION_CODE);
-
- role = convType.substring(index+1);
-
- iref.setLocatedRole(role);
-
- // Need to locate the model name
- modelName.setRole(new Role(iref.getLocatedRole()));
-
- String mainpart=convType.substring(0, index);
-
- index = mainpart.lastIndexOf(".");
-
- if (index == -1) {
- iref.setNamespace("");
- iref.setLocalpart(mainpart);
- } else {
- iref.setNamespace(mainpart.substring(0, index));
- iref.setLocalpart(mainpart.substring(index+1));
- }
-
- ret.getImplements().add(iref);
-
- } else {
- logger.warn("Conversation type does not " +
- "contain '@' located role separator");
- }
- }
- */
-
- // Convert the process contents
- DefaultConversionContext context=new DefaultConversionContext(role, this, envContext);
-
- // Add variables to the context
- for (int i=0; i < m_variables.size(); i++) {
- context.addVariable(m_variables.get(i));
- }
-
- convert(ret.getBlock().getContents(), context);
-
- return(ret);
- }
-
- protected String getParentURI(BPELElement elem) {
- String ret="//";
-
- if (elem instanceof BPELActivity) {
- ret += "@activity";
- } else if (elem instanceof FaultHandlers) {
- ret += "@faultHandlers";
- } else if (elem instanceof EventHandlers) {
- ret += "@eventHandlers";
- }
-
- return(ret);
- }
-
- private static Log logger = LogFactory.getLog(Process.class);
-
- private org.w3c.dom.Element m_partnerLinksElem=null;
- //private org.w3c.dom.Element m_messageExchangesElem=null;
- private org.w3c.dom.Element m_variablesElem=null;
- //private org.w3c.dom.Element m_correlationSetsElem=null;
- private java.util.List<Import> m_imports=new java.util.Vector<Import>();
- private java.util.List<PartnerLink> m_partnerLinks=new java.util.Vector<PartnerLink>();
- private java.util.List<Variable> m_variables=new java.util.Vector<Variable>();
- private EventHandlers m_eventHandlers=null;
- private FaultHandlers m_faultHandlers=null;
- private BPELActivity m_activity;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Process.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Process.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Process.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Process.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,976 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import org.savara.bpel.model2.*;
+import org.savara.bpel.util.InteractionUtil;
+import org.savara.util.XMLUtils;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+/**
+ * This class represents a BPEL process.
+ *
+ * @author gary
+ */
+public class Process extends BPELElement implements ScopeActivity {
+
+ private static final long serialVersionUID = 3400962966628415184L;
+
+ public static final String PROCESS = "process";
+ public static final String NAME = "name";
+ public static final String TARGET_NAMESPACE = "targetNamespace";
+ public static final String CONVERSATION_TYPE = "conversationType";
+ public static final String BPEL_PREFIX = "bpel";
+
+ public static final String CONVERSATION_NS="http://www.scribble.org/conversation";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Process(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ java.util.List<BPELElement> imports=findChildElements(Import.class);
+ for (BPELElement elem : imports) {
+ m_imports.add((Import)elem);
+ }
+
+ m_partnerLinksElem = findChildElement("partnerLinks");
+
+ if (m_partnerLinksElem != null) {
+ java.util.List<BPELElement> elems=
+ findChildElements(m_partnerLinksElem,
+ PartnerLink.class);
+
+ for (int i=0; i < elems.size(); i++) {
+ m_partnerLinks.add((PartnerLink)elems.get(i));
+ }
+ }
+
+ m_variablesElem = findChildElement("variables");
+
+ if (m_variablesElem != null) {
+ java.util.List<BPELElement> elems=
+ findChildElements(m_variablesElem,
+ Variable.class);
+
+ for (int i=0; i < elems.size(); i++) {
+ m_variables.add((Variable)elems.get(i));
+ }
+ }
+
+ //m_messageExchangesElem = findChildElement("messageExchanges");
+ //m_correlationSetsElem = findChildElement("correlationSets");
+
+ org.w3c.dom.Element ehs=findChildElement(EventHandlers.EVENTHANDLERS);
+ if (ehs != null) {
+ m_eventHandlers = new EventHandlers(model, ehs);
+ }
+
+ org.w3c.dom.Element fhs=findChildElement(FaultHandlers.FAULTHANDLERS);
+ if (fhs != null) {
+ m_faultHandlers = new FaultHandlers(model, fhs);
+ }
+
+ m_activity = findChildActivity();
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Process(BPELLanguageModel model) {
+ super(model, PROCESS);
+
+ initNamespace(BPEL_NS, BPEL_PREFIX);
+ }
+
+ /**
+ * This method adds an import to the scope.
+ *
+ * @param imp The import to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addImport(Import imp, int pos) {
+
+ if (pos != -1 && pos < m_imports.size()) {
+ m_imports.add(pos, imp);
+ } else {
+ m_imports.add(imp);
+ }
+
+ java.util.List<BPELElement> children=findChildElements(BPELElement.class);
+
+ org.w3c.dom.Node newNode=imp.getDOMElement().cloneNode(true);
+
+ getDOMElement().getOwnerDocument().adoptNode(newNode);
+
+ if (pos != -1 && pos < children.size()) {
+ getDOMElement().insertBefore(newNode, children.get(pos).getDOMElement());
+ } else {
+ getDOMElement().appendChild(newNode);
+ }
+ }
+
+ /**
+ * This method removes a partner link from the grouping
+ * construct.
+ *
+ * @param pl The partner link to be removed
+ * @return Whether the partner link was removed
+ */
+ public boolean removeImport(Import imp) {
+ boolean ret=m_imports.remove(imp);
+
+ if (ret) {
+ getDOMElement().removeChild(imp.getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of imports.
+ *
+ * @return The imports
+ */
+ public java.util.List<Import> getImports() {
+ return(m_imports);
+ }
+
+ /**
+ * This method searches the defined WSDL definitions to identify
+ * the underlying XML element/type associated with the supplied
+ * WSDL message type.
+ *
+ * @param wsdlMessageType The WSDL message type
+ * @param context The context
+ * @return The underlying XML element/type, or null if not found
+ */
+ public String getXMLType(String wsdlMessageType, Context context) {
+ String ret=null;
+
+ // Resolve the namespace prefix
+ int index=wsdlMessageType.indexOf(':');
+
+ if (index != -1 && context != null) {
+ String prefix=wsdlMessageType.substring(0, index);
+
+ String namespace=getNamespace(prefix);
+
+ wsdlMessageType = wsdlMessageType.substring(index+1);
+
+ for (Import imp : getImports()) {
+
+ // Check if import relates to the correct namespace
+ if (imp.getNamespace() != null &&
+ imp.getNamespace().equals(namespace) &&
+ imp.getLocation() != null &&
+ imp.getLocation().endsWith(".wsdl")) {
+
+ java.net.URI uri=
+ context.getResourceURI(getModel().getModelReference(),
+ imp.getLocation());
+
+ if (uri != null) {
+ ret = getXMLType(imp.getNamespace(), wsdlMessageType, uri);
+
+ if (ret != null) {
+ break;
+ }
+ }
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ protected String getXMLType(String namespace, String wsdlMessageType, java.net.URI uri) {
+ String ret=null;
+
+ try {
+ WSDLReader reader=javax.wsdl.factory.WSDLFactory.newInstance().newWSDLReader();
+
+ javax.wsdl.Definition defn=reader.readWSDL(uri.toString());
+
+ if (defn != null) {
+ javax.wsdl.Message mesg=defn.getMessage(new QName(namespace, wsdlMessageType));
+
+ if (mesg != null && mesg.getParts().size() == 1) {
+ javax.wsdl.Part part=(javax.wsdl.Part)
+ mesg.getParts().values().iterator().next();
+
+ if (part.getElementName() != null) {
+ ret = part.getElementName().toString();
+ } else if (part.getTypeName() != null) {
+ ret = part.getTypeName().toString();
+ }
+ }
+ }
+
+ } catch(Exception e) {
+ logger.error("Failed to read WSDL", e);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of partner links.
+ *
+ * @return The partner links
+ */
+ public java.util.List<PartnerLink> getPartnerLinks() {
+ return(m_partnerLinks);
+ }
+
+ /**
+ * This method returns the partner link associated
+ * with the supplied name.
+ *
+ * @param name The name
+ * @return The partner link, or null if not found
+ */
+ public PartnerLink getPartnerLink(String name) {
+ PartnerLink ret=null;
+
+ for (int i=0; ret == null && i < m_partnerLinks.size(); i++) {
+ if (m_partnerLinks.get(i).getName().equals(name)) {
+ ret = m_partnerLinks.get(i);
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method adds a partner link to the scope.
+ *
+ * @param pl The partner link to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addPartnerLink(PartnerLink pl, int pos) {
+
+ if (m_partnerLinksElem == null) {
+ m_partnerLinksElem = getDOMElement().getOwnerDocument().
+ createElementNS(BPEL_NS, "partnerLinks");
+
+ // Add to parent
+ org.w3c.dom.Element insertBefore=
+ findChildElement("messageExchanges");
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("variables");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("correlationSets");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("faultHandlers");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("eventHandlers");
+ }
+
+ if (insertBefore == null) {
+ BPELElement elem=findChildActivity();
+
+ if (elem != null) {
+ insertBefore = elem.getDOMElement();
+ }
+ }
+
+ if (insertBefore != null) {
+ getDOMElement().insertBefore(m_partnerLinksElem, insertBefore);
+ } else {
+ getDOMElement().appendChild(m_partnerLinksElem);
+ }
+ }
+
+ if (pos == -1 || pos >= m_partnerLinks.size()) {
+ m_partnerLinks.add(pl);
+
+ setChildElement(m_partnerLinksElem, null, pl, null);
+ } else {
+
+ PartnerLink cur=m_partnerLinks.get(pos);
+
+ m_partnerLinks.add(pos, pl);
+
+ if (cur != null) {
+ setChildElement(m_partnerLinksElem, null, pl,
+ cur.getDOMElement());
+ } else {
+ setChildElement(m_partnerLinksElem, null, pl, null);
+ }
+ }
+ }
+
+ /**
+ * This method removes a partner link from the grouping
+ * construct.
+ *
+ * @param pl The partner link to be removed
+ * @return Whether the partner link was removed
+ */
+ public boolean removePartnerLink(PartnerLink pl) {
+ boolean ret=m_partnerLinks.remove(pl);
+
+ if (ret) {
+ m_partnerLinksElem.removeChild(pl.getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method sets the name.
+ *
+ * @param name The name
+ */
+ public void setName(String name) {
+ getDOMElement().setAttribute(NAME, name);
+ }
+
+ /**
+ * This method returns the name.
+ *
+ * @return The name
+ */
+ public String getName() {
+ return(getDOMElement().hasAttribute(NAME)?
+ getDOMElement().getAttribute(NAME):null);
+ }
+
+ /**
+ * This method sets the target namespace.
+ *
+ * @param tns The target namespace
+ */
+ public void setTargetNamespace(String tns) {
+ getDOMElement().setAttribute(TARGET_NAMESPACE, tns);
+ }
+
+ /**
+ * This method returns the target namespace.
+ *
+ * @return The target namespace
+ */
+ public String getTargetNamespace() {
+ return(getDOMElement().hasAttribute(TARGET_NAMESPACE)?
+ getDOMElement().getAttribute(TARGET_NAMESPACE):null);
+ }
+
+ /**
+ * This method sets the conversation type.
+ *
+ * @param ctype The conversation type
+ */
+ public void setConversationType(String ctype) {
+ getDOMElement().setAttributeNS(CONVERSATION_NS, CONVERSATION_TYPE, ctype);
+ }
+
+ /**
+ * This method returns the conversation type.
+ *
+ * @return The conversation type
+ */
+ public String getConversationType() {
+ return(getDOMElement().hasAttributeNS(CONVERSATION_NS, CONVERSATION_TYPE)?
+ getDOMElement().getAttributeNS(CONVERSATION_NS, CONVERSATION_TYPE):null);
+ }
+
+ /**
+ * This method returns the prefix associated with the
+ * supplied namespace.
+ *
+ * @param namespace The namespace
+ * @return The prefix, or null if not found
+ */
+ public String getPrefix(String namespace) {
+ String ret=null;
+
+ org.w3c.dom.NamedNodeMap map=getDOMElement().getAttributes();
+
+ for (int i=0; ret == null && i < map.getLength(); i++) {
+ org.w3c.dom.Node node=map.item(i);
+
+ if (node instanceof org.w3c.dom.Attr) {
+ org.w3c.dom.Attr attr=(org.w3c.dom.Attr)node;
+
+ if (attr.getNodeValue().equals(namespace) &&
+ attr.getNodeName().startsWith("xmlns:")) {
+ ret = attr.getNodeName().substring(6);
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the namespace for the supplied prefix.
+ *
+ * @param prefix The prefix
+ * @return The namespace, or null if not found
+ */
+ public String getNamespace(String prefix) {
+ String ret=null;
+
+ org.w3c.dom.NamedNodeMap map=getDOMElement().getAttributes();
+
+ for (int i=0; ret == null && i < map.getLength(); i++) {
+ org.w3c.dom.Node node=map.item(i);
+
+ if (node instanceof org.w3c.dom.Attr) {
+ org.w3c.dom.Attr attr=(org.w3c.dom.Attr)node;
+
+ if (attr.getNodeName().equals("xmlns:"+prefix) ||
+ attr.getNodeName().equals(prefix)) {
+ ret = attr.getNodeValue();
+ }
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method initialises the prefix associated with the supplied
+ * namespace.
+ *
+ * @param namespace
+ * @param prefix
+ */
+ public void initNamespace(String namespace, String prefix) {
+ getDOMElement().setAttribute("xmlns:"+prefix, namespace);
+ }
+
+ /**
+ * This method adds a new namespace and returns the
+ * prefix allocated to it.
+ *
+ * @param namespace The namespace to be added
+ * @return The prefix
+ */
+ public String addNamespace(String namespace) {
+ String ret=getPrefix(namespace);
+ int i=1;
+
+ while (ret == null) {
+ String prefix="ns"+(i++);
+
+ if (getDOMElement().hasAttribute("xmlns:"+prefix) == false) {
+ ret = prefix;
+
+ getDOMElement().setAttribute("xmlns:"+prefix, namespace);
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method adds a variable to the scope.
+ *
+ * @param var The variable to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addVariable(Variable var, int pos) {
+
+ if (m_variablesElem == null) {
+ m_variablesElem = getDOMElement().getOwnerDocument().
+ createElementNS(BPEL_NS, "variables");
+
+ // Add to parent
+ org.w3c.dom.Element insertBefore=
+ findChildElement("correlationSets");
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("faultHandlers");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("eventHandlers");
+ }
+
+ if (insertBefore == null) {
+ BPELElement elem=findChildActivity();
+
+ if (elem != null) {
+ insertBefore = elem.getDOMElement();
+ }
+ }
+
+ if (insertBefore != null) {
+ getDOMElement().insertBefore(m_variablesElem, insertBefore);
+ } else {
+ getDOMElement().appendChild(m_variablesElem);
+ }
+ }
+
+ if (pos == -1 || pos >= m_variables.size()) {
+ m_variables.add(var);
+
+ setChildElement(m_variablesElem, null, var, null);
+ } else {
+
+ Variable cur=m_variables.get(pos);
+
+ m_variables.add(pos, var);
+
+ if (cur != null) {
+ setChildElement(m_variablesElem, null, var,
+ cur.getDOMElement());
+ } else {
+ setChildElement(m_variablesElem, null, var, null);
+ }
+ }
+ }
+
+ /**
+ * This method removes an activity from the grouping
+ * construct.
+ *
+ * @param act The activity to be removed
+ * @return Whether the activity was removed
+ */
+ public boolean removeVariable(Variable var) {
+ boolean ret=m_variables.remove(var);
+
+ if (ret) {
+ m_variablesElem.removeChild(var.getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of variables.
+ *
+ * @return The
+ */
+ public java.util.List<Variable> getVariables() {
+ return(m_variables);
+ }
+
+ /**
+ * This method returns the variable associated
+ * with the supplied name.
+ *
+ * @param name The name
+ * @return The variable, or null if not found
+ */
+ public Variable getVariable(String name) {
+ Variable ret=null;
+
+ for (int i=0; ret == null && i < m_variables.size(); i++) {
+ if (m_variables.get(i).getName().equals(name)) {
+ ret = m_variables.get(i);
+ }
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method sets the activity associated with
+ * the 'else' construct.
+ *
+ * @param act The activity
+ */
+ public void setActivity(BPELActivity act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'else' construct.
+ *
+ * @return The activity
+ */
+ public BPELActivity getActivity() {
+ return(m_activity);
+ }
+
+ /**
+ * This method sets the 'eventHandlers' path.
+ *
+ * @param elem The 'eventHandlers' path
+ */
+ public void setEventHandlers(EventHandlers elem) {
+ org.w3c.dom.Element existingElem=null;
+
+ if (m_eventHandlers != null) {
+ existingElem = m_eventHandlers.getDOMElement();
+ }
+
+ m_eventHandlers = elem;
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (insertBefore == null) {
+ BPELElement act=findChildActivity();
+
+ if (elem != null) {
+ insertBefore = act.getDOMElement();
+ }
+ }
+
+ setChildElement(existingElem, elem,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the 'eventHandlers' path.
+ *
+ * @return The 'eventHandlers' path
+ */
+ public EventHandlers getEventHandlers() {
+ return(m_eventHandlers);
+ }
+
+ /**
+ * This method sets the 'faultHandlers' path.
+ *
+ * @param elem The 'faultHandlers' path
+ */
+ public void setFaultHandlers(FaultHandlers elem) {
+ org.w3c.dom.Element existingElem=null;
+
+ if (m_faultHandlers != null) {
+ existingElem = m_faultHandlers.getDOMElement();
+ }
+
+ m_faultHandlers = elem;
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("eventHandlers");
+ }
+
+ if (insertBefore == null) {
+ BPELElement act=findChildActivity();
+
+ if (elem != null) {
+ insertBefore = act.getDOMElement();
+ }
+ }
+
+ setChildElement(existingElem, elem,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the 'faultHandlers' path.
+ *
+ * @return The 'faultHandlers' path
+ */
+ public FaultHandlers getFaultHandlers() {
+ return(m_faultHandlers);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(Journal l) {
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ public void convert(java.util.List<Activity> activities,
+ ConversionContext context) {
+
+ // Add variables to the context
+ for (int i=0; i < m_variables.size(); i++) {
+ context.addVariable(m_variables.get(i));
+ }
+
+ // Count number of invoke activities
+ int invokeCount=InteractionUtil.countInvokes(getActivity().getDOMElement());
+
+ // Check whether scope has been defined to represent
+ // an interaction with one or more fault responses and
+ // no event handlers
+ Invoke invoke=null;
+
+ if (invokeCount == 1 &&
+ m_faultHandlers != null && (m_faultHandlers.getCatchPaths().size() > 0 ||
+ m_faultHandlers.getCatchAll() != null) &&
+ (m_eventHandlers == null || (m_eventHandlers.getOnEvents().size() == 0 &&
+ m_eventHandlers.getOnAlarms().size() == 0)) &&
+ (invoke = InteractionUtil.getInvoke(m_activity)) != null) {
+
+ invoke.convertRequest(activities, context);
+
+ // Create choice with normal response and fault paths
+ org.scribble.protocol.model.Choice choice=new org.scribble.protocol.model.Choice();
+
+ When cb=new When();
+
+ invoke.convertResponse(cb.getBlock().getContents(), context);
+
+ // Include remaining activities
+ if (m_activity instanceof Sequence) {
+ for (int i=1; i < ((Sequence)m_activity).getActivities().size(); i++) {
+ ((Sequence)m_activity).getActivities().get(i).convert(cb.getBlock().getContents(), context);
+ }
+ }
+
+ choice.getWhens().add(cb);
+
+ // Process fault handlers
+ for (int i=0; i < m_faultHandlers.getCatchPaths().size(); i++) {
+ Catch catchBlock=m_faultHandlers.getCatchPaths().get(i);
+
+ When fcb=new When();
+
+ String mesgType=catchBlock.getFaultMessageType();
+
+ if (mesgType == null) {
+ mesgType = catchBlock.getFaultMessageElement();
+ }
+
+ Variable faultVar=null;
+
+ if (catchBlock.getFaultVariable() != null) {
+ faultVar = new Variable(getModel());
+ faultVar.setName(catchBlock.getFaultVariable());
+ faultVar.setMessageType(catchBlock.getFaultMessageType());
+ faultVar.setElement(catchBlock.getFaultMessageElement());
+ context.addVariable(faultVar);
+ }
+
+ invoke.convertFaultResponse(fcb.getBlock().getContents(), catchBlock.getFaultVariable(),
+ mesgType, context);
+
+ if (catchBlock.getActivity() != null) {
+ catchBlock.getActivity().convert(fcb.getBlock().getContents(), context);
+ }
+
+ choice.getWhens().add(fcb);
+
+ if (faultVar != null) {
+ context.removeVariable(faultVar);
+ }
+ }
+
+ activities.add(choice);
+ } else {
+ // Store in local var, in case try/catch block needs to be
+ // added
+ java.util.List<Activity> acts=activities;
+
+ // Check if try/catch block is required
+ if (getFaultHandlers() != null &&
+ (getFaultHandlers().getCatchPaths().size() > 0 ||
+ getFaultHandlers().getCatchAll() != null)) {
+ org.scribble.protocol.model.Try te=
+ new org.scribble.protocol.model.Try();
+ te.derivedFrom(this);
+ te.getBlock().derivedFrom(this);
+
+ acts.add(te);
+
+ acts = te.getBlock().getContents();
+
+ for (int i=0; i < getFaultHandlers().getCatchPaths().size(); i++) {
+ Catch catchPath=getFaultHandlers().getCatchPaths().get(i);
+
+ org.scribble.protocol.model.Catch cb=
+ new org.scribble.protocol.model.Catch();
+ cb.derivedFrom(catchPath);
+
+ /* TODO: How to deal with catch based on type?
+ *
+ *
+ TypeReference tref=new TypeReference();
+ tref.setName(XMLUtils.getLocalname(catchPath.getFaultName()));
+ cb.setType(tref);
+ */
+
+ Variable faultVar=null;
+
+ if (catchPath.getFaultVariable() != null) {
+ faultVar = new Variable(getModel());
+ faultVar.setName(catchPath.getFaultVariable());
+ faultVar.setMessageType(catchPath.getFaultMessageType());
+ faultVar.setElement(catchPath.getFaultMessageElement());
+ context.addVariable(faultVar);
+ }
+
+ if (catchPath.getActivity() != null) {
+ catchPath.getActivity().convert(cb.getBlock().getContents(), context);
+ }
+
+ if (faultVar != null) {
+ context.removeVariable(faultVar);
+ }
+
+ te.getCatches().add(cb);
+ }
+ }
+
+ // Convert normal activities in scope
+ if (getActivity() != null) {
+ getActivity().convert(acts, context);
+ }
+ }
+ }
+
+ /**
+ * This method returns the conversion associated with the
+ * BPEL process.
+ *
+ * @param envContext The environment context
+ * @return The conversation
+ */
+ public Protocol convert(Context envContext) {
+ Protocol ret=new Protocol();
+
+ ret.derivedFrom(this);
+ ret.getBlock().derivedFrom(this);
+
+ // Configure model name
+ ret.setName(getName());
+
+ // Define implements reference for conversation type
+ //String convType=getConversationType();
+ String role=null;
+
+ /*
+ if (convType != null) {
+ int index=convType.indexOf('@');
+
+ if (index != -1) {
+ // TODO: Need to think whether this should be
+ // 'implements' reference. If so, then need to change
+ // Java Lang Model parser and also Lang Model conformance
+ // rule.
+ ImplementsReference iref=
+ new ImplementsReference(ConversationNotation.NOTATION_CODE);
+
+ role = convType.substring(index+1);
+
+ iref.setLocatedRole(role);
+
+ // Need to locate the model name
+ modelName.setRole(new Role(iref.getLocatedRole()));
+
+ String mainpart=convType.substring(0, index);
+
+ index = mainpart.lastIndexOf(".");
+
+ if (index == -1) {
+ iref.setNamespace("");
+ iref.setLocalpart(mainpart);
+ } else {
+ iref.setNamespace(mainpart.substring(0, index));
+ iref.setLocalpart(mainpart.substring(index+1));
+ }
+
+ ret.getImplements().add(iref);
+
+ } else {
+ logger.warn("Conversation type does not " +
+ "contain '@' located role separator");
+ }
+ }
+ */
+
+ // Convert the process contents
+ DefaultConversionContext context=new DefaultConversionContext(role, this, envContext);
+
+ // Add variables to the context
+ for (int i=0; i < m_variables.size(); i++) {
+ context.addVariable(m_variables.get(i));
+ }
+
+ convert(ret.getBlock().getContents(), context);
+
+ return(ret);
+ }
+
+ protected String getParentURI(BPELElement elem) {
+ String ret="//";
+
+ if (elem instanceof BPELActivity) {
+ ret += "@activity";
+ } else if (elem instanceof FaultHandlers) {
+ ret += "@faultHandlers";
+ } else if (elem instanceof EventHandlers) {
+ ret += "@eventHandlers";
+ }
+
+ return(ret);
+ }
+
+ private static Log logger = LogFactory.getLog(Process.class);
+
+ private org.w3c.dom.Element m_partnerLinksElem=null;
+ //private org.w3c.dom.Element m_messageExchangesElem=null;
+ private org.w3c.dom.Element m_variablesElem=null;
+ //private org.w3c.dom.Element m_correlationSetsElem=null;
+ private java.util.List<Import> m_imports=new java.util.Vector<Import>();
+ private java.util.List<PartnerLink> m_partnerLinks=new java.util.Vector<PartnerLink>();
+ private java.util.List<Variable> m_variables=new java.util.Vector<Variable>();
+ private EventHandlers m_eventHandlers=null;
+ private FaultHandlers m_faultHandlers=null;
+ private BPELActivity m_activity;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Receive.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Receive.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Receive.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,170 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.util.TypeReferenceUtil;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents an unsupported (or custom) action within
- * the conversation based ESB service descriptor.
- *
- * @author gary
- */
-public class Receive extends AbstractInteraction {
-
- private static final String CREATE_INSTANCE = "createInstance";
- private static final String VARIABLE = "variable";
-
- public static final String RECEIVE = "receive";
-
- private static final long serialVersionUID = -3041725198724191842L;
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Receive(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Receive(BPELLanguageModel model) {
- super(model, RECEIVE);
- }
-
- /**
- * This method sets the variable.
- *
- * @param var The variable
- */
- public void setVariable(String var) {
- getDOMElement().setAttribute(VARIABLE, var);
- }
-
- /**
- * This method returns the variable.
- *
- * @return The variable
- */
- public String getVariable() {
- return(getDOMElement().hasAttribute(VARIABLE)?
- getDOMElement().getAttribute(VARIABLE):null);
- }
-
- /**
- * This method sets the 'create instance'
- * attribute.
- *
- * @param b Whether to create instance
- */
- public void setCreateInstance(boolean b) {
- String create=(b?"yes":"no");
-
- getDOMElement().setAttribute(CREATE_INSTANCE, create);
- }
-
- /**
- * This method returns whether to create instance.
- *
- * @return Whether to create instance
- */
- public boolean getCreateInstance() {
- boolean ret=false;
- String create=
- getDOMElement().getAttribute(CREATE_INSTANCE);
-
- if (create != null &&
- create.equals("yes")) {
- ret = true;
- }
-
- return(ret);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(Journal l) {
- // Don't validate unsupported actions
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- //getSource().setComponentURI(getURI());
-
- Interaction interaction=new Interaction();
- interaction.derivedFrom(this);
-
- Variable var=context.getVariable(getVariable());
-
- String xmlType=context.getProcess().getXMLType(var.getMessageType(),
- context.getEnvironmentContext());
-
- TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
-
- MessageSignature ms=new MessageSignature();
- ms.derivedFrom(this);
-
- ms.setOperation(getOperation());
- ms.getTypeReferences().add(tref);
-
- String fromRole=getServerPartnerRole();
-
- if (fromRole != null && fromRole.equals(context.getRole())) {
- fromRole = getClientPartnerRole();
- }
-
- if (fromRole != null) {
- interaction.setFromRole(new Role(fromRole));
- }
-
- if (context.getRole() != null) {
- interaction.getToRoles().add(new Role(context.getRole()));
- }
-
- interaction.setMessageSignature(ms);
-
- activities.add(interaction);
- }
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Receive.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Receive.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Receive.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Receive.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,170 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.savara.bpel.util.TypeReferenceUtil;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents an unsupported (or custom) action within
+ * the conversation based ESB service descriptor.
+ *
+ * @author gary
+ */
+public class Receive extends AbstractInteraction {
+
+ private static final String CREATE_INSTANCE = "createInstance";
+ private static final String VARIABLE = "variable";
+
+ public static final String RECEIVE = "receive";
+
+ private static final long serialVersionUID = -3041725198724191842L;
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Receive(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Receive(BPELLanguageModel model) {
+ super(model, RECEIVE);
+ }
+
+ /**
+ * This method sets the variable.
+ *
+ * @param var The variable
+ */
+ public void setVariable(String var) {
+ getDOMElement().setAttribute(VARIABLE, var);
+ }
+
+ /**
+ * This method returns the variable.
+ *
+ * @return The variable
+ */
+ public String getVariable() {
+ return(getDOMElement().hasAttribute(VARIABLE)?
+ getDOMElement().getAttribute(VARIABLE):null);
+ }
+
+ /**
+ * This method sets the 'create instance'
+ * attribute.
+ *
+ * @param b Whether to create instance
+ */
+ public void setCreateInstance(boolean b) {
+ String create=(b?"yes":"no");
+
+ getDOMElement().setAttribute(CREATE_INSTANCE, create);
+ }
+
+ /**
+ * This method returns whether to create instance.
+ *
+ * @return Whether to create instance
+ */
+ public boolean getCreateInstance() {
+ boolean ret=false;
+ String create=
+ getDOMElement().getAttribute(CREATE_INSTANCE);
+
+ if (create != null &&
+ create.equals("yes")) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(Journal l) {
+ // Don't validate unsupported actions
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ //getSource().setComponentURI(getURI());
+
+ Interaction interaction=new Interaction();
+ interaction.derivedFrom(this);
+
+ Variable var=context.getVariable(getVariable());
+
+ String xmlType=context.getProcess().getXMLType(var.getMessageType(),
+ context.getEnvironmentContext());
+
+ TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
+
+ MessageSignature ms=new MessageSignature();
+ ms.derivedFrom(this);
+
+ ms.setOperation(getOperation());
+ ms.getTypeReferences().add(tref);
+
+ String fromRole=getServerPartnerRole();
+
+ if (fromRole != null && fromRole.equals(context.getRole())) {
+ fromRole = getClientPartnerRole();
+ }
+
+ if (fromRole != null) {
+ interaction.setFromRole(new Role(fromRole));
+ }
+
+ if (context.getRole() != null) {
+ interaction.getToRoles().add(new Role(context.getRole()));
+ }
+
+ interaction.setMessageSignature(ms);
+
+ activities.add(interaction);
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/RepeatUntil.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/RepeatUntil.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/RepeatUntil.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,160 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents a RepeatUntil grouping activity.
- *
- * @author gary
- */
-public class RepeatUntil extends BPELGroupingConstruct {
-
- private static final long serialVersionUID = -4479515591509703188L;
-
- public static final String REPEATUNTIL = "repeatUntil";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public RepeatUntil(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- m_activity = findChildActivity();
-
- org.w3c.dom.Element cond=
- findChildElement(Condition.CONDITION);
-
- if (cond == null) {
- m_condition = new Condition(model);
- } else {
- m_condition = new Condition(model, cond);
- }
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public RepeatUntil(BPELLanguageModel model) {
- super(model, REPEATUNTIL);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(ModelListener l) {
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- getSource().setComponentURI(getURI());
- }
-
- /**
- * This method sets the condition.
- *
- * @param cond The condition
- */
- public void setCondition(Condition cond) {
- m_condition = cond;
-
- setChildElement(findChildElement(Condition.CONDITION),
- cond, null);
- }
-
- /**
- * This method returns the condition.
- *
- * @return The condition
- */
- public Condition getCondition() {
- return(m_condition);
- }
-
- /**
- * This method sets the main 'if' activity.
- *
- * @param act The activity associated with the 'if'
- */
- public void setActivity(BPELElement act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- if (m_condition != null) {
- insertBefore = m_condition.getDOMElement();
- }
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'if' path.
- *
- * @return The 'if' activity
- */
- public BPELElement getActivity() {
- return(m_activity);
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof BPELActivity) {
- ret = "@activity";
- }
-
- return(ret);
- }
-
- private Condition m_condition=null;
- private BPELElement m_activity=null;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/RepeatUntil.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/RepeatUntil.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/RepeatUntil.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/RepeatUntil.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,160 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents a RepeatUntil grouping activity.
+ *
+ * @author gary
+ */
+public class RepeatUntil extends BPELGroupingConstruct {
+
+ private static final long serialVersionUID = -4479515591509703188L;
+
+ public static final String REPEATUNTIL = "repeatUntil";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public RepeatUntil(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ m_activity = findChildActivity();
+
+ org.w3c.dom.Element cond=
+ findChildElement(Condition.CONDITION);
+
+ if (cond == null) {
+ m_condition = new Condition(model);
+ } else {
+ m_condition = new Condition(model, cond);
+ }
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public RepeatUntil(BPELLanguageModel model) {
+ super(model, REPEATUNTIL);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(ModelListener l) {
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ getSource().setComponentURI(getURI());
+ }
+
+ /**
+ * This method sets the condition.
+ *
+ * @param cond The condition
+ */
+ public void setCondition(Condition cond) {
+ m_condition = cond;
+
+ setChildElement(findChildElement(Condition.CONDITION),
+ cond, null);
+ }
+
+ /**
+ * This method returns the condition.
+ *
+ * @return The condition
+ */
+ public Condition getCondition() {
+ return(m_condition);
+ }
+
+ /**
+ * This method sets the main 'if' activity.
+ *
+ * @param act The activity associated with the 'if'
+ */
+ public void setActivity(BPELElement act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_condition != null) {
+ insertBefore = m_condition.getDOMElement();
+ }
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'if' path.
+ *
+ * @return The 'if' activity
+ */
+ public BPELElement getActivity() {
+ return(m_activity);
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof BPELActivity) {
+ ret = "@activity";
+ }
+
+ return(ret);
+ }
+
+ private Condition m_condition=null;
+ private BPELElement m_activity=null;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Reply.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Reply.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Reply.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,155 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.util.TypeReferenceUtil;
-import org.scribble.conversation.model.ConversationInteraction;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents a BPEL reply activity.
- *
- * @author gary
- */
-public class Reply extends AbstractInteraction {
-
- private static final String VARIABLE = "variable";
- private static final String FAULT_NAME = "faultName";
-
- public static final String REPLY = "reply";
-
- private static final long serialVersionUID = 8582738107125170604L;
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Reply(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Reply(BPELLanguageModel model) {
- super(model, REPLY);
- }
-
- /**
- * This method sets the variable.
- *
- * @param var The variable
- */
- public void setVariable(String var) {
- getDOMElement().setAttribute(VARIABLE, var);
- }
-
- /**
- * This method returns the variable.
- *
- * @return The variable
- */
- public String getVariable() {
- return(getDOMElement().hasAttribute(VARIABLE)?
- getDOMElement().getAttribute(VARIABLE):null);
- }
-
- /**
- * This method sets the fault name.
- *
- * @param fname The fault name
- */
- public void setFaultName(String fname) {
- getDOMElement().setAttribute(FAULT_NAME, fname);
- }
-
- /**
- * This method returns the fault name.
- *
- * @return The fault name
- */
- public String getFaultName() {
- return(getDOMElement().hasAttribute(FAULT_NAME)?
- getDOMElement().getAttribute(FAULT_NAME):null);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(ModelListener l) {
- // Don't validate unsupported actions
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- getSource().setComponentURI(getURI());
-
- ConversationInteraction interaction=new ConversationInteraction();
- interaction.derivedFrom(this);
-
- Variable var=context.getVariable(getVariable());
-
- String xmlType=context.getProcess().getXMLType(var.getMessageType(),
- context.getEnvironmentContext());
-
- TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
-
- MessageSignature ms=new MessageSignature();
- ms.derivedFrom(this);
-
- ms.setOperation(getOperation());
- ms.getTypes().add(tref);
-
- if (context.getRole() != null) {
- interaction.setFromRole(new Role(context.getRole()));
- }
-
- String toRole=getServerPartnerRole();
-
- if (toRole != null) {
- interaction.setToRole(new Role(toRole));
- }
-
- interaction.setMessageSignature(ms);
-
- activities.add(interaction);
- }
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Reply.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Reply.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Reply.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Reply.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,155 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.savara.bpel.util.TypeReferenceUtil;
+import org.scribble.conversation.model.ConversationInteraction;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents a BPEL reply activity.
+ *
+ * @author gary
+ */
+public class Reply extends AbstractInteraction {
+
+ private static final String VARIABLE = "variable";
+ private static final String FAULT_NAME = "faultName";
+
+ public static final String REPLY = "reply";
+
+ private static final long serialVersionUID = 8582738107125170604L;
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Reply(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Reply(BPELLanguageModel model) {
+ super(model, REPLY);
+ }
+
+ /**
+ * This method sets the variable.
+ *
+ * @param var The variable
+ */
+ public void setVariable(String var) {
+ getDOMElement().setAttribute(VARIABLE, var);
+ }
+
+ /**
+ * This method returns the variable.
+ *
+ * @return The variable
+ */
+ public String getVariable() {
+ return(getDOMElement().hasAttribute(VARIABLE)?
+ getDOMElement().getAttribute(VARIABLE):null);
+ }
+
+ /**
+ * This method sets the fault name.
+ *
+ * @param fname The fault name
+ */
+ public void setFaultName(String fname) {
+ getDOMElement().setAttribute(FAULT_NAME, fname);
+ }
+
+ /**
+ * This method returns the fault name.
+ *
+ * @return The fault name
+ */
+ public String getFaultName() {
+ return(getDOMElement().hasAttribute(FAULT_NAME)?
+ getDOMElement().getAttribute(FAULT_NAME):null);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(ModelListener l) {
+ // Don't validate unsupported actions
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ getSource().setComponentURI(getURI());
+
+ ConversationInteraction interaction=new ConversationInteraction();
+ interaction.derivedFrom(this);
+
+ Variable var=context.getVariable(getVariable());
+
+ String xmlType=context.getProcess().getXMLType(var.getMessageType(),
+ context.getEnvironmentContext());
+
+ TypeReference tref=TypeReferenceUtil.createTypeReference(xmlType, context);
+
+ MessageSignature ms=new MessageSignature();
+ ms.derivedFrom(this);
+
+ ms.setOperation(getOperation());
+ ms.getTypes().add(tref);
+
+ if (context.getRole() != null) {
+ interaction.setFromRole(new Role(context.getRole()));
+ }
+
+ String toRole=getServerPartnerRole();
+
+ if (toRole != null) {
+ interaction.setToRole(new Role(toRole));
+ }
+
+ interaction.setMessageSignature(ms);
+
+ activities.add(interaction);
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Rethrow.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Rethrow.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Rethrow.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents the rethrow activity.
- *
- * @author gary
- */
-public class Rethrow extends BPELActivity {
-
- private static final long serialVersionUID = 9187657888490480490L;
-
- public static final String RETHROW = "rethrow";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Rethrow(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Rethrow(BPELLanguageModel model) {
- super(model, RETHROW);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(ModelListener l) {
- // Don't validate unsupported actions
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- getSource().setComponentURI(getURI());
- }
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Rethrow.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Rethrow.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Rethrow.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Rethrow.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents the rethrow activity.
+ *
+ * @author gary
+ */
+public class Rethrow extends BPELActivity {
+
+ private static final long serialVersionUID = 9187657888490480490L;
+
+ public static final String RETHROW = "rethrow";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Rethrow(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Rethrow(BPELLanguageModel model) {
+ super(model, RETHROW);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(ModelListener l) {
+ // Don't validate unsupported actions
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ getSource().setComponentURI(getURI());
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Scope.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Scope.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Scope.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,690 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.savara.bpel.model.util.InteractionUtil;
-import org.savara.util.XMLUtils;
-import org.scribble.conversation.model.ConditionalBlock;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents a scope grouping activity.
- *
- * @author gary
- */
-public class Scope extends BPELActivity implements ScopeActivity {
-
- private static final long serialVersionUID = 7132062003047468101L;
-
- public static final String SCOPE = "scope";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Scope(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- m_partnerLinksElem = findChildElement("partnerLinks");
-
- if (m_partnerLinksElem != null) {
- java.util.List<BPELElement> elems=
- findChildElements(m_partnerLinksElem,
- PartnerLink.class);
-
- for (int i=0; i < elems.size(); i++) {
- m_partnerLinks.add((PartnerLink)elems.get(i));
- }
- }
-
- m_variablesElem = findChildElement("variables");
-
- if (m_variablesElem != null) {
- java.util.List<BPELElement> elems=
- findChildElements(m_variablesElem,
- Variable.class);
-
- for (int i=0; i < elems.size(); i++) {
- m_variables.add((Variable)elems.get(i));
- }
- }
-
- m_messageExchangesElem = findChildElement("messageExchanges");
- m_correlationSetsElem = findChildElement("correlationSets");
-
- org.w3c.dom.Element ehs=findChildElement(EventHandlers.EVENTHANDLERS);
- if (ehs != null) {
- m_eventHandlers = new EventHandlers(model, ehs);
- }
-
- org.w3c.dom.Element fhs=findChildElement(FaultHandlers.FAULTHANDLERS);
- if (fhs != null) {
- m_faultHandlers = new FaultHandlers(model, fhs);
- }
-
- org.w3c.dom.Element ch=findChildElement(CompensationHandler.COMPENSATIONHANDLER);
- if (ch != null) {
- m_compensationHandler = new CompensationHandler(model, ch);
- }
-
- org.w3c.dom.Element th=findChildElement(TerminationHandler.TERMINATIONHANDLER);
- if (th != null) {
- m_terminationHandler = new TerminationHandler(model, th);
- }
-
- m_activity = findChildActivity();
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Scope(BPELLanguageModel model) {
- super(model, SCOPE);
- }
-
- /**
- * This method adds a variable to the scope.
- *
- * @param var The variable to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addVariable(Variable var, int pos) {
-
- if (m_variablesElem == null) {
- m_variablesElem = getDOMElement().getOwnerDocument().
- createElementNS(BPEL_NS, "variables");
-
- // Add to parent
- org.w3c.dom.Element insertBefore=
- findChildElement("partnerLinks");
-
- if (insertBefore == null) {
- insertBefore = findChildElement("messageExchanges");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("correlationSets");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("eventHandlers");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("faultHandlers");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("compensationHandler");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("terminationHandler");
- }
-
- if (insertBefore == null) {
- BPELElement elem=findChildActivity();
-
- if (elem != null) {
- insertBefore = elem.getDOMElement();
- }
- }
-
- if (insertBefore != null) {
- getDOMElement().insertBefore(m_variablesElem, insertBefore);
- } else {
- getDOMElement().appendChild(m_variablesElem);
- }
- }
-
- if (pos == -1 || pos >= m_variables.size()) {
- m_variables.add(var);
-
- setChildElement(m_variablesElem, null, var, null);
- } else {
-
- Variable cur=m_variables.get(pos);
-
- m_variables.add(pos, var);
-
- if (cur != null) {
- setChildElement(m_variablesElem, null, var,
- cur.getDOMElement());
- } else {
- setChildElement(m_variablesElem, null, var, null);
- }
- }
- }
-
- /**
- * This method removes an activity from the grouping
- * construct.
- *
- * @param act The activity to be removed
- * @return Whether the activity was removed
- */
- public boolean removeVariable(Variable var) {
- boolean ret=m_variables.remove(var);
-
- if (ret) {
- m_variablesElem.removeChild(var.getDOMElement());
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of variables.
- *
- * @return The
- */
- public java.util.List<Variable> getVariables() {
- return(m_variables);
- }
-
- /**
- * This method adds a partner link to the scope.
- *
- * @param pl The partner link to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addPartnerLink(PartnerLink pl, int pos) {
-
- if (m_partnerLinksElem == null) {
- m_partnerLinksElem = getDOMElement().getOwnerDocument().
- createElementNS(BPEL_NS, "partnerLinks");
-
- // Add to parent
- org.w3c.dom.Element insertBefore=
- findChildElement("messageExchanges");
-
- if (insertBefore == null) {
- insertBefore = findChildElement("correlationSets");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("eventHandlers");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("faultHandlers");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("compensationHandler");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("terminationHandler");
- }
-
- if (insertBefore == null) {
- BPELElement elem=findChildActivity();
-
- if (elem != null) {
- insertBefore = elem.getDOMElement();
- }
- }
-
- if (insertBefore != null) {
- getDOMElement().insertBefore(m_partnerLinksElem, insertBefore);
- } else {
- getDOMElement().appendChild(m_partnerLinksElem);
- }
- }
-
- if (pos == -1 || pos >= m_partnerLinks.size()) {
- m_partnerLinks.add(pl);
-
- setChildElement(m_partnerLinksElem, null, pl, null);
- } else {
-
- PartnerLink cur=m_partnerLinks.get(pos);
-
- m_partnerLinks.add(pos, pl);
-
- if (cur != null) {
- setChildElement(m_partnerLinksElem, null, pl,
- cur.getDOMElement());
- } else {
- setChildElement(m_partnerLinksElem, null, pl, null);
- }
- }
- }
-
- /**
- * This method removes a partner link from the grouping
- * construct.
- *
- * @param pl The partner link to be removed
- * @return Whether the partner link was removed
- */
- public boolean removePartnerLink(PartnerLink pl) {
- boolean ret=m_partnerLinks.remove(pl);
-
- if (ret) {
- m_partnerLinksElem.removeChild(pl.getDOMElement());
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of partner links.
- *
- * @return The partner links
- */
- public java.util.List<PartnerLink> getPartnerLinks() {
- return(m_partnerLinks);
- }
-
- /**
- * This method sets the activity associated with
- * the 'else' construct.
- *
- * @param act The activity
- */
- public void setActivity(BPELActivity act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'else' construct.
- *
- * @return The activity
- */
- public BPELActivity getActivity() {
- return(m_activity);
- }
-
- /**
- * This method sets the 'eventHandlers' path.
- *
- * @param elem The 'eventHandlers' path
- */
- public void setEventHandlers(EventHandlers elem) {
- org.w3c.dom.Element existingElem=null;
-
- if (m_eventHandlers != null) {
- existingElem = m_eventHandlers.getDOMElement();
- }
-
- m_eventHandlers = elem;
-
- org.w3c.dom.Element insertBefore=null;
-
- if (insertBefore == null) {
- insertBefore = findChildElement("faultHandlers");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("compensationHandler");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("terminationHandler");
- }
-
- if (insertBefore == null) {
- BPELElement act=findChildActivity();
-
- if (elem != null) {
- insertBefore = act.getDOMElement();
- }
- }
-
- setChildElement(existingElem, elem,
- insertBefore);
- }
-
- /**
- * This method returns the 'eventHandlers' path.
- *
- * @return The 'eventHandlers' path
- */
- public EventHandlers getEventHandlers() {
- return(m_eventHandlers);
- }
-
- /**
- * This method sets the 'faultHandlers' path.
- *
- * @param elem The 'faultHandlers' path
- */
- public void setFaultHandlers(FaultHandlers elem) {
- org.w3c.dom.Element existingElem=null;
-
- if (m_faultHandlers != null) {
- existingElem = m_faultHandlers.getDOMElement();
- }
-
- m_faultHandlers = elem;
-
- org.w3c.dom.Element insertBefore=null;
-
- if (insertBefore == null) {
- insertBefore = findChildElement("compensationHandler");
- }
-
- if (insertBefore == null) {
- insertBefore = findChildElement("terminationHandler");
- }
-
- if (insertBefore == null) {
- BPELElement act=findChildActivity();
-
- if (elem != null) {
- insertBefore = act.getDOMElement();
- }
- }
-
- setChildElement(existingElem, elem,
- insertBefore);
- }
-
- /**
- * This method returns the 'faultHandlers' path.
- *
- * @return The 'faultHandlers' path
- */
- public FaultHandlers getFaultHandlers() {
- return(m_faultHandlers);
- }
-
- /**
- * This method sets the 'compensationHandler' path.
- *
- * @param elem The 'compensationHandler' path
- */
- public void setCompensationHandler(CompensationHandler elem) {
- org.w3c.dom.Element existingElem=null;
-
- if (m_compensationHandler != null) {
- existingElem = m_compensationHandler.getDOMElement();
- }
-
- m_compensationHandler = elem;
-
- org.w3c.dom.Element insertBefore=null;
-
- if (insertBefore == null) {
- insertBefore = findChildElement("terminationHandler");
- }
-
- if (insertBefore == null) {
- BPELElement act=findChildActivity();
-
- if (elem != null) {
- insertBefore = act.getDOMElement();
- }
- }
-
- setChildElement(existingElem, elem,
- insertBefore);
- }
-
- /**
- * This method returns the 'compensationHandler' path.
- *
- * @return The 'compensationHandler' path
- */
- public CompensationHandler getCompensationHandler() {
- return(m_compensationHandler);
- }
-
- /**
- * This method sets the 'terminationHandler' path.
- *
- * @param elem The 'terminationHandler' path
- */
- public void setTerminationHandler(TerminationHandler elem) {
- org.w3c.dom.Element existingElem=null;
-
- if (m_terminationHandler != null) {
- existingElem = m_terminationHandler.getDOMElement();
- }
-
- m_terminationHandler = elem;
-
- org.w3c.dom.Element insertBefore=null;
-
- if (insertBefore == null) {
- BPELElement act=findChildActivity();
-
- if (elem != null) {
- insertBefore = act.getDOMElement();
- }
- }
-
- setChildElement(existingElem, elem,
- insertBefore);
- }
-
- /**
- * This method returns the 'terminationHandler' path.
- *
- * @return The 'terminationHandler' path
- */
- public TerminationHandler getTerminationHandler() {
- return(m_terminationHandler);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(ModelListener l) {
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- getSource().setComponentURI(getURI());
-
- // Add variables to the context
- for (int i=0; i < m_variables.size(); i++) {
- context.addVariable(m_variables.get(i));
- }
-
- // Count number of invoke activities
- int invokeCount=InteractionUtil.countInvokes(getActivity().getDOMElement());
-
- // Check whether scope has been defined to represent
- // an interaction with one or more fault responses and
- // no event handlers
- Invoke invoke=null;
-
- if (invokeCount == 1 &&
- m_faultHandlers != null && (m_faultHandlers.getCatchPaths().size() > 0 ||
- m_faultHandlers.getCatchAll() != null) &&
- (m_eventHandlers == null || (m_eventHandlers.getOnEvents().size() == 0 &&
- m_eventHandlers.getOnAlarms().size() == 0)) &&
- (invoke = InteractionUtil.getInvoke(m_activity)) != null) {
-
- invoke.convertRequest(activities, context);
-
- // Create choice with normal response and fault paths
- org.scribble.conversation.model.If choice=new org.scribble.conversation.model.If();
-
- ConditionalBlock cb=new ConditionalBlock();
-
- invoke.convertResponse(cb.getContents(), context);
-
- // Include remaining activities
- if (m_activity instanceof Sequence) {
- for (int i=1; i < ((Sequence)m_activity).getActivities().size(); i++) {
- ((Sequence)m_activity).getActivities().get(i).convert(cb.getContents(), context);
- }
- }
-
- choice.getConditionalBlocks().add(cb);
-
- // Process fault handlers
- for (int i=0; i < m_faultHandlers.getCatchPaths().size(); i++) {
- Catch catchBlock=m_faultHandlers.getCatchPaths().get(i);
-
- ConditionalBlock fcb=new ConditionalBlock();
-
- String mesgType=catchBlock.getFaultMessageType();
-
- if (mesgType == null) {
- mesgType = catchBlock.getFaultMessageElement();
- }
-
- Variable faultVar=null;
-
- if (catchBlock.getFaultVariable() != null) {
- faultVar = new Variable(getModel());
- faultVar.setName(catchBlock.getFaultVariable());
- faultVar.setMessageType(catchBlock.getFaultMessageType());
- faultVar.setElement(catchBlock.getFaultMessageElement());
- context.addVariable(faultVar);
- }
-
- invoke.convertFaultResponse(fcb.getContents(), catchBlock.getFaultVariable(),
- mesgType, context);
-
- if (catchBlock.getActivity() != null) {
- catchBlock.getActivity().convert(fcb.getContents(), context);
- }
-
- choice.getConditionalBlocks().add(fcb);
-
- if (faultVar != null) {
- context.removeVariable(faultVar);
- }
- }
-
- activities.add(choice);
- } else {
- // Store in local var, in case try/catch block needs to be
- // added
- java.util.List<Activity> acts=activities;
-
- // Check if try/catch block is required
- if (getFaultHandlers() != null &&
- (getFaultHandlers().getCatchPaths().size() > 0 ||
- getFaultHandlers().getCatchAll() != null)) {
- org.scribble.conversation.model.TryEscape te=
- new org.scribble.conversation.model.TryEscape();
- te.derivedFrom(this);
- te.getBlock().derivedFrom(this);
-
- acts.add(te);
-
- acts = te.getBlock().getContents();
-
- for (int i=0; i < getFaultHandlers().getCatchPaths().size(); i++) {
- Catch catchPath=getFaultHandlers().getCatchPaths().get(i);
-
- org.scribble.conversation.model.CatchBlock cb=
- new org.scribble.conversation.model.CatchBlock();
- cb.derivedFrom(catchPath);
-
- TypeReference tref=new TypeReference();
- tref.setLocalpart(XMLUtils.getLocalname(catchPath.getFaultName()));
- cb.setType(tref);
-
- Variable faultVar=null;
-
- if (catchPath.getFaultVariable() != null) {
- faultVar = new Variable(getModel());
- faultVar.setName(catchPath.getFaultVariable());
- faultVar.setMessageType(catchPath.getFaultMessageType());
- faultVar.setElement(catchPath.getFaultMessageElement());
- context.addVariable(faultVar);
- }
-
- if (catchPath.getActivity() != null) {
- catchPath.getActivity().convert(cb.getContents(), context);
- }
-
- if (faultVar != null) {
- context.removeVariable(faultVar);
- }
-
- te.getEscapeBlocks().add(cb);
- }
- }
-
- // Convert normal activities in scope
- if (getActivity() != null) {
- getActivity().convert(acts, context);
- }
- }
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof BPELActivity) {
- ret += "@activity";
- } else if (elem instanceof FaultHandlers) {
- ret += "@faultHandlers";
- } else if (elem instanceof EventHandlers) {
- ret += "@eventHandlers";
- }
-
- return(ret);
- }
-
- private org.w3c.dom.Element m_partnerLinksElem=null;
- private org.w3c.dom.Element m_variablesElem=null;
- private org.w3c.dom.Element m_messageExchangesElem=null;
- private org.w3c.dom.Element m_correlationSetsElem=null;
- private java.util.List<PartnerLink> m_partnerLinks=new java.util.Vector<PartnerLink>();
- private java.util.List<Variable> m_variables=new java.util.Vector<Variable>();
- private EventHandlers m_eventHandlers=null;
- private FaultHandlers m_faultHandlers=null;
- private CompensationHandler m_compensationHandler=null;
- private TerminationHandler m_terminationHandler=null;
- private BPELActivity m_activity;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Scope.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Scope.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Scope.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Scope.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,690 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.savara.bpel.util.InteractionUtil;
+import org.savara.util.XMLUtils;
+import org.scribble.conversation.model.ConditionalBlock;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents a scope grouping activity.
+ *
+ * @author gary
+ */
+public class Scope extends BPELActivity implements ScopeActivity {
+
+ private static final long serialVersionUID = 7132062003047468101L;
+
+ public static final String SCOPE = "scope";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Scope(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ m_partnerLinksElem = findChildElement("partnerLinks");
+
+ if (m_partnerLinksElem != null) {
+ java.util.List<BPELElement> elems=
+ findChildElements(m_partnerLinksElem,
+ PartnerLink.class);
+
+ for (int i=0; i < elems.size(); i++) {
+ m_partnerLinks.add((PartnerLink)elems.get(i));
+ }
+ }
+
+ m_variablesElem = findChildElement("variables");
+
+ if (m_variablesElem != null) {
+ java.util.List<BPELElement> elems=
+ findChildElements(m_variablesElem,
+ Variable.class);
+
+ for (int i=0; i < elems.size(); i++) {
+ m_variables.add((Variable)elems.get(i));
+ }
+ }
+
+ m_messageExchangesElem = findChildElement("messageExchanges");
+ m_correlationSetsElem = findChildElement("correlationSets");
+
+ org.w3c.dom.Element ehs=findChildElement(EventHandlers.EVENTHANDLERS);
+ if (ehs != null) {
+ m_eventHandlers = new EventHandlers(model, ehs);
+ }
+
+ org.w3c.dom.Element fhs=findChildElement(FaultHandlers.FAULTHANDLERS);
+ if (fhs != null) {
+ m_faultHandlers = new FaultHandlers(model, fhs);
+ }
+
+ org.w3c.dom.Element ch=findChildElement(CompensationHandler.COMPENSATIONHANDLER);
+ if (ch != null) {
+ m_compensationHandler = new CompensationHandler(model, ch);
+ }
+
+ org.w3c.dom.Element th=findChildElement(TerminationHandler.TERMINATIONHANDLER);
+ if (th != null) {
+ m_terminationHandler = new TerminationHandler(model, th);
+ }
+
+ m_activity = findChildActivity();
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Scope(BPELLanguageModel model) {
+ super(model, SCOPE);
+ }
+
+ /**
+ * This method adds a variable to the scope.
+ *
+ * @param var The variable to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addVariable(Variable var, int pos) {
+
+ if (m_variablesElem == null) {
+ m_variablesElem = getDOMElement().getOwnerDocument().
+ createElementNS(BPEL_NS, "variables");
+
+ // Add to parent
+ org.w3c.dom.Element insertBefore=
+ findChildElement("partnerLinks");
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("messageExchanges");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("correlationSets");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("eventHandlers");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("faultHandlers");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("compensationHandler");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("terminationHandler");
+ }
+
+ if (insertBefore == null) {
+ BPELElement elem=findChildActivity();
+
+ if (elem != null) {
+ insertBefore = elem.getDOMElement();
+ }
+ }
+
+ if (insertBefore != null) {
+ getDOMElement().insertBefore(m_variablesElem, insertBefore);
+ } else {
+ getDOMElement().appendChild(m_variablesElem);
+ }
+ }
+
+ if (pos == -1 || pos >= m_variables.size()) {
+ m_variables.add(var);
+
+ setChildElement(m_variablesElem, null, var, null);
+ } else {
+
+ Variable cur=m_variables.get(pos);
+
+ m_variables.add(pos, var);
+
+ if (cur != null) {
+ setChildElement(m_variablesElem, null, var,
+ cur.getDOMElement());
+ } else {
+ setChildElement(m_variablesElem, null, var, null);
+ }
+ }
+ }
+
+ /**
+ * This method removes an activity from the grouping
+ * construct.
+ *
+ * @param act The activity to be removed
+ * @return Whether the activity was removed
+ */
+ public boolean removeVariable(Variable var) {
+ boolean ret=m_variables.remove(var);
+
+ if (ret) {
+ m_variablesElem.removeChild(var.getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of variables.
+ *
+ * @return The
+ */
+ public java.util.List<Variable> getVariables() {
+ return(m_variables);
+ }
+
+ /**
+ * This method adds a partner link to the scope.
+ *
+ * @param pl The partner link to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addPartnerLink(PartnerLink pl, int pos) {
+
+ if (m_partnerLinksElem == null) {
+ m_partnerLinksElem = getDOMElement().getOwnerDocument().
+ createElementNS(BPEL_NS, "partnerLinks");
+
+ // Add to parent
+ org.w3c.dom.Element insertBefore=
+ findChildElement("messageExchanges");
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("correlationSets");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("eventHandlers");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("faultHandlers");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("compensationHandler");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("terminationHandler");
+ }
+
+ if (insertBefore == null) {
+ BPELElement elem=findChildActivity();
+
+ if (elem != null) {
+ insertBefore = elem.getDOMElement();
+ }
+ }
+
+ if (insertBefore != null) {
+ getDOMElement().insertBefore(m_partnerLinksElem, insertBefore);
+ } else {
+ getDOMElement().appendChild(m_partnerLinksElem);
+ }
+ }
+
+ if (pos == -1 || pos >= m_partnerLinks.size()) {
+ m_partnerLinks.add(pl);
+
+ setChildElement(m_partnerLinksElem, null, pl, null);
+ } else {
+
+ PartnerLink cur=m_partnerLinks.get(pos);
+
+ m_partnerLinks.add(pos, pl);
+
+ if (cur != null) {
+ setChildElement(m_partnerLinksElem, null, pl,
+ cur.getDOMElement());
+ } else {
+ setChildElement(m_partnerLinksElem, null, pl, null);
+ }
+ }
+ }
+
+ /**
+ * This method removes a partner link from the grouping
+ * construct.
+ *
+ * @param pl The partner link to be removed
+ * @return Whether the partner link was removed
+ */
+ public boolean removePartnerLink(PartnerLink pl) {
+ boolean ret=m_partnerLinks.remove(pl);
+
+ if (ret) {
+ m_partnerLinksElem.removeChild(pl.getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of partner links.
+ *
+ * @return The partner links
+ */
+ public java.util.List<PartnerLink> getPartnerLinks() {
+ return(m_partnerLinks);
+ }
+
+ /**
+ * This method sets the activity associated with
+ * the 'else' construct.
+ *
+ * @param act The activity
+ */
+ public void setActivity(BPELActivity act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'else' construct.
+ *
+ * @return The activity
+ */
+ public BPELActivity getActivity() {
+ return(m_activity);
+ }
+
+ /**
+ * This method sets the 'eventHandlers' path.
+ *
+ * @param elem The 'eventHandlers' path
+ */
+ public void setEventHandlers(EventHandlers elem) {
+ org.w3c.dom.Element existingElem=null;
+
+ if (m_eventHandlers != null) {
+ existingElem = m_eventHandlers.getDOMElement();
+ }
+
+ m_eventHandlers = elem;
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("faultHandlers");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("compensationHandler");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("terminationHandler");
+ }
+
+ if (insertBefore == null) {
+ BPELElement act=findChildActivity();
+
+ if (elem != null) {
+ insertBefore = act.getDOMElement();
+ }
+ }
+
+ setChildElement(existingElem, elem,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the 'eventHandlers' path.
+ *
+ * @return The 'eventHandlers' path
+ */
+ public EventHandlers getEventHandlers() {
+ return(m_eventHandlers);
+ }
+
+ /**
+ * This method sets the 'faultHandlers' path.
+ *
+ * @param elem The 'faultHandlers' path
+ */
+ public void setFaultHandlers(FaultHandlers elem) {
+ org.w3c.dom.Element existingElem=null;
+
+ if (m_faultHandlers != null) {
+ existingElem = m_faultHandlers.getDOMElement();
+ }
+
+ m_faultHandlers = elem;
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("compensationHandler");
+ }
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("terminationHandler");
+ }
+
+ if (insertBefore == null) {
+ BPELElement act=findChildActivity();
+
+ if (elem != null) {
+ insertBefore = act.getDOMElement();
+ }
+ }
+
+ setChildElement(existingElem, elem,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the 'faultHandlers' path.
+ *
+ * @return The 'faultHandlers' path
+ */
+ public FaultHandlers getFaultHandlers() {
+ return(m_faultHandlers);
+ }
+
+ /**
+ * This method sets the 'compensationHandler' path.
+ *
+ * @param elem The 'compensationHandler' path
+ */
+ public void setCompensationHandler(CompensationHandler elem) {
+ org.w3c.dom.Element existingElem=null;
+
+ if (m_compensationHandler != null) {
+ existingElem = m_compensationHandler.getDOMElement();
+ }
+
+ m_compensationHandler = elem;
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (insertBefore == null) {
+ insertBefore = findChildElement("terminationHandler");
+ }
+
+ if (insertBefore == null) {
+ BPELElement act=findChildActivity();
+
+ if (elem != null) {
+ insertBefore = act.getDOMElement();
+ }
+ }
+
+ setChildElement(existingElem, elem,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the 'compensationHandler' path.
+ *
+ * @return The 'compensationHandler' path
+ */
+ public CompensationHandler getCompensationHandler() {
+ return(m_compensationHandler);
+ }
+
+ /**
+ * This method sets the 'terminationHandler' path.
+ *
+ * @param elem The 'terminationHandler' path
+ */
+ public void setTerminationHandler(TerminationHandler elem) {
+ org.w3c.dom.Element existingElem=null;
+
+ if (m_terminationHandler != null) {
+ existingElem = m_terminationHandler.getDOMElement();
+ }
+
+ m_terminationHandler = elem;
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (insertBefore == null) {
+ BPELElement act=findChildActivity();
+
+ if (elem != null) {
+ insertBefore = act.getDOMElement();
+ }
+ }
+
+ setChildElement(existingElem, elem,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the 'terminationHandler' path.
+ *
+ * @return The 'terminationHandler' path
+ */
+ public TerminationHandler getTerminationHandler() {
+ return(m_terminationHandler);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(ModelListener l) {
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ getSource().setComponentURI(getURI());
+
+ // Add variables to the context
+ for (int i=0; i < m_variables.size(); i++) {
+ context.addVariable(m_variables.get(i));
+ }
+
+ // Count number of invoke activities
+ int invokeCount=InteractionUtil.countInvokes(getActivity().getDOMElement());
+
+ // Check whether scope has been defined to represent
+ // an interaction with one or more fault responses and
+ // no event handlers
+ Invoke invoke=null;
+
+ if (invokeCount == 1 &&
+ m_faultHandlers != null && (m_faultHandlers.getCatchPaths().size() > 0 ||
+ m_faultHandlers.getCatchAll() != null) &&
+ (m_eventHandlers == null || (m_eventHandlers.getOnEvents().size() == 0 &&
+ m_eventHandlers.getOnAlarms().size() == 0)) &&
+ (invoke = InteractionUtil.getInvoke(m_activity)) != null) {
+
+ invoke.convertRequest(activities, context);
+
+ // Create choice with normal response and fault paths
+ org.scribble.conversation.model.If choice=new org.scribble.conversation.model.If();
+
+ ConditionalBlock cb=new ConditionalBlock();
+
+ invoke.convertResponse(cb.getContents(), context);
+
+ // Include remaining activities
+ if (m_activity instanceof Sequence) {
+ for (int i=1; i < ((Sequence)m_activity).getActivities().size(); i++) {
+ ((Sequence)m_activity).getActivities().get(i).convert(cb.getContents(), context);
+ }
+ }
+
+ choice.getConditionalBlocks().add(cb);
+
+ // Process fault handlers
+ for (int i=0; i < m_faultHandlers.getCatchPaths().size(); i++) {
+ Catch catchBlock=m_faultHandlers.getCatchPaths().get(i);
+
+ ConditionalBlock fcb=new ConditionalBlock();
+
+ String mesgType=catchBlock.getFaultMessageType();
+
+ if (mesgType == null) {
+ mesgType = catchBlock.getFaultMessageElement();
+ }
+
+ Variable faultVar=null;
+
+ if (catchBlock.getFaultVariable() != null) {
+ faultVar = new Variable(getModel());
+ faultVar.setName(catchBlock.getFaultVariable());
+ faultVar.setMessageType(catchBlock.getFaultMessageType());
+ faultVar.setElement(catchBlock.getFaultMessageElement());
+ context.addVariable(faultVar);
+ }
+
+ invoke.convertFaultResponse(fcb.getContents(), catchBlock.getFaultVariable(),
+ mesgType, context);
+
+ if (catchBlock.getActivity() != null) {
+ catchBlock.getActivity().convert(fcb.getContents(), context);
+ }
+
+ choice.getConditionalBlocks().add(fcb);
+
+ if (faultVar != null) {
+ context.removeVariable(faultVar);
+ }
+ }
+
+ activities.add(choice);
+ } else {
+ // Store in local var, in case try/catch block needs to be
+ // added
+ java.util.List<Activity> acts=activities;
+
+ // Check if try/catch block is required
+ if (getFaultHandlers() != null &&
+ (getFaultHandlers().getCatchPaths().size() > 0 ||
+ getFaultHandlers().getCatchAll() != null)) {
+ org.scribble.conversation.model.TryEscape te=
+ new org.scribble.conversation.model.TryEscape();
+ te.derivedFrom(this);
+ te.getBlock().derivedFrom(this);
+
+ acts.add(te);
+
+ acts = te.getBlock().getContents();
+
+ for (int i=0; i < getFaultHandlers().getCatchPaths().size(); i++) {
+ Catch catchPath=getFaultHandlers().getCatchPaths().get(i);
+
+ org.scribble.conversation.model.CatchBlock cb=
+ new org.scribble.conversation.model.CatchBlock();
+ cb.derivedFrom(catchPath);
+
+ TypeReference tref=new TypeReference();
+ tref.setLocalpart(XMLUtils.getLocalname(catchPath.getFaultName()));
+ cb.setType(tref);
+
+ Variable faultVar=null;
+
+ if (catchPath.getFaultVariable() != null) {
+ faultVar = new Variable(getModel());
+ faultVar.setName(catchPath.getFaultVariable());
+ faultVar.setMessageType(catchPath.getFaultMessageType());
+ faultVar.setElement(catchPath.getFaultMessageElement());
+ context.addVariable(faultVar);
+ }
+
+ if (catchPath.getActivity() != null) {
+ catchPath.getActivity().convert(cb.getContents(), context);
+ }
+
+ if (faultVar != null) {
+ context.removeVariable(faultVar);
+ }
+
+ te.getEscapeBlocks().add(cb);
+ }
+ }
+
+ // Convert normal activities in scope
+ if (getActivity() != null) {
+ getActivity().convert(acts, context);
+ }
+ }
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof BPELActivity) {
+ ret += "@activity";
+ } else if (elem instanceof FaultHandlers) {
+ ret += "@faultHandlers";
+ } else if (elem instanceof EventHandlers) {
+ ret += "@eventHandlers";
+ }
+
+ return(ret);
+ }
+
+ private org.w3c.dom.Element m_partnerLinksElem=null;
+ private org.w3c.dom.Element m_variablesElem=null;
+ private org.w3c.dom.Element m_messageExchangesElem=null;
+ private org.w3c.dom.Element m_correlationSetsElem=null;
+ private java.util.List<PartnerLink> m_partnerLinks=new java.util.Vector<PartnerLink>();
+ private java.util.List<Variable> m_variables=new java.util.Vector<Variable>();
+ private EventHandlers m_eventHandlers=null;
+ private FaultHandlers m_faultHandlers=null;
+ private CompensationHandler m_compensationHandler=null;
+ private TerminationHandler m_terminationHandler=null;
+ private BPELActivity m_activity;
+}
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ScopeActivity.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/ScopeActivity.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/ScopeActivity.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -15,7 +15,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
-package org.savara.bpel.model.component;
+package org.savara.bpel.toprotocol;
import org.scribble.common.logging.Journal;
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Sequence.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Sequence.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Sequence.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,155 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents a sequence grouping activity.
- *
- * @author gary
- */
-public class Sequence extends BPELActivity {
-
- public static final String SEQUENCE = "sequence";
-
- private static final long serialVersionUID = 6656299352423612770L;
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Sequence(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- java.util.List<BPELElement> acts=
- findChildElements(BPELActivity.class);
-
- for (int i=0; i < acts.size(); i++) {
- if (acts.get(i).isActivity() &&
- acts.get(i) instanceof BPELActivity) {
- m_activities.add((BPELActivity)acts.get(i));
- }
- }
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Sequence(BPELLanguageModel model) {
- super(model, SEQUENCE);
- }
-
- /**
- * This method adds an activity to the grouping construct.
- *
- * @param act The activity to be added
- * @param pos The position to add, or -1 if at the end
- */
- public void addActivity(BPELActivity act, int pos) {
- if (pos == -1 || pos >= m_activities.size()) {
- m_activities.add(act);
-
- setChildElement(null, act, null);
- } else {
-
- BPELActivity cur=m_activities.get(pos);
-
- m_activities.add(pos, act);
-
- if (cur != null) {
- setChildElement(null, act,
- cur.getDOMElement());
- } else {
- setChildElement(null, act, null);
- }
- }
- }
-
- /**
- * This method removes an activity from the grouping
- * construct.
- *
- * @param act The activity to be removed
- * @return Whether the activity was removed
- */
- public boolean removeActivity(BPELActivity act) {
- boolean ret=m_activities.remove(act);
-
- if (ret) {
- getDOMElement().removeChild(act.getDOMElement());
- }
-
- return(ret);
- }
-
- /**
- * This method returns the list of activities associated
- * with the grouping construct.
- *
- * @return The list of activities
- */
- public java.util.List<BPELActivity> getActivities() {
- return(m_activities);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(ModelListener l) {
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- getSource().setComponentURI(getURI());
-
- for (int i=0; i < m_activities.size(); i++) {
- m_activities.get(i).convert(activities, context);
- }
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- int pos=getActivities().indexOf(elem);
- return("@activities."+pos);
- }
-
- private java.util.List<BPELActivity> m_activities=
- new java.util.Vector<BPELActivity>();
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Sequence.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Sequence.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Sequence.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Sequence.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,155 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents a sequence grouping activity.
+ *
+ * @author gary
+ */
+public class Sequence extends BPELActivity {
+
+ public static final String SEQUENCE = "sequence";
+
+ private static final long serialVersionUID = 6656299352423612770L;
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Sequence(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ java.util.List<BPELElement> acts=
+ findChildElements(BPELActivity.class);
+
+ for (int i=0; i < acts.size(); i++) {
+ if (acts.get(i).isActivity() &&
+ acts.get(i) instanceof BPELActivity) {
+ m_activities.add((BPELActivity)acts.get(i));
+ }
+ }
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Sequence(BPELLanguageModel model) {
+ super(model, SEQUENCE);
+ }
+
+ /**
+ * This method adds an activity to the grouping construct.
+ *
+ * @param act The activity to be added
+ * @param pos The position to add, or -1 if at the end
+ */
+ public void addActivity(BPELActivity act, int pos) {
+ if (pos == -1 || pos >= m_activities.size()) {
+ m_activities.add(act);
+
+ setChildElement(null, act, null);
+ } else {
+
+ BPELActivity cur=m_activities.get(pos);
+
+ m_activities.add(pos, act);
+
+ if (cur != null) {
+ setChildElement(null, act,
+ cur.getDOMElement());
+ } else {
+ setChildElement(null, act, null);
+ }
+ }
+ }
+
+ /**
+ * This method removes an activity from the grouping
+ * construct.
+ *
+ * @param act The activity to be removed
+ * @return Whether the activity was removed
+ */
+ public boolean removeActivity(BPELActivity act) {
+ boolean ret=m_activities.remove(act);
+
+ if (ret) {
+ getDOMElement().removeChild(act.getDOMElement());
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method returns the list of activities associated
+ * with the grouping construct.
+ *
+ * @return The list of activities
+ */
+ public java.util.List<BPELActivity> getActivities() {
+ return(m_activities);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(ModelListener l) {
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ getSource().setComponentURI(getURI());
+
+ for (int i=0; i < m_activities.size(); i++) {
+ m_activities.get(i).convert(activities, context);
+ }
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ int pos=getActivities().indexOf(elem);
+ return("@activities."+pos);
+ }
+
+ private java.util.List<BPELActivity> m_activities=
+ new java.util.Vector<BPELActivity>();
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Source.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Source.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Source.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the BPEL source element, contained within
- * any BPEL activity.
- */
-public class Source extends BPELElement {
-
- private static final long serialVersionUID = 4878669992635772776L;
-
- private static final String LINK_NAME = "linkName";
-
- public static final String SOURCE="source";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param elem The XML configuration details for the element
- */
- public Source(BPELLanguageModel model,
- org.w3c.dom.Element elem) {
- super(model, elem);
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public Source(BPELLanguageModel model) {
- super(model, SOURCE);
- }
-
- /**
- * This method returns the name associated
- * with the link.
- *
- * @return The link name
- */
- public String getLinkName() {
- return(getDOMElement().getAttribute(LINK_NAME));
- }
-
- /**
- * This method sets the link name.
- *
- * @param name The name
- */
- public void setLinkName(String name) {
- getDOMElement().setAttribute(LINK_NAME, name);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
- }
-
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Source.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Source.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Source.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Source.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the BPEL source element, contained within
+ * any BPEL activity.
+ */
+public class Source extends BPELElement {
+
+ private static final long serialVersionUID = 4878669992635772776L;
+
+ private static final String LINK_NAME = "linkName";
+
+ public static final String SOURCE="source";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param elem The XML configuration details for the element
+ */
+ public Source(BPELLanguageModel model,
+ org.w3c.dom.Element elem) {
+ super(model, elem);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Source(BPELLanguageModel model) {
+ super(model, SOURCE);
+ }
+
+ /**
+ * This method returns the name associated
+ * with the link.
+ *
+ * @return The link name
+ */
+ public String getLinkName() {
+ return(getDOMElement().getAttribute(LINK_NAME));
+ }
+
+ /**
+ * This method sets the link name.
+ *
+ * @param name The name
+ */
+ public void setLinkName(String name) {
+ getDOMElement().setAttribute(LINK_NAME, name);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Target.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Target.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Target.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the BPEL target element, contained within
- * any BPEL activity.
- */
-public class Target extends BPELElement {
-
- private static final long serialVersionUID = -8813636777020840433L;
-
- private static final String LINK_NAME = "linkName";
-
- public static final String TARGET="target";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param elem The XML configuration details for the element
- */
- public Target(BPELLanguageModel model,
- org.w3c.dom.Element elem) {
- super(model, elem);
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public Target(BPELLanguageModel model) {
- super(model, TARGET);
- }
-
- /**
- * This method returns the name associated
- * with the link.
- *
- * @return The link name
- */
- public String getLinkName() {
- return(getDOMElement().getAttribute(LINK_NAME));
- }
-
- /**
- * This method sets the link name.
- *
- * @param name The name
- */
- public void setLinkName(String name) {
- getDOMElement().setAttribute(LINK_NAME, name);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
- }
-
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Target.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Target.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Target.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Target.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the BPEL target element, contained within
+ * any BPEL activity.
+ */
+public class Target extends BPELElement {
+
+ private static final long serialVersionUID = -8813636777020840433L;
+
+ private static final String LINK_NAME = "linkName";
+
+ public static final String TARGET="target";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param elem The XML configuration details for the element
+ */
+ public Target(BPELLanguageModel model,
+ org.w3c.dom.Element elem) {
+ super(model, elem);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Target(BPELLanguageModel model) {
+ super(model, TARGET);
+ }
+
+ /**
+ * This method returns the name associated
+ * with the link.
+ *
+ * @return The link name
+ */
+ public String getLinkName() {
+ return(getDOMElement().getAttribute(LINK_NAME));
+ }
+
+ /**
+ * This method sets the link name.
+ *
+ * @param name The name
+ */
+ public void setLinkName(String name) {
+ getDOMElement().setAttribute(LINK_NAME, name);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/TerminationHandler.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/TerminationHandler.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/TerminationHandler.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,96 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import java.util.List;
-
-import org.savara.bpel.model.BPELLanguageModel;
-import org.scribble.protocol.model.Activity;
-
-/**
- * This class represents the 'terminationHandler' construct contained
- * within the 'scope' activity.
- */
-public class TerminationHandler extends BPELElement {
-
- private static final long serialVersionUID = 7316551859410369824L;
-
- public static final String TERMINATIONHANDLER="terminationHandler";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the element
- */
- public TerminationHandler(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- m_activity = findChildActivity();
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public TerminationHandler(BPELLanguageModel model) {
- super(model, TERMINATIONHANDLER);
- }
-
- /**
- * This method sets the activity associated with
- * the 'else' construct.
- *
- * @param act The activity
- */
- public void setActivity(BPELElement act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'else' construct.
- *
- * @return The activity
- */
- public BPELElement getActivity() {
- return(m_activity);
- }
-
- @Override
- public void convert(List<Activity> activities, ConversionContext context) {
- // TODO Auto-generated method stub
-
- }
-
- private BPELElement m_activity;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/TerminationHandler.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/TerminationHandler.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/TerminationHandler.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/TerminationHandler.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,96 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import java.util.List;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+import org.scribble.protocol.model.Activity;
+
+/**
+ * This class represents the 'terminationHandler' construct contained
+ * within the 'scope' activity.
+ */
+public class TerminationHandler extends BPELElement {
+
+ private static final long serialVersionUID = 7316551859410369824L;
+
+ public static final String TERMINATIONHANDLER="terminationHandler";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the element
+ */
+ public TerminationHandler(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ m_activity = findChildActivity();
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public TerminationHandler(BPELLanguageModel model) {
+ super(model, TERMINATIONHANDLER);
+ }
+
+ /**
+ * This method sets the activity associated with
+ * the 'else' construct.
+ *
+ * @param act The activity
+ */
+ public void setActivity(BPELElement act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'else' construct.
+ *
+ * @return The activity
+ */
+ public BPELElement getActivity() {
+ return(m_activity);
+ }
+
+ @Override
+ public void convert(List<Activity> activities, ConversionContext context) {
+ // TODO Auto-generated method stub
+
+ }
+
+ private BPELElement m_activity;
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Throw.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Throw.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Throw.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,123 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents the throw activity.
- *
- * @author gary
- */
-public class Throw extends BPELActivity {
-
- private static final long serialVersionUID = 9187657888490480490L;
-
- public static final String THROW = "throw";
-
- private static final String FAULT_NAME = "faultName";
- private static final String FAULT_VARIABLE = "faultVariable";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Throw(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Throw(BPELLanguageModel model) {
- super(model, THROW);
- }
-
- /**
- * This method sets the fault name.
- *
- * @param faultName The fault name
- */
- public void setFaultName(String faultName) {
- getDOMElement().setAttribute(FAULT_NAME, faultName);
- }
-
- /**
- * This method returns the fault name.
- *
- * @return The fault name
- */
- public String getFaultName() {
- return(getDOMElement().hasAttribute(FAULT_NAME)?
- getDOMElement().getAttribute(FAULT_NAME):null);
- }
-
- /**
- * This method sets the fault variable.
- *
- * @param faultVariable The fault variable
- */
- public void setFaultVariable(String faultVariable) {
- getDOMElement().setAttribute(FAULT_VARIABLE, faultVariable);
- }
-
- /**
- * This method returns the fault variable.
- *
- * @return The fault variable
- */
- public String getFaultVariable() {
- return(getDOMElement().hasAttribute(FAULT_VARIABLE)?
- getDOMElement().getAttribute(FAULT_VARIABLE):null);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(ModelListener l) {
- // Don't validate unsupported actions
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- getSource().setComponentURI(getURI());
- }
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Throw.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Throw.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Throw.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Throw.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,123 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents the throw activity.
+ *
+ * @author gary
+ */
+public class Throw extends BPELActivity {
+
+ private static final long serialVersionUID = 9187657888490480490L;
+
+ public static final String THROW = "throw";
+
+ private static final String FAULT_NAME = "faultName";
+ private static final String FAULT_VARIABLE = "faultVariable";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Throw(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Throw(BPELLanguageModel model) {
+ super(model, THROW);
+ }
+
+ /**
+ * This method sets the fault name.
+ *
+ * @param faultName The fault name
+ */
+ public void setFaultName(String faultName) {
+ getDOMElement().setAttribute(FAULT_NAME, faultName);
+ }
+
+ /**
+ * This method returns the fault name.
+ *
+ * @return The fault name
+ */
+ public String getFaultName() {
+ return(getDOMElement().hasAttribute(FAULT_NAME)?
+ getDOMElement().getAttribute(FAULT_NAME):null);
+ }
+
+ /**
+ * This method sets the fault variable.
+ *
+ * @param faultVariable The fault variable
+ */
+ public void setFaultVariable(String faultVariable) {
+ getDOMElement().setAttribute(FAULT_VARIABLE, faultVariable);
+ }
+
+ /**
+ * This method returns the fault variable.
+ *
+ * @return The fault variable
+ */
+ public String getFaultVariable() {
+ return(getDOMElement().hasAttribute(FAULT_VARIABLE)?
+ getDOMElement().getAttribute(FAULT_VARIABLE):null);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(ModelListener l) {
+ // Don't validate unsupported actions
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ getSource().setComponentURI(getURI());
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Until.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Until.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Until.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.BPELLanguageModel;
-
-/**
- * This class represents the BPEL 'until' element.
- */
-public class Until extends AbstractCondition {
-
- private static final long serialVersionUID = 5398291987513467996L;
-
- public static final String UNTIL="until";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param elem The XML configuration details for the element
- */
- public Until(BPELLanguageModel model,
- org.w3c.dom.Element elem) {
- super(model, elem);
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public Until(BPELLanguageModel model) {
- super(model, UNTIL);
- }
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Until.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Until.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Until.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Until.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.BPELLanguageModel;
+
+/**
+ * This class represents the BPEL 'until' element.
+ */
+public class Until extends AbstractCondition {
+
+ private static final long serialVersionUID = 5398291987513467996L;
+
+ public static final String UNTIL="until";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param elem The XML configuration details for the element
+ */
+ public Until(BPELLanguageModel model,
+ org.w3c.dom.Element elem) {
+ super(model, elem);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Until(BPELLanguageModel model) {
+ super(model, UNTIL);
+ }
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Variable.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Variable.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Variable.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,159 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents the variable.
- *
- * @author gary
- */
-public class Variable extends BPELElement {
-
- private static final long serialVersionUID = -3824104482191549444L;
-
- public static final String VARIABLE = "variable";
-
- private static final String NAME = "name";
- private static final String TYPE = "type";
- private static final String ELEMENT = "element";
- private static final String MESSAGE_TYPE = "messageType";
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- * @param element The XML configuration details for the element
- */
- public Variable(BPELLanguageModel model,
- org.w3c.dom.Element element) {
- super(model, element);
- }
-
- /**
- * The constructor for the element.
- *
- * @param model The BPEL model
- */
- public Variable(BPELLanguageModel model) {
- super(model, VARIABLE);
- }
-
- /**
- * This method sets the name.
- *
- * @param name The name
- */
- public void setName(String name) {
- getDOMElement().setAttribute(NAME, name);
- }
-
- /**
- * This method returns the name.
- *
- * @return The name
- */
- public String getName() {
- return(getDOMElement().hasAttribute(NAME)?
- getDOMElement().getAttribute(NAME):null);
- }
-
- /**
- * This method sets the variable type.
- *
- * @param type The type
- */
- public void setType(String type) {
- getDOMElement().setAttribute(TYPE, type);
- }
-
- /**
- * This method returns the variable type.
- *
- * @return The type
- */
- public String getType() {
- return(getDOMElement().hasAttribute(TYPE)?
- getDOMElement().getAttribute(TYPE):null);
- }
-
- /**
- * This method sets the variable element.
- *
- * @param element The element
- */
- public void setElement(String element) {
- getDOMElement().setAttribute(ELEMENT, element);
- }
-
- /**
- * This method returns the variable element.
- *
- * @return The element
- */
- public String getElement() {
- return(getDOMElement().hasAttribute(ELEMENT)?
- getDOMElement().getAttribute(ELEMENT):null);
- }
-
- /**
- * This method sets the variable message type.
- *
- * @param type The message type
- */
- public void setMessageType(String type) {
- getDOMElement().setAttribute(MESSAGE_TYPE, type);
- }
-
- /**
- * This method returns the variable message type.
- *
- * @return The message type
- */
- public String getMessageType() {
- return(getDOMElement().hasAttribute(MESSAGE_TYPE)?
- getDOMElement().getAttribute(MESSAGE_TYPE):null);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(ModelListener l) {
- // Don't validate unsupported actions
- }
-
- /**
- * This method converts the BPEL activity into an equivalent
- * behavioural description for conformance checking.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- public void convert(java.util.List<Activity> activities,
- ConversionContext context) {
- }
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Variable.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Variable.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Variable.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Variable.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,159 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents the variable.
+ *
+ * @author gary
+ */
+public class Variable extends BPELElement {
+
+ private static final long serialVersionUID = -3824104482191549444L;
+
+ public static final String VARIABLE = "variable";
+
+ private static final String NAME = "name";
+ private static final String TYPE = "type";
+ private static final String ELEMENT = "element";
+ private static final String MESSAGE_TYPE = "messageType";
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ * @param element The XML configuration details for the element
+ */
+ public Variable(BPELLanguageModel model,
+ org.w3c.dom.Element element) {
+ super(model, element);
+ }
+
+ /**
+ * The constructor for the element.
+ *
+ * @param model The BPEL model
+ */
+ public Variable(BPELLanguageModel model) {
+ super(model, VARIABLE);
+ }
+
+ /**
+ * This method sets the name.
+ *
+ * @param name The name
+ */
+ public void setName(String name) {
+ getDOMElement().setAttribute(NAME, name);
+ }
+
+ /**
+ * This method returns the name.
+ *
+ * @return The name
+ */
+ public String getName() {
+ return(getDOMElement().hasAttribute(NAME)?
+ getDOMElement().getAttribute(NAME):null);
+ }
+
+ /**
+ * This method sets the variable type.
+ *
+ * @param type The type
+ */
+ public void setType(String type) {
+ getDOMElement().setAttribute(TYPE, type);
+ }
+
+ /**
+ * This method returns the variable type.
+ *
+ * @return The type
+ */
+ public String getType() {
+ return(getDOMElement().hasAttribute(TYPE)?
+ getDOMElement().getAttribute(TYPE):null);
+ }
+
+ /**
+ * This method sets the variable element.
+ *
+ * @param element The element
+ */
+ public void setElement(String element) {
+ getDOMElement().setAttribute(ELEMENT, element);
+ }
+
+ /**
+ * This method returns the variable element.
+ *
+ * @return The element
+ */
+ public String getElement() {
+ return(getDOMElement().hasAttribute(ELEMENT)?
+ getDOMElement().getAttribute(ELEMENT):null);
+ }
+
+ /**
+ * This method sets the variable message type.
+ *
+ * @param type The message type
+ */
+ public void setMessageType(String type) {
+ getDOMElement().setAttribute(MESSAGE_TYPE, type);
+ }
+
+ /**
+ * This method returns the variable message type.
+ *
+ * @return The message type
+ */
+ public String getMessageType() {
+ return(getDOMElement().hasAttribute(MESSAGE_TYPE)?
+ getDOMElement().getAttribute(MESSAGE_TYPE):null);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(ModelListener l) {
+ // Don't validate unsupported actions
+ }
+
+ /**
+ * This method converts the BPEL activity into an equivalent
+ * behavioural description for conformance checking.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ public void convert(java.util.List<Activity> activities,
+ ConversionContext context) {
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Wait.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Wait.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Wait.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,148 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents the wait activity.
- *
- * @author gary
- */
-public class Wait extends BPELActivity {
-
- private static final String FOR = "for";
-
- private static final String UNTIL = "until";
-
- private static final long serialVersionUID = -3934422332929710337L;
-
- public static final String WAIT = "wait";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public Wait(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public Wait(BPELLanguageModel model) {
- super(model, WAIT);
- }
-
- /**
- * This method sets the 'until' condition.
- *
- * @param cond The 'until' condition
- */
- public void setUntil(Condition cond) {
- setChildElement(findChildElement(UNTIL),
- cond, null);
-
- org.w3c.dom.Element elem=findChildElement(FOR);
- if (elem != null) {
- getDOMElement().removeChild(elem);
- }
- }
-
- /**
- * This method returns the 'until' condition.
- *
- * @return The 'until' condition
- */
- public Condition getUntil() {
- Condition ret=null;
-
- org.w3c.dom.Element elem=findChildElement(UNTIL);
- if (elem != null) {
- ret = new Condition(getModel(), elem);
- }
-
- return(ret);
- }
-
- /**
- * This method sets the 'for' condition.
- *
- * @param cond The 'for' condition
- */
- public void setFor(Condition cond) {
- setChildElement(findChildElement(FOR),
- cond, null);
-
- org.w3c.dom.Element elem=findChildElement(UNTIL);
- if (elem != null) {
- getDOMElement().removeChild(elem);
- }
- }
-
- /**
- * This method returns the 'for' condition.
- *
- * @return The 'for' condition
- */
- public Condition getFor() {
- Condition ret=null;
-
- org.w3c.dom.Element elem=findChildElement(FOR);
- if (elem != null) {
- ret = new Condition(getModel(), elem);
- }
-
- return(ret);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(ModelListener l) {
- // Don't validate unsupported actions
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- getSource().setComponentURI(getURI());
- }
-
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Wait.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/Wait.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Wait.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/Wait.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,148 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents the wait activity.
+ *
+ * @author gary
+ */
+public class Wait extends BPELActivity {
+
+ private static final String FOR = "for";
+
+ private static final String UNTIL = "until";
+
+ private static final long serialVersionUID = -3934422332929710337L;
+
+ public static final String WAIT = "wait";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public Wait(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public Wait(BPELLanguageModel model) {
+ super(model, WAIT);
+ }
+
+ /**
+ * This method sets the 'until' condition.
+ *
+ * @param cond The 'until' condition
+ */
+ public void setUntil(Condition cond) {
+ setChildElement(findChildElement(UNTIL),
+ cond, null);
+
+ org.w3c.dom.Element elem=findChildElement(FOR);
+ if (elem != null) {
+ getDOMElement().removeChild(elem);
+ }
+ }
+
+ /**
+ * This method returns the 'until' condition.
+ *
+ * @return The 'until' condition
+ */
+ public Condition getUntil() {
+ Condition ret=null;
+
+ org.w3c.dom.Element elem=findChildElement(UNTIL);
+ if (elem != null) {
+ ret = new Condition(getModel(), elem);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method sets the 'for' condition.
+ *
+ * @param cond The 'for' condition
+ */
+ public void setFor(Condition cond) {
+ setChildElement(findChildElement(FOR),
+ cond, null);
+
+ org.w3c.dom.Element elem=findChildElement(UNTIL);
+ if (elem != null) {
+ getDOMElement().removeChild(elem);
+ }
+ }
+
+ /**
+ * This method returns the 'for' condition.
+ *
+ * @return The 'for' condition
+ */
+ public Condition getFor() {
+ Condition ret=null;
+
+ org.w3c.dom.Element elem=findChildElement(FOR);
+ if (elem != null) {
+ ret = new Condition(getModel(), elem);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(ModelListener l) {
+ // Don't validate unsupported actions
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ getSource().setComponentURI(getURI());
+ }
+
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/While.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/While.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/While.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,173 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.model.component;
-
-import org.savara.bpel.model.*;
-import org.scribble.protocol.model.*;
-import org.scribble.common.logging.Journal;
-
-/**
- * This class represents a while grouping activity.
- *
- * @author gary
- */
-public class While extends BPELGroupingConstruct {
-
- private static final long serialVersionUID = -4173984531470466407L;
-
- public static final String WHILE = "while";
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- * @param activity The XML configuration details for the activity
- */
- public While(BPELLanguageModel model,
- org.w3c.dom.Element activity) {
- super(model, activity);
-
- org.w3c.dom.Element cond=
- findChildElement(Condition.CONDITION);
-
- if (cond == null) {
- m_condition = new Condition(model);
- } else {
- m_condition = new Condition(model, cond);
- }
-
- m_activity = findChildActivity();
- }
-
- /**
- * The constructor for the activity.
- *
- * @param model The BPEL model
- */
- public While(BPELLanguageModel model) {
- super(model, WHILE);
- }
-
- /**
- * This method validates the BPEL activity and reports warnings or
- * errors to the supplied model listener.
- *
- * @param l The model listener
- */
- @Override
- public void validate(ModelListener l) {
- }
-
- /**
- * This method does the actual work of converting the specific
- * BPEL activity into an equivalent behavioural description for
- * conformance checking. The 'convert' method provides
- * a wrapper around this method, to handle the standard elements
- * that can be associated with any BPEL activity.
- *
- * @param activities The list of activities that will contain
- * the converted action(s)
- * @param context The conversion context
- */
- protected void convertActivity(java.util.List<Activity> activities,
- ConversionContext context) {
- getSource().setComponentURI(getURI());
-
- org.scribble.conversation.model.While elem=
- new org.scribble.conversation.model.While();
-
- // TODO: Convert while expression
-
- if (getActivity() != null) {
- getActivity().convert(elem.getBlock().getContents(), context);
- }
-
- activities.add(elem);
- }
-
- /**
- * This method sets the condition.
- *
- * @param cond The condition
- */
- public void setCondition(Condition cond) {
- m_condition = cond;
-
- org.w3c.dom.Element insertBefore=null;
-
- if (m_activity != null) {
- insertBefore = m_activity.getDOMElement();
- }
-
- setChildElement(findChildElement(Condition.CONDITION),
- cond, insertBefore);
- }
-
- /**
- * This method returns the condition.
- *
- * @return The condition
- */
- public Condition getCondition() {
- return(m_condition);
- }
-
- /**
- * This method sets the main 'if' activity.
- *
- * @param act The activity associated with the 'if'
- */
- public void setActivity(BPELElement act) {
- m_activity = act;
-
- BPELElement existing=findChildActivity();
- org.w3c.dom.Element existingElem=null;
-
- if (existing != null) {
- existingElem = existing.getDOMElement();
- }
-
- org.w3c.dom.Element insertBefore=null;
-
- setChildElement(existingElem, act,
- insertBefore);
- }
-
- /**
- * This method returns the activity associated with
- * the 'if' path.
- *
- * @return The 'if' activity
- */
- public BPELElement getActivity() {
- return(m_activity);
- }
-
- protected String getLocalURIPart(BPELElement elem) {
- String ret="";
-
- if (elem instanceof BPELActivity) {
- ret = "@activity";
- }
-
- return(ret);
- }
-
- private Condition m_condition=null;
- private BPELElement m_activity=null;
-}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/While.java (from rev 503, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/component/While.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/While.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/toprotocol/While.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,173 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.toprotocol;
+
+import org.savara.bpel.model2.*;
+import org.scribble.protocol.model.*;
+import org.scribble.common.logging.Journal;
+
+/**
+ * This class represents a while grouping activity.
+ *
+ * @author gary
+ */
+public class While extends BPELGroupingConstruct {
+
+ private static final long serialVersionUID = -4173984531470466407L;
+
+ public static final String WHILE = "while";
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ * @param activity The XML configuration details for the activity
+ */
+ public While(BPELLanguageModel model,
+ org.w3c.dom.Element activity) {
+ super(model, activity);
+
+ org.w3c.dom.Element cond=
+ findChildElement(Condition.CONDITION);
+
+ if (cond == null) {
+ m_condition = new Condition(model);
+ } else {
+ m_condition = new Condition(model, cond);
+ }
+
+ m_activity = findChildActivity();
+ }
+
+ /**
+ * The constructor for the activity.
+ *
+ * @param model The BPEL model
+ */
+ public While(BPELLanguageModel model) {
+ super(model, WHILE);
+ }
+
+ /**
+ * This method validates the BPEL activity and reports warnings or
+ * errors to the supplied model listener.
+ *
+ * @param l The model listener
+ */
+ @Override
+ public void validate(ModelListener l) {
+ }
+
+ /**
+ * This method does the actual work of converting the specific
+ * BPEL activity into an equivalent behavioural description for
+ * conformance checking. The 'convert' method provides
+ * a wrapper around this method, to handle the standard elements
+ * that can be associated with any BPEL activity.
+ *
+ * @param activities The list of activities that will contain
+ * the converted action(s)
+ * @param context The conversion context
+ */
+ protected void convertActivity(java.util.List<Activity> activities,
+ ConversionContext context) {
+ getSource().setComponentURI(getURI());
+
+ org.scribble.conversation.model.While elem=
+ new org.scribble.conversation.model.While();
+
+ // TODO: Convert while expression
+
+ if (getActivity() != null) {
+ getActivity().convert(elem.getBlock().getContents(), context);
+ }
+
+ activities.add(elem);
+ }
+
+ /**
+ * This method sets the condition.
+ *
+ * @param cond The condition
+ */
+ public void setCondition(Condition cond) {
+ m_condition = cond;
+
+ org.w3c.dom.Element insertBefore=null;
+
+ if (m_activity != null) {
+ insertBefore = m_activity.getDOMElement();
+ }
+
+ setChildElement(findChildElement(Condition.CONDITION),
+ cond, insertBefore);
+ }
+
+ /**
+ * This method returns the condition.
+ *
+ * @return The condition
+ */
+ public Condition getCondition() {
+ return(m_condition);
+ }
+
+ /**
+ * This method sets the main 'if' activity.
+ *
+ * @param act The activity associated with the 'if'
+ */
+ public void setActivity(BPELElement act) {
+ m_activity = act;
+
+ BPELElement existing=findChildActivity();
+ org.w3c.dom.Element existingElem=null;
+
+ if (existing != null) {
+ existingElem = existing.getDOMElement();
+ }
+
+ org.w3c.dom.Element insertBefore=null;
+
+ setChildElement(existingElem, act,
+ insertBefore);
+ }
+
+ /**
+ * This method returns the activity associated with
+ * the 'if' path.
+ *
+ * @return The 'if' activity
+ */
+ public BPELElement getActivity() {
+ return(m_activity);
+ }
+
+ protected String getLocalURIPart(BPELElement elem) {
+ String ret="";
+
+ if (elem instanceof BPELActivity) {
+ ret = "@activity";
+ }
+
+ return(ret);
+ }
+
+ private Condition m_condition=null;
+ private BPELElement m_activity=null;
+}
Added: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/BPELModelUtil.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/BPELModelUtil.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/BPELModelUtil.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,70 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.util;
+
+import java.io.IOException;
+
+import javax.xml.bind.JAXBContext;
+import javax.xml.bind.JAXBElement;
+import javax.xml.bind.Marshaller;
+import javax.xml.bind.Unmarshaller;
+
+import org.savara.bpel.model.*;
+
+public class BPELModelUtil {
+
+ public static TProcess deserialize(java.io.InputStream is) throws IOException {
+ TProcess ret=null;
+
+ try {
+ JAXBContext context = JAXBContext.newInstance("org.savara.bpel.model",
+ BPELModelUtil.class.getClassLoader());
+ Unmarshaller unmarshaller = context.createUnmarshaller();
+
+ //note: setting schema to null will turn validator off
+ //unmarshaller.setSchema(null);
+ Object xmlObject = unmarshaller.unmarshal(is);
+
+ if (xmlObject instanceof JAXBElement) {
+ ret = (TProcess)((JAXBElement<?>)xmlObject).getValue();
+ }
+
+ } catch(Exception e) {
+ throw new IOException("Failed to deserialize model", e);
+ }
+
+ return(ret);
+ }
+
+ public static void serialize(TProcess desc, java.io.OutputStream os) throws IOException {
+
+ try {
+ org.savara.bpel.model.ObjectFactory factory=
+ new org.savara.bpel.model.ObjectFactory();
+
+ JAXBContext context = JAXBContext.newInstance(TProcess.class);
+ Marshaller marshaller = context.createMarshaller();
+ marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
+
+ marshaller.marshal(factory.createProcess(desc), os);
+ } catch(Exception e) {
+ throw new IOException("Failed to serialize model", e);
+ }
+ }
+
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/InteractionUtil.java (from rev 502, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/util/InteractionUtil.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/InteractionUtil.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/InteractionUtil.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,202 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.util;
+
+import org.savara.bpel.change.InteractionPatterns;
+import org.savara.bpel.toprotocol.BPELActivity;
+import org.savara.bpel.toprotocol.Invoke;
+import org.savara.bpel.toprotocol.Sequence;
+import org.scribble.protocol.model.*;
+
+/**
+ * This class contains utility functions for dealing with Interactions.
+ */
+public class InteractionUtil {
+
+ /**
+ * This method returns the name associated with the interaction.
+ *
+ * @param interaction The interaction
+ * @return The name
+ */
+ public static String getName(Interaction interaction) {
+ String ret=null;
+
+ if (isSend(interaction)) {
+ ret = "Send";
+ } else {
+ ret = "Receive";
+ }
+
+ for (TypeReference ref : interaction.getMessageSignature().getTypeReferences()) {
+ ret += "_"+ref.getName();
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method determines whether the supplied interaction
+ * is a send.
+ *
+ * @param interaction The interaction
+ * @return Whether the interaction is a send
+ */
+ public static boolean isSend(Interaction interaction) {
+ boolean ret=false;
+ Role role=null;
+
+ if (interaction.enclosingProtocol() != null) {
+ role = interaction.enclosingProtocol().getRole();
+ }
+
+ if (role != null && ((interaction.getFromRole() != null &&
+ interaction.getFromRole().equals(
+ role)) ||
+ (interaction.getToRoles().contains(
+ role) == false))) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method determines whether the supplied interaction
+ * is a request.
+ *
+ * @param interaction The interaction
+ * @return Whether the interaction is a request
+ */
+ public static boolean isRequest(Interaction interaction) {
+ boolean ret=false;
+
+ if (InteractionPatterns.getRequestLabel(interaction) != null ||
+ InteractionPatterns.getReplyToLabel(interaction) == null) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method determines whether the supplied interaction
+ * is a request.
+ *
+ * @param interaction The interaction
+ * @return Whether the interaction is a request
+ */
+ public static boolean isRequest(When interaction) {
+ boolean ret=false;
+
+ if (InteractionPatterns.getRequestLabel(interaction) != null ||
+ InteractionPatterns.getReplyToLabel(interaction) == null) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method determines whether the supplied interaction
+ * is a response.
+ *
+ * @param interaction The interaction
+ * @return Whether the interaction is a response
+ */
+ public static boolean isResponse(Interaction interaction) {
+ boolean ret=false;
+
+ if (InteractionPatterns.getReplyToLabel(interaction) != null) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method determines whether the supplied interaction
+ * is a response.
+ *
+ * @param interaction The interaction
+ * @return Whether the interaction is a response
+ */
+ public static boolean isResponse(When interaction) {
+ boolean ret=false;
+
+ if (InteractionPatterns.getReplyToLabel(interaction) != null) {
+ ret = true;
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method determines whether this is the first interaction
+ * associated with the conversation.
+ *
+ * @param interaction The interaction
+ * @return Whether the interaction is the first in the conversation
+ */
+ /**
+ * This method determines whether the supplied activity
+ * is either an invoke, or a sequence that has an
+ * invoke as its first element.
+ *
+ * @param act The activity
+ * @return The invoke, or null if not found
+ */
+ public static Invoke getInvoke(BPELActivity act) {
+ Invoke ret=null;
+
+ if (act instanceof Invoke) {
+ ret = (Invoke)act;
+ } else if (act instanceof Sequence &&
+ ((Sequence)act).getActivities().size() > 0 &&
+ ((Sequence)act).getActivities().get(0) instanceof Invoke) {
+ ret = (Invoke)((Sequence)act).getActivities().get(0);
+ }
+
+ return(ret);
+ }
+
+ /**
+ * This method recursively counts the number of 'invoke' activities
+ * contained within a DOM element.
+ *
+ * @param elem The current element
+ * @return The number of invokes contained within the element
+ */
+ public static int countInvokes(org.w3c.dom.Element elem) {
+ int ret=0;
+
+ if (elem.getLocalName().equals("invoke")) {
+ ret = 1;
+ } else {
+ org.w3c.dom.NodeList nl=elem.getChildNodes();
+
+ for (int i=0; i < nl.getLength(); i++) {
+ if (nl.item(i) instanceof org.w3c.dom.Element) {
+ ret += countInvokes((org.w3c.dom.Element)nl.item(i));
+ }
+ }
+ }
+
+ return(ret);
+ }
+}
Added: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/PartnerLinkUtil.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/PartnerLinkUtil.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/PartnerLinkUtil.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.util;
+
+import org.savara.bpel.model.*;
+
+public class PartnerLinkUtil {
+
+ public static TPartnerLink getPartnerLink(TProcess process, String name) {
+ TPartnerLink ret=null;
+
+ java.util.List<TPartnerLink> pls=process.getPartnerLinks().getPartnerLink();
+ for (int i=0; ret == null && i < pls.size(); i++) {
+ if (pls.get(i).getName().equals(name)) {
+ ret = pls.get(i);
+ }
+ }
+
+ return(ret);
+ }
+}
Copied: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/TypeReferenceUtil.java (from rev 502, branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/model/util/TypeReferenceUtil.java)
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/TypeReferenceUtil.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/TypeReferenceUtil.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.util;
+
+import javax.xml.namespace.QName;
+
+import org.savara.bpel.toprotocol.ConversionContext;
+import org.scribble.protocol.model.TypeReference;
+
+public class TypeReferenceUtil {
+
+ public static TypeReference createTypeReference(String type, ConversionContext context) {
+ TypeReference ret=new TypeReference();
+ //ret.derivedFrom(this);
+
+ // TODO: Need to set the namespace on the TypeReference
+ if (type != null) {
+ int index=-1;
+
+ if (type.charAt(0) == '{') {
+ // Assume a qname
+ QName qname=QName.valueOf(type);
+
+ ret.setName(qname.getLocalPart());
+ //ret.setLocalpart(qname.getLocalPart());
+ //ret.setNamespace(qname.getNamespaceURI());
+
+ } else if ((index=type.indexOf(':')) == -1) {
+ ret.setName(type);
+ //ret.setLocalpart(type);
+
+ } else {
+ ret.setName(type.substring(index+1));
+ //ret.setLocalpart(type.substring(index+1));
+
+ /*
+ String prefix=type.substring(0, index);
+ String ns=context.getNamespace(prefix);
+
+ if (ns != null) {
+ ret.setNamespace(ns);
+ } else {
+ // TODO: Log error
+ }
+ */
+ }
+ }
+
+ return(ret);
+ }
+
+}
Added: branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/VariableUtil.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/VariableUtil.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/main/java/org/savara/bpel/util/VariableUtil.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,36 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.util;
+
+import org.savara.bpel.model.*;
+
+public class VariableUtil {
+
+ public static TVariable getVariable(TProcess process, String varName) {
+ TVariable ret=null;
+
+ java.util.List<TVariable> vars=process.getVariables().getVariable();
+ for (int i=0; ret == null && i < vars.size(); i++) {
+ if (vars.get(i).getName().equals(varName)) {
+ ret = vars.get(i);
+ }
+ }
+
+ return(ret);
+ }
+}
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/BPELElementTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/BPELElementTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/BPELElementTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,13 +17,13 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.BPELElement;
-import org.savara.bpel.model.component.Condition;
-import org.savara.bpel.model.component.Else;
-import org.savara.bpel.model.component.If;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.BPELElement;
+import org.savara.bpel.toprotocol.Condition;
+import org.savara.bpel.toprotocol.Else;
+import org.savara.bpel.toprotocol.If;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CatchAllTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CatchAllTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CatchAllTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,11 +17,11 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.CatchAll;
-import org.savara.bpel.model.component.Else;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.CatchAll;
+import org.savara.bpel.toprotocol.Else;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CatchTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CatchTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CatchTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,10 +17,10 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Catch;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Catch;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CompensationHandlerTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CompensationHandlerTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/CompensationHandlerTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,10 +17,10 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.CompensationHandler;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.CompensationHandler;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ConditionTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ConditionTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ConditionTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,9 +17,9 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Condition;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Condition;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ElseIfTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ElseIfTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ElseIfTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,10 +17,10 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Elseif;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Elseif;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ElseTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ElseTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ElseTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,10 +17,10 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Else;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Else;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/EventHandlersTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/EventHandlersTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/EventHandlersTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,15 +17,15 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.BPELActivity;
-import org.savara.bpel.model.component.EventHandlers;
-import org.savara.bpel.model.component.OnAlarm;
-import org.savara.bpel.model.component.OnEvent;
-import org.savara.bpel.model.component.Receive;
-import org.savara.bpel.model.component.Scope;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.BPELActivity;
+import org.savara.bpel.toprotocol.EventHandlers;
+import org.savara.bpel.toprotocol.OnAlarm;
+import org.savara.bpel.toprotocol.OnEvent;
+import org.savara.bpel.toprotocol.Receive;
+import org.savara.bpel.toprotocol.Scope;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
@@ -261,8 +261,8 @@
fail("Failed to convert to doc");
}
- org.savara.bpel.model.component.Process component=
- new org.savara.bpel.model.component.Process(model, elem);
+ org.savara.bpel.toprotocol.Process component=
+ new org.savara.bpel.toprotocol.Process(model, elem);
BPELActivity topact=component.getActivity();
@@ -356,8 +356,8 @@
fail("Failed to convert to doc");
}
- org.savara.bpel.model.component.Process component=
- new org.savara.bpel.model.component.Process(model, elem);
+ org.savara.bpel.toprotocol.Process component=
+ new org.savara.bpel.toprotocol.Process(model, elem);
BPELActivity topact=component.getActivity();
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ExitTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ExitTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ExitTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,8 +17,8 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Exit;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Exit;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/FaultHandlersTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/FaultHandlersTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/FaultHandlersTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,14 +17,14 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.BPELActivity;
-import org.savara.bpel.model.component.Catch;
-import org.savara.bpel.model.component.CatchAll;
-import org.savara.bpel.model.component.FaultHandlers;
-import org.savara.bpel.model.component.Receive;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.BPELActivity;
+import org.savara.bpel.toprotocol.Catch;
+import org.savara.bpel.toprotocol.CatchAll;
+import org.savara.bpel.toprotocol.FaultHandlers;
+import org.savara.bpel.toprotocol.Receive;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
@@ -269,8 +269,8 @@
fail("Failed to convert to doc");
}
- org.savara.bpel.model.component.Process component=
- new org.savara.bpel.model.component.Process(model, elem);
+ org.savara.bpel.toprotocol.Process component=
+ new org.savara.bpel.toprotocol.Process(model, elem);
FaultHandlers fhs=component.getFaultHandlers();
@@ -349,8 +349,8 @@
fail("Failed to convert to doc");
}
- org.savara.bpel.model.component.Process component=
- new org.savara.bpel.model.component.Process(model, elem);
+ org.savara.bpel.toprotocol.Process component=
+ new org.savara.bpel.toprotocol.Process(model, elem);
FaultHandlers fhs=component.getFaultHandlers();
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/FlowTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/FlowTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/FlowTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,11 +17,11 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Flow;
-import org.savara.bpel.model.component.Link;
-import org.savara.bpel.model.component.While;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Flow;
+import org.savara.bpel.toprotocol.Link;
+import org.savara.bpel.toprotocol.While;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ForEachTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ForEachTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ForEachTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,14 +17,14 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.BPELActivity;
-import org.savara.bpel.model.component.ForEach;
-import org.savara.bpel.model.component.Process;
-import org.savara.bpel.model.component.Receive;
-import org.savara.bpel.model.component.Scope;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.BPELActivity;
+import org.savara.bpel.toprotocol.ForEach;
+import org.savara.bpel.toprotocol.Process;
+import org.savara.bpel.toprotocol.Receive;
+import org.savara.bpel.toprotocol.Scope;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/IfTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/IfTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/IfTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,18 +17,18 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.BPELActivity;
-import org.savara.bpel.model.component.Condition;
-import org.savara.bpel.model.component.Else;
-import org.savara.bpel.model.component.Elseif;
-import org.savara.bpel.model.component.If;
-import org.savara.bpel.model.component.Process;
-import org.savara.bpel.model.component.Receive;
-import org.savara.bpel.model.component.Reply;
-import org.savara.bpel.model.component.Sequence;
-import org.savara.bpel.model.component.Throw;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.BPELActivity;
+import org.savara.bpel.toprotocol.Condition;
+import org.savara.bpel.toprotocol.Else;
+import org.savara.bpel.toprotocol.Elseif;
+import org.savara.bpel.toprotocol.If;
+import org.savara.bpel.toprotocol.Process;
+import org.savara.bpel.toprotocol.Receive;
+import org.savara.bpel.toprotocol.Reply;
+import org.savara.bpel.toprotocol.Sequence;
+import org.savara.bpel.toprotocol.Throw;
import junit.framework.TestCase;
@@ -927,8 +927,8 @@
fail("Failed to convert to doc");
}
- org.savara.bpel.model.component.Process component=
- new org.savara.bpel.model.component.Process(model, elem);
+ org.savara.bpel.toprotocol.Process component=
+ new org.savara.bpel.toprotocol.Process(model, elem);
BPELActivity topact=component.getActivity();
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/InvokeTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/InvokeTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/InvokeTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,9 +17,9 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Invoke;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Invoke;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnAlarmTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnAlarmTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnAlarmTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,13 +17,13 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.For;
-import org.savara.bpel.model.component.OnAlarm;
-import org.savara.bpel.model.component.Scope;
-import org.savara.bpel.model.component.Sequence;
-import org.savara.bpel.model.component.Until;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.For;
+import org.savara.bpel.toprotocol.OnAlarm;
+import org.savara.bpel.toprotocol.Scope;
+import org.savara.bpel.toprotocol.Sequence;
+import org.savara.bpel.toprotocol.Until;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnEventTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnEventTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnEventTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,9 +17,9 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.OnEvent;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.OnEvent;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnMessageTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnMessageTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/OnMessageTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,10 +17,10 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.OnMessage;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.OnMessage;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/PartnerLinkTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/PartnerLinkTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/PartnerLinkTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,9 +17,9 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.PartnerLink;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.PartnerLink;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/PickTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/PickTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/PickTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,16 +17,16 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.BPELActivity;
-import org.savara.bpel.model.component.OnAlarm;
-import org.savara.bpel.model.component.OnMessage;
-import org.savara.bpel.model.component.Pick;
-import org.savara.bpel.model.component.Process;
-import org.savara.bpel.model.component.Receive;
-import org.savara.bpel.model.component.Scope;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.BPELActivity;
+import org.savara.bpel.toprotocol.OnAlarm;
+import org.savara.bpel.toprotocol.OnMessage;
+import org.savara.bpel.toprotocol.Pick;
+import org.savara.bpel.toprotocol.Process;
+import org.savara.bpel.toprotocol.Receive;
+import org.savara.bpel.toprotocol.Scope;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
@@ -360,8 +360,8 @@
fail("Failed to convert to doc");
}
- org.savara.bpel.model.component.Process component=
- new org.savara.bpel.model.component.Process(model, elem);
+ org.savara.bpel.toprotocol.Process component=
+ new org.savara.bpel.toprotocol.Process(model, elem);
BPELActivity topact=component.getActivity();
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ProcessTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ProcessTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ProcessTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,14 +17,14 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.EventHandlers;
-import org.savara.bpel.model.component.FaultHandlers;
-import org.savara.bpel.model.component.PartnerLink;
-import org.savara.bpel.model.component.Process;
-import org.savara.bpel.model.component.Sequence;
-import org.savara.bpel.model.component.Variable;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.EventHandlers;
+import org.savara.bpel.toprotocol.FaultHandlers;
+import org.savara.bpel.toprotocol.PartnerLink;
+import org.savara.bpel.toprotocol.Process;
+import org.savara.bpel.toprotocol.Sequence;
+import org.savara.bpel.toprotocol.Variable;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ReceiveTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ReceiveTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ReceiveTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,9 +17,9 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Receive;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Receive;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/RepeatUntilTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/RepeatUntilTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/RepeatUntilTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,15 +17,15 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.BPELActivity;
-import org.savara.bpel.model.component.Condition;
-import org.savara.bpel.model.component.If;
-import org.savara.bpel.model.component.Process;
-import org.savara.bpel.model.component.Receive;
-import org.savara.bpel.model.component.RepeatUntil;
-import org.savara.bpel.model.component.Sequence;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.BPELActivity;
+import org.savara.bpel.toprotocol.Condition;
+import org.savara.bpel.toprotocol.If;
+import org.savara.bpel.toprotocol.Process;
+import org.savara.bpel.toprotocol.Receive;
+import org.savara.bpel.toprotocol.RepeatUntil;
+import org.savara.bpel.toprotocol.Sequence;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ReplyTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ReplyTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ReplyTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,9 +17,9 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Reply;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Reply;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/RethrowTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/RethrowTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/RethrowTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,8 +17,8 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Rethrow;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Rethrow;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ScopeTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ScopeTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ScopeTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,16 +17,16 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.CompensationHandler;
-import org.savara.bpel.model.component.EventHandlers;
-import org.savara.bpel.model.component.FaultHandlers;
-import org.savara.bpel.model.component.PartnerLink;
-import org.savara.bpel.model.component.Scope;
-import org.savara.bpel.model.component.Sequence;
-import org.savara.bpel.model.component.TerminationHandler;
-import org.savara.bpel.model.component.Variable;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.CompensationHandler;
+import org.savara.bpel.toprotocol.EventHandlers;
+import org.savara.bpel.toprotocol.FaultHandlers;
+import org.savara.bpel.toprotocol.PartnerLink;
+import org.savara.bpel.toprotocol.Scope;
+import org.savara.bpel.toprotocol.Sequence;
+import org.savara.bpel.toprotocol.TerminationHandler;
+import org.savara.bpel.toprotocol.Variable;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/SequenceTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/SequenceTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/SequenceTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,14 +17,14 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.BPELActivity;
-import org.savara.bpel.model.component.Invoke;
-import org.savara.bpel.model.component.Process;
-import org.savara.bpel.model.component.Receive;
-import org.savara.bpel.model.component.Sequence;
-import org.savara.bpel.model.component.While;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.BPELActivity;
+import org.savara.bpel.toprotocol.Invoke;
+import org.savara.bpel.toprotocol.Process;
+import org.savara.bpel.toprotocol.Receive;
+import org.savara.bpel.toprotocol.Sequence;
+import org.savara.bpel.toprotocol.While;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TerminationHandlerTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TerminationHandlerTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TerminationHandlerTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,10 +17,10 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Sequence;
-import org.savara.bpel.model.component.TerminationHandler;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Sequence;
+import org.savara.bpel.toprotocol.TerminationHandler;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestAbstractInteraction.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestAbstractInteraction.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestAbstractInteraction.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -19,9 +19,9 @@
import java.util.List;
-import org.savara.bpel.model.component.AbstractInteraction;
-import org.savara.bpel.model.component.ConversionContext;
import org.savara.bpel.model2.BPELLanguageModel;
+import org.savara.bpel.toprotocol.AbstractInteraction;
+import org.savara.bpel.toprotocol.ConversionContext;
import org.scribble.protocol.model.Activity;
import org.w3c.dom.Element;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestBPELActivity.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestBPELActivity.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestBPELActivity.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -19,9 +19,9 @@
import java.util.List;
-import org.savara.bpel.model.component.BPELActivity;
-import org.savara.bpel.model.component.ConversionContext;
import org.savara.bpel.model2.BPELLanguageModel;
+import org.savara.bpel.toprotocol.BPELActivity;
+import org.savara.bpel.toprotocol.ConversionContext;
import org.scribble.protocol.model.Activity;
import org.w3c.dom.Element;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestBPELElement.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestBPELElement.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/TestBPELElement.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -19,9 +19,9 @@
import java.util.List;
-import org.savara.bpel.model.component.BPELElement;
-import org.savara.bpel.model.component.ConversionContext;
import org.savara.bpel.model2.BPELLanguageModel;
+import org.savara.bpel.toprotocol.BPELElement;
+import org.savara.bpel.toprotocol.ConversionContext;
import org.scribble.protocol.model.Activity;
import org.w3c.dom.Element;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ThrowTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ThrowTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/ThrowTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,9 +17,9 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Throw;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Throw;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/VariableTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/VariableTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/VariableTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,9 +17,9 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Variable;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Variable;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/WaitTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/WaitTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/WaitTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,10 +17,10 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.Condition;
-import org.savara.bpel.model.component.Wait;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.Condition;
+import org.savara.bpel.toprotocol.Wait;
import junit.framework.TestCase;
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/WhileTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/WhileTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/component/WhileTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,14 +17,14 @@
*/
package org.savara.bpel.model.component;
-import org.savara.bpel.model.component.BPELActivity;
-import org.savara.bpel.model.component.Condition;
-import org.savara.bpel.model.component.If;
-import org.savara.bpel.model.component.Receive;
-import org.savara.bpel.model.component.Sequence;
-import org.savara.bpel.model.component.While;
import org.savara.bpel.model2.BPELLanguageModel;
import org.savara.bpel.model2.DefaultBPELLanguageModel;
+import org.savara.bpel.toprotocol.BPELActivity;
+import org.savara.bpel.toprotocol.Condition;
+import org.savara.bpel.toprotocol.If;
+import org.savara.bpel.toprotocol.Receive;
+import org.savara.bpel.toprotocol.Sequence;
+import org.savara.bpel.toprotocol.While;
import junit.framework.TestCase;
@@ -434,8 +434,8 @@
fail("Failed to convert to doc");
}
- org.savara.bpel.model.component.Process component=
- new org.savara.bpel.model.component.Process(model, elem);
+ org.savara.bpel.toprotocol.Process component=
+ new org.savara.bpel.toprotocol.Process(model, elem);
BPELActivity topact=component.getActivity();
Modified: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/util/InteractionUtilTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/util/InteractionUtilTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/model/util/InteractionUtilTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -19,6 +19,7 @@
import junit.framework.TestCase;
+import org.savara.bpel.util.InteractionUtil;
import org.scribble.conversation.model.*;
import org.scribble.protocol.model.*;
Added: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/util/BPELModelUtilTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/util/BPELModelUtilTest.java (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/util/BPELModelUtilTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
+ * by the @authors tag. All rights reserved.
+ * See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License, v. 2.1.
+ * This program is distributed in the hope that it will be useful, but WITHOUT A
+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public License,
+ * v.2.1 along with this distribution; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+ * MA 02110-1301, USA.
+ */
+package org.savara.bpel.util;
+
+import junit.framework.TestCase;
+
+import org.savara.bpel.model.TProcess;
+
+public class BPELModelUtilTest extends TestCase {
+
+ public void testGetBPELModel() {
+ String filename="bpel/PolicyQuoteProcess_PolicyQuoteProcessService.bpel";
+
+ java.io.InputStream is=
+ ClassLoader.getSystemResourceAsStream(filename);
+
+ if (is == null) {
+ fail("Failed to load BPEL model file '"+filename+"'");
+ }
+
+ try {
+ TProcess process=BPELModelUtil.deserialize(is);
+
+ if (process == null) {
+ fail("Failed to retrieve BPEL process");
+ }
+ } catch(Exception e) {
+ fail("Failed to deserialise BPEL process: "+e);
+ }
+ }
+}
Deleted: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/util/XMLUtilsTest.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/util/XMLUtilsTest.java 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/java/org/savara/bpel/util/XMLUtilsTest.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -1,172 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated
- * by the @authors tag. All rights reserved.
- * See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- * This copyrighted material is made available to anyone wishing to use,
- * modify, copy, or redistribute it subject to the terms and conditions
- * of the GNU Lesser General Public License, v. 2.1.
- * This program is distributed in the hope that it will be useful, but WITHOUT A
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
- * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License,
- * v.2.1 along with this distribution; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
- * MA 02110-1301, USA.
- */
-package org.savara.bpel.util;
-
-import org.savara.util.XMLUtils;
-import org.scribble.model.ModelObject;
-
-import junit.framework.TestCase;
-
-public class XMLUtilsTest extends TestCase {
-
- public void testNamespace() {
- String namespace="http://namespace";
- String elemName="testElement";
-
- String expected="<"+elemName+" xmlns=\""+namespace+"\"/>\r\n";
-
- try {
- javax.xml.parsers.DocumentBuilderFactory factory=
- javax.xml.parsers.DocumentBuilderFactory.
- newInstance();
- factory.setNamespaceAware(true);
-
- org.w3c.dom.Document doc=
- factory.newDocumentBuilder().newDocument();
-
- org.w3c.dom.Element elem=
- doc.createElementNS(namespace, elemName);
-
- String str=XMLUtils.toText(elem);
-
- if (str.equals(expected) == false) {
- fail("Expected result '"+expected+"', got: '"+str+"'");
- }
-
- } catch(Exception e) {
- fail("Failed: "+e);
- }
- }
-
- public void testSetStartAndEndPosition() {
- String xml="<root><myelem></myelem><myelem></myelem></root>";
-
- try {
- org.w3c.dom.Element node=(org.w3c.dom.Element)XMLUtils.getNode(xml);
-
- org.w3c.dom.NodeList nl=node.getElementsByTagName("myelem");
-
- if (nl.getLength() != 2) {
- fail("Should be two elements: "+nl.getLength());
- }
-
- ModelObject obj=new ModelObject(){};
-
- XMLUtils.setStartAndEndPosition(obj, xml, (org.w3c.dom.Element)nl.item(1));
-
- if (obj.getSource().getStartPosition() != 23) {
- fail("Start position should be 23: "+obj.getSource().getStartPosition());
- }
-
- if (obj.getSource().getEndPosition() != 39) {
- fail("End position should be 39: "+obj.getSource().getEndPosition());
- }
-
- } catch(Exception e) {
- fail("Failed: "+e);
- }
- }
-
- public void testSetStartAndEndPositionWithNS() {
- String xml="<bpel:root xmlns:bpel=\"myns\" ><bpel:myelem></bpel:myelem><bpel:myelem></bpel:myelem></bpel:root>";
-
- try {
- org.w3c.dom.Element node=(org.w3c.dom.Element)XMLUtils.getNode(xml);
-
- org.w3c.dom.NodeList nl=node.getElementsByTagNameNS("myns", "myelem");
-
- if (nl.getLength() != 2) {
- fail("Should be two elements: "+nl.getLength());
- }
-
- ModelObject obj=new ModelObject(){};
-
- XMLUtils.setStartAndEndPosition(obj, xml, (org.w3c.dom.Element)nl.item(1));
-
- if (obj.getSource().getStartPosition() != 57) {
- fail("Start position should be 57: "+obj.getSource().getStartPosition());
- }
-
- if (obj.getSource().getEndPosition() != 83) {
- fail("End position should be 83: "+obj.getSource().getEndPosition());
- }
-
- } catch(Exception e) {
- fail("Failed: "+e);
- }
- }
-
- public void testSetStartAndEndPositionSingleNodeWithNS() {
- String xml="<bpel:root xmlns:bpel=\"myns\" ><bpel:myelem attr=\"1\" /><bpel:myelem attr=\"2\" /></bpel:root>";
-
- try {
- org.w3c.dom.Element node=(org.w3c.dom.Element)XMLUtils.getNode(xml);
-
- org.w3c.dom.NodeList nl=node.getElementsByTagNameNS("myns", "myelem");
-
- if (nl.getLength() != 2) {
- fail("Should be two elements: "+nl.getLength());
- }
-
- ModelObject obj=new ModelObject(){};
-
- XMLUtils.setStartAndEndPosition(obj, xml, (org.w3c.dom.Element)nl.item(1));
-
- if (obj.getSource().getStartPosition() != 54) {
- fail("Start position should be 54: "+obj.getSource().getStartPosition());
- }
-
- if (obj.getSource().getEndPosition() != 77) {
- fail("End position should be 77: "+obj.getSource().getEndPosition());
- }
-
- } catch(Exception e) {
- fail("Failed: "+e);
- }
- }
-
- public void testSetStartAndEndPositionWithChildAndNS() {
- String xml="<bpel:root xmlns:bpel=\"myns\" ><bpel:myelem></bpel:myelem>" +
- "<bpel:myelem><bpel:myelem></bpel:myelem></bpel:myelem></bpel:root>";
-
- try {
- org.w3c.dom.Element node=(org.w3c.dom.Element)XMLUtils.getNode(xml);
-
- org.w3c.dom.NodeList nl=node.getElementsByTagNameNS("myns", "myelem");
-
- if (nl.getLength() != 3) {
- fail("Should be three elements: "+nl.getLength());
- }
-
- ModelObject obj=new ModelObject(){};
-
- XMLUtils.setStartAndEndPosition(obj, xml, (org.w3c.dom.Element)nl.item(1));
-
- if (obj.getSource().getStartPosition() != 57) {
- fail("Start position should be 57: "+obj.getSource().getStartPosition());
- }
-
- if (obj.getSource().getEndPosition() != 110) {
- fail("End position should be 110: "+obj.getSource().getEndPosition());
- }
-
- } catch(Exception e) {
- fail("Failed: "+e);
- }
- }
-}
Added: branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/resources/bpel/PolicyQuoteProcess_PolicyQuoteProcessService.bpel
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/resources/bpel/PolicyQuoteProcess_PolicyQuoteProcessService.bpel (rev 0)
+++ branches/experimental/2.0.x/bundles/org.savara.bpel/src/test/resources/bpel/PolicyQuoteProcess_PolicyQuoteProcessService.bpel 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,43 @@
+<process xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable" xmlns:ca="http://creditagency.com/creditCheckService" xmlns:cred="http://creditagency.com/creditCheck" xmlns:dmv="http://dmv.com/drivingRecordService" xmlns:drv="http://dmv.com/drivingRecord" xmlns:pcs="http://www.example.org/policyQuoteCalculationService" xmlns:pes="http://www.example.org/policyQuoteEntityService" xmlns:pol="http://www.example.org/policyQuote" xmlns:pps="http://www.example.org/policyQuoteProcessService" xmlns:tns="http://www.pi4soa.org/PolicyQuote" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="http://www.scribble.org/conversation" ns0:conversationType="org.pi4soa.policyquote.policyquote.PolicyQuoteProcess at PolicyQuoteProcessService" name="PolicyQuoteProcess_PolicyQuoteProcessService" targetNamespace="http://www.example.org/policyQuoteProcessService" xmlns="http://docs.oasis-open.org/wsbpel/2.0/process/executable">
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PolicyQuoteProcess_PolicyQuoteProcessService.wsdl" namespace="http://www.example.org/policyQuoteProcessService"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PolicyQuoteProcess_CreditCheckService.wsdl" namespace="http://creditagency.com/creditCheckService"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PolicyQuoteProcess_DrivingRecordService.wsdl" namespace="http://dmv.com/drivingRecordService"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PolicyQuoteProcess_PolicyQuoteCalculationService.wsdl" namespace="http://www.example.org/policyQuoteCalculationService"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PolicyQuoteProcess_PolicyQuoteEntityService.wsdl" namespace="http://www.example.org/policyQuoteEntityService"/>
+ <import importType="http://schemas.xmlsoap.org/wsdl/" location="PolicyQuoteProcess_PolicyQuoteProcessServiceArtifacts.wsdl" namespace="http://www.example.org/policyQuoteProcessService"/>
+ <partnerLinks>
+ <partnerLink myRole="PolicyQuoteProcessService" name="DriverToPolicyQuoteProcessService" partnerLinkType="pps:DriverToPolicyQuoteProcessServiceServiceLT"/>
+ <partnerLink name="PolicyQuoteProcessServiceToDrivingRecordService" partnerLinkType="pps:PolicyQuoteProcessServiceToDrivingRecordServiceLT" partnerRole="DrivingRecordServiceRequester"/>
+ <partnerLink myRole="DrivingRecordCallbackService" name="DrivingRecordServiceToPolicyQuoteProcessService" partnerLinkType="pps:DrivingRecordServiceToPolicyQuoteProcessServiceServiceLT"/>
+ <partnerLink name="PolicyQuoteProcessServiceToCreditCheckService" partnerLinkType="pps:PolicyQuoteProcessServiceToCreditCheckServiceLT" partnerRole="CreditCheckServiceRequester"/>
+ <partnerLink name="PolicyQuoteProcessServiceToPolicyQuoteCalculationService" partnerLinkType="pps:PolicyQuoteProcessServiceToPolicyQuoteCalculationServiceLT" partnerRole="PolicyQuoteCalculationServiceRequester"/>
+ <partnerLink name="PolicyQuoteProcessServiceToPolicyQuoteEntityService" partnerLinkType="pps:PolicyQuoteProcessServiceToPolicyQuoteEntityServiceLT" partnerRole="PolicyQuoteEntityServiceRequester"/>
+ </partnerLinks>
+ <variables>
+ <variable messageType="pps:receivePolicyQuoteRequest" name="policyQuoteVar"/>
+ <variable messageType="dmv:checkDrivingRecordRequest" name="drivingRecordRequestVar"/>
+ <variable messageType="pps:receiveDrivingRecordRequest" name="drivingRecordResponseVar"/>
+ <variable messageType="ca:checkCreditRequest" name="creditCheckRequestVar"/>
+ <variable messageType="ca:checkCreditResponse" name="creditCheckResponseVar"/>
+ <variable messageType="pcs:calculatePolicyQuoteResponse" name="policyQuoteReplyVar"/>
+ <variable messageType="pps:policyQuoteFaultFault" name="policyQuoteFaultVar"/>
+ </variables>
+ <sequence>
+ <receive createInstance="yes" name="Receive_policyQuote" operation="receivePolicyQuote" partnerLink="DriverToPolicyQuoteProcessService" portType="pps:PolicyQuoteProcessService" variable="policyQuoteVar"/>
+ <invoke inputVariable="drivingRecordRequestVar" name="Send_drivingRecordRequest" operation="checkDrivingRecord" partnerLink="PolicyQuoteProcessServiceToDrivingRecordService" portType="dmv:DrivingRecordService"/>
+ <receive name="Receive_drivingRecordResponse" operation="receiveDrivingRecord" partnerLink="DrivingRecordServiceToPolicyQuoteProcessService" portType="pps:DrivingRecordCallbackService" variable="drivingRecordResponseVar"/>
+ <if>
+ <sequence>
+ <invoke inputVariable="creditCheckRequestVar" name="Send_creditCheckRequest" operation="checkCredit" outputVariable="creditCheckResponseVar" partnerLink="PolicyQuoteProcessServiceToCreditCheckService" portType="ca:CreditCheckService"/>
+ <invoke inputVariable="policyQuoteVar" name="Send_policyQuote" operation="calculatePolicyQuote" outputVariable="policyQuoteReplyVar" partnerLink="PolicyQuoteProcessServiceToPolicyQuoteCalculationService" portType="pcs:PolicyQuoteCalculationService"/>
+ <invoke inputVariable="policyQuoteVar" name="Send_policyQuote" operation="createPolicyQuote" outputVariable="policyQuoteReplyVar" partnerLink="PolicyQuoteProcessServiceToPolicyQuoteEntityService" portType="pes:PolicyQuoteEntityService"/>
+ <reply name="Send_policyQuoteReply" operation="receivePolicyQuote" partnerLink="DriverToPolicyQuoteProcessService" portType="pps:PolicyQuoteProcessService" variable="policyQuoteReplyVar"/>
+ </sequence>
+ <else>
+ <sequence>
+ <reply faultName="pps:policyQuoteFault" name="Send_policyQuoteFault" operation="receivePolicyQuote" partnerLink="DriverToPolicyQuoteProcessService" portType="pps:PolicyQuoteProcessService" variable="policyQuoteFaultVar"/>
+ </sequence>
+ </else>
+ </if>
+ </sequence>
+</process>
Property changes on: branches/experimental/2.0.x/bundles/org.savara.contract.model
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
Modified: branches/experimental/2.0.x/bundles/org.savara.contract.model/.classpath
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.contract.model/.classpath 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.contract.model/.classpath 2010-12-16 14:37:55 UTC (rev 504)
@@ -3,7 +3,7 @@
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.apache.felix.framework/3.0.1/org.apache.felix.framework-3.0.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.osgi.core/1.4.0/org.osgi.core-1.4.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0.20101208-M2/org.scribble.common-2.0.0.20101208-M2.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0.20101208-M2/org.scribble.common-2.0.0.20101208-M2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0.20101208-M2/org.scribble.protocol-2.0.0.20101208-M2.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0.20101208-M2/org.scribble.protocol-2.0.0.20101208-M2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
</classpath>
\ No newline at end of file
Property changes on: branches/experimental/2.0.x/bundles/org.savara.core
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
Modified: branches/experimental/2.0.x/bundles/org.savara.core/.classpath
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/.classpath 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.core/.classpath 2010-12-16 14:37:55 UTC (rev 504)
@@ -3,7 +3,7 @@
<classpathentry kind="output" path="target/classes"/>
<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.apache.felix.framework/3.0.1/org.apache.felix.framework-3.0.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.osgi.core/1.4.0/org.osgi.core-1.4.0.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0.20101208-M2/org.scribble.common-2.0.0.20101208-M2.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0.20101208-M2/org.scribble.common-2.0.0.20101208-M2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0.20101208-M2/org.scribble.protocol-2.0.0.20101208-M2.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0.20101208-M2/org.scribble.protocol-2.0.0.20101208-M2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
</classpath>
\ No newline at end of file
Modified: branches/experimental/2.0.x/bundles/org.savara.core/META-INF/MANIFEST.MF
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/META-INF/MANIFEST.MF 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.core/META-INF/MANIFEST.MF 2010-12-16 14:37:55 UTC (rev 504)
@@ -9,5 +9,5 @@
Import-Package: org.osgi.framework;version="1.3.0",
org.scribble.protocol.model
Require-Bundle: org.scribble.common
-Export-Package: org.savara.protocol.change,
+Export-Package: org.savara.change,
org.savara.util
Copied: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change (from rev 502, branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/protocol/change)
Modified: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/AbstractModelChangeRule.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/protocol/change/AbstractModelChangeRule.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/AbstractModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,7 +17,7 @@
* Change History:
* 28 Jul 2008 : Initial version created by gary
*/
-package org.savara.protocol.change;
+package org.savara.change;
import org.scribble.protocol.model.*;
@@ -35,7 +35,7 @@
* @return Whether the rule supports the supplied information
*/
public boolean isInsertSupported(ModelChangeContext context,
- ProtocolModel model, ModelObject mobj, ModelObject ref) {
+ ProtocolModel model, ModelObject mobj, ModelObject ref) {
return(false);
}
Modified: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/DefaultModelChangeContext.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/protocol/change/DefaultModelChangeContext.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/DefaultModelChangeContext.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,7 +17,7 @@
* Change History:
* 24 Jul 2008 : Initial version created by gary
*/
-package org.savara.protocol.change;
+package org.savara.change;
import org.scribble.protocol.model.*;
Modified: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/DefaultModelGenerator.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/protocol/change/DefaultModelGenerator.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/DefaultModelGenerator.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,7 +17,7 @@
* Change History:
* 24 Jul 2008 : Initial version created by gary
*/
-package org.savara.protocol.change;
+package org.savara.change;
import org.scribble.protocol.model.*;
Modified: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/ModelChangeContext.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/protocol/change/ModelChangeContext.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/ModelChangeContext.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,7 +17,7 @@
* Change History:
* 24 Jul 2008 : Initial version created by gary
*/
-package org.savara.protocol.change;
+package org.savara.change;
import org.scribble.protocol.model.*;
Modified: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/ModelChangeRule.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/protocol/change/ModelChangeRule.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/ModelChangeRule.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,7 +17,7 @@
* Change History:
* 23 Jul 2008 : Initial version created by gary
*/
-package org.savara.protocol.change;
+package org.savara.change;
import org.scribble.protocol.model.*;
Modified: branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/ModelGenerator.java
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/protocol/change/ModelGenerator.java 2010-12-10 22:38:20 UTC (rev 502)
+++ branches/experimental/2.0.x/bundles/org.savara.core/src/main/java/org/savara/change/ModelGenerator.java 2010-12-16 14:37:55 UTC (rev 504)
@@ -17,7 +17,7 @@
* Change History:
* 24 Jul 2008 : Initial version created by gary
*/
-package org.savara.protocol.change;
+package org.savara.change;
import org.scribble.protocol.model.*;
Property changes on: branches/experimental/2.0.x/bundles/org.savara.wsdl
___________________________________________________________________
Name: svn:ignore
- target
+ target
.settings
Modified: branches/experimental/2.0.x/bundles/org.savara.wsdl/.classpath
===================================================================
--- branches/experimental/2.0.x/bundles/org.savara.wsdl/.classpath 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/bundles/org.savara.wsdl/.classpath 2010-12-16 14:37:55 UTC (rev 504)
@@ -7,8 +7,8 @@
<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.apache.felix.framework/3.0.1/org.apache.felix.framework-3.0.1.jar"/>
<classpathentry kind="var" path="M2_REPO/org/apache/felix/org.osgi.core/1.4.0/org.osgi.core-1.4.0.jar"/>
<classpathentry kind="src" path="/org.savara.contract.model"/>
- <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0.20101208-M2/org.scribble.common-2.0.0.20101208-M2.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0.20101208-M2/org.scribble.common-2.0.0.20101208-M2-sources.jar"/>
- <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0.20101208-M2/org.scribble.protocol-2.0.0.20101208-M2.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0.20101208-M2/org.scribble.protocol-2.0.0.20101208-M2-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.common/2.0.0-SNAPSHOT/org.scribble.common-2.0.0-SNAPSHOT-sources.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT.jar" sourcepath="M2_REPO/org/scribble/bundles/org.scribble.protocol/2.0.0-SNAPSHOT/org.scribble.protocol-2.0.0-SNAPSHOT-sources.jar"/>
<classpathentry kind="var" path="M2_REPO/wsdl4j/wsdl4j/1.6.2/wsdl4j-1.6.2.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
</classpath>
\ No newline at end of file
Property changes on: branches/experimental/2.0.x/docs/gettingstartedguide
___________________________________________________________________
Name: svn:ignore
+ .settings
Added: branches/experimental/2.0.x/docs/gettingstartedguide/.project
===================================================================
--- branches/experimental/2.0.x/docs/gettingstartedguide/.project (rev 0)
+++ branches/experimental/2.0.x/docs/gettingstartedguide/.project 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,7 @@
+<projectDescription>
+ <name>gettingstartedguide</name>
+ <comment>The SAVARA project. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <projects/>
+ <buildSpec/>
+ <natures/>
+</projectDescription>
\ No newline at end of file
Property changes on: branches/experimental/2.0.x/docs/samplesguide
___________________________________________________________________
Name: svn:ignore
+ .settings
Added: branches/experimental/2.0.x/docs/samplesguide/.project
===================================================================
--- branches/experimental/2.0.x/docs/samplesguide/.project (rev 0)
+++ branches/experimental/2.0.x/docs/samplesguide/.project 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,7 @@
+<projectDescription>
+ <name>samplesguide</name>
+ <comment>The SAVARA project. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <projects/>
+ <buildSpec/>
+ <natures/>
+</projectDescription>
\ No newline at end of file
Added: branches/experimental/2.0.x/docs/userguide/.project
===================================================================
--- branches/experimental/2.0.x/docs/userguide/.project (rev 0)
+++ branches/experimental/2.0.x/docs/userguide/.project 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,7 @@
+<projectDescription>
+ <name>userguide</name>
+ <comment>The SAVARA project. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <projects/>
+ <buildSpec/>
+ <natures/>
+</projectDescription>
\ No newline at end of file
Added: branches/experimental/2.0.x/docs/userguide/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- branches/experimental/2.0.x/docs/userguide/.settings/org.eclipse.jdt.core.prefs (rev 0)
+++ branches/experimental/2.0.x/docs/userguide/.settings/org.eclipse.jdt.core.prefs 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,5 @@
+#Wed Dec 15 15:52:38 GMT 2010
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
Modified: branches/experimental/2.0.x/pom.xml
===================================================================
--- branches/experimental/2.0.x/pom.xml 2010-12-10 23:37:47 UTC (rev 503)
+++ branches/experimental/2.0.x/pom.xml 2010-12-16 14:37:55 UTC (rev 504)
@@ -39,7 +39,7 @@
<properties>
<savara.version>2.0.0-SNAPSHOT</savara.version>
- <scribble.version>2.0.0.20101208-M2</scribble.version>
+ <scribble.version>2.0.0-SNAPSHOT</scribble.version>
<pi4soa.version>3.1.0.Final</pi4soa.version>
<junit.version>4.4</junit.version>
<rosetta.version>4.7</rosetta.version>
Property changes on: branches/experimental/2.0.x/validators/jboss/common
___________________________________________________________________
Name: svn:ignore
+ .settings
target
Added: branches/experimental/2.0.x/validators/jboss/common/.classpath
===================================================================
--- branches/experimental/2.0.x/validators/jboss/common/.classpath (rev 0)
+++ branches/experimental/2.0.x/validators/jboss/common/.classpath 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,182 @@
+<classpath>
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1.1/activation-1.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/security/jaas/1.0.01/jaas-1.0.01.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/security/jacc/1.0/jacc-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-avalon/avalon-framework/4.1.5/avalon-framework-4.1.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/bcel/bcel/5.1/bcel-5.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/beanshell/bsh/1.3.0/bsh-1.3.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1.3/cglib-2.1.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss.jar"/>
+ <classpathentry kind="var" path="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-common/2.3.0/emf-common-2.3.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-ecore/2.3.1/emf-ecore-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-ecore-xmi/2.3.1/emf-ecore-xmi-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/gnu-getopt/getopt/1.0.12-brew/getopt-1.0.12-brew.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jacorb/jacorb/2.3.0jboss.patch6-brew/jacorb-2.3.0jboss.patch6-brew.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.10.0.GA/javassist-3.10.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.9-brew/jaxb-api-2.1.9-brew.jar"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaxws/jaxws-api/2.1.1/jaxws-api-2.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.1.1.GA/jboss-aop-2.1.1.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.1.1.GA/jboss-aop-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-core/2.1.1.GA/jboss-aop-asintegration-core-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-jmx/2.1.1.GA/jboss-aop-asintegration-jmx-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-mc/2.1.1.GA/jboss-aop-asintegration-mc-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-aspects/2.1.1.GA/jboss-aop-aspects-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-aop-mc-int/2.0.6.GA/jboss-aop-mc-int-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-aspects/5.1.0.GA/jboss-as-aspects-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-cluster/5.1.0.GA/jboss-as-cluster-5.1.0.GA-jboss-ha-legacy-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-cluster/5.1.0.GA/jboss-as-cluster-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-connector/5.1.0.GA/jboss-as-connector-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-deployment/5.1.0.GA/jboss-as-deployment-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-ejb3/5.1.0.GA/jboss-as-ejb3-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-iiop/5.1.0.GA/jboss-as-iiop-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-iiop/5.1.0.GA/jboss-as-iiop-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-j2se/5.1.0.GA/jboss-as-j2se-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-j2se/5.1.0.GA/jboss-as-j2se-5.1.0.GA-tests.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-jmx/5.1.0.GA/jboss-as-jmx-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-main/5.1.0.GA/jboss-as-main-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-main/5.1.0.GA/jboss-as-main-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-management/5.1.0.GA/jboss-as-management-5.1.0.GA-jsr77-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-mbeans/5.1.0.GA/jboss-as-mbeans-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-profileservice/5.1.0.GA/jboss-as-profileservice-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-security/5.1.0.GA/jboss-as-security-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA-jmx-invoker-adaptor-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system/5.1.0.GA/jboss-as-system-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system/5.1.0.GA/jboss-as-system-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system-jmx/5.1.0.GA/jboss-as-system-jmx-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system-jmx/5.1.0.GA/jboss-as-system-jmx-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/bootstrap/jboss-bootstrap/1.0.0-Beta-3/jboss-bootstrap-1.0.0-Beta-3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloader/2.0.6.GA/jboss-classloader-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading/2.0.6.GA/jboss-classloading-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.GA/jboss-classloading-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.6.GA/jboss-classloading-vfs-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.14.GA/jboss-common-core-2.2.14.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-corba-ots-spi/5.1.0.GA/jboss-corba-ots-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-current-invocation-aspects/1.0.0.CR1/jboss-current-invocation-aspects-1.0.0.CR1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.6.GA/jboss-dependency-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client/2.0.7.GA/jboss-deployers-client-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.7.GA/jboss-deployers-client-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core/2.0.7.GA/jboss-deployers-core-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.7.GA/jboss-deployers-core-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-impl/2.0.7.GA/jboss-deployers-impl-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.7.GA/jboss-deployers-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.7.GA/jboss-deployers-structure-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs/2.0.7.GA/jboss-deployers-vfs-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.7.GA/jboss-deployers-vfs-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-deployment-spi/5.1.0.GA/jboss-deployment-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.GA/jboss-ejb-api-3.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-as-int/1.1.5/jboss-ejb3-as-int-1.1.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-cache/1.0.0/jboss-ejb3-cache-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-common/1.0.0/jboss-ejb3-common-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-common/1.0.0/jboss-ejb3-common-1.0.0-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-core/1.1.5/jboss-ejb3-core-1.1.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-core/1.1.5/jboss-ejb3-core-1.1.5-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-deployers/1.0.0/jboss-ejb3-deployers-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-endpoint/0.1.0/jboss-ejb3-endpoint-0.1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/1.0.0/jboss-ejb3-ext-api-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api-impl/1.0.0/jboss-ejb3-ext-api-impl-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-interceptors/1.0.2/jboss-ejb3-interceptors-1.0.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-mc-int/1.0.1/jboss-ejb3-mc-int-1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-metadata/1.0.0/jboss-ejb3-metadata-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-clustered/1.0.1/jboss-ejb3-proxy-clustered-1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-clustered/1.0.1/jboss-ejb3-proxy-clustered-1.0.1-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-impl/1.0.2/jboss-ejb3-proxy-impl-1.0.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-impl/1.0.2/jboss-ejb3-proxy-impl-1.0.2-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-spi/1.0.0/jboss-ejb3-proxy-spi-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-spi/1.0.0/jboss-ejb3-proxy-spi-1.0.0-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-security/1.0.0/jboss-ejb3-security-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-security/1.0.0/jboss-ejb3-security-1.0.0-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-timerservice-spi/1.0.0/jboss-ejb3-timerservice-spi-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-transactions/1.0.0/jboss-ejb3-transactions-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-client/1.1.1.GA/jboss-ha-client-1.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-api/1.1.1.GA/jboss-ha-server-api-1.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-cache-jbc/2.0.0.GA/jboss-ha-server-cache-jbc-2.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-cache-spi/2.0.0.GA/jboss-ha-server-cache-spi-2.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-integration/5.1.0.GA/jboss-integration-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jacc-api/1.1.0.GA_SP1/jboss-jacc-api-1.1.0.GA_SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jad-api/1.2.0.GA/jboss-jad-api-1.2.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0.0.GA/jboss-jaspi-api-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.1.GA/jboss-javaee-5.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-jaxws/3.0.1-native-2.0.4.GA/jboss-jaxws-3.0.1-native-2.0.4.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.GA/jboss-jca-api-1.5.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-jca-spi/5.0.3.GA/jboss-jca-spi-5.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0.GA/jboss-jms-api-1.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jpa/jboss-jpa-deployers/1.0.0/jboss-jpa-deployers-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.6.GA/jboss-kernel-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logbridge/jboss-logbridge/1.0.0.GA/jboss-logbridge-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-jdk/2.1.0.GA/jboss-logging-jdk-2.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.1.0.GA/jboss-logging-log4j-2.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.1.0.GA/jboss-logging-spi-2.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logmanager/jboss-logmanager/1.0.0.GA/jboss-logmanager-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.1.0.CR8/jboss-managed-2.1.0.CR8.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/messaging/jboss-messaging/1.4.3.GA/jboss-messaging-1.4.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.1.GA/jboss-metadata-1.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.1.0.SP1/jboss-metatype-2.1.0.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.GA/jboss-profileservice-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/remoting/jboss-remoting/2.5.1/jboss-remoting-2.5.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-remoting-aspects/1.0.2/jboss-remoting-aspects-1.0.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-security-aspects/1.0.0.GA/jboss-security-aspects-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jboss-security-spi/2.0.3.SP1/jboss-security-spi-2.0.3.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-serialization/1.0.3.GA/jboss-serialization-1.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/1.0.2.GA/jboss-server-manager-1.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.4.GA/jboss-test-1.1.4.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-transaction-aspects/1.0.0.GA/jboss-transaction-aspects-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-transaction-spi/5.1.0.GA/jboss-transaction-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.1.2.GA/jboss-vfs-2.1.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cache/jbosscache-core/3.1.0.GA/jbosscache-core-3.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx/2.0.3.SP1/jbosssx-2.0.3.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx-client/2.0.3.SP1/jbosssx-client-2.0.3.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-jaxrpc/3.0.4.GA/jbossws-native-jaxrpc-3.0.4.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-jaxws/3.1.2.GA/jbossws-native-jaxws-3.1.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-saaj/3.1.2.GA/jbossws-native-saaj-3.1.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/jbossws-spi/1.0.3.GA/jbossws-spi-1.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbossxacml/2.0.3/jbossxacml-2.0.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.1.GA/jbossxb-2.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jgroups/jgroups/2.6.10.GA/jgroups-2.6.10.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/naming/jnp-client/5.0.3.GA/jnp-client-5.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/naming/jnpserver/5.0.3.GA/jnpserver-5.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jpl-pattern/jpl-pattern/1.0/jpl-pattern-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jpl-util/jpl-util/1.0/jpl-util-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaxws/jsr181-api/2.1.1/jsr181-api-2.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.cdl/3.1.0.Final/org.pi4soa.cdl-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.common/3.1.0.Final/org.pi4soa.common-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.service/3.1.0.Final/org.pi4soa.service-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/pluggable-instrumentor/2.1.1.GA/pluggable-instrumentor-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/quartz/quartz/1.6.0/quartz-1.6.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.1.GA/servlet-api-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/slf4j/slf4j-jboss-logging/1.0.2.GA/slf4j-jboss-logging-1.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0/stax-api-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/xmlsec/1.4.2/xmlsec-1.4.2.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
\ No newline at end of file
Added: branches/experimental/2.0.x/validators/jboss/common/.project
===================================================================
--- branches/experimental/2.0.x/validators/jboss/common/.project (rev 0)
+++ branches/experimental/2.0.x/validators/jboss/common/.project 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,13 @@
+<projectDescription>
+ <name>savara-validator-jboss</name>
+ <comment>The SAVARA project. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <projects/>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Property changes on: branches/experimental/2.0.x/validators/jboss/esb
___________________________________________________________________
Name: svn:ignore
+ .settings
target
Added: branches/experimental/2.0.x/validators/jboss/esb/.classpath
===================================================================
--- branches/experimental/2.0.x/validators/jboss/esb/.classpath (rev 0)
+++ branches/experimental/2.0.x/validators/jboss/esb/.classpath 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,18 @@
+<classpath>
+ <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+ <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-common/2.3.0/emf-common-2.3.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-ecore/2.3.1/emf-ecore-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-ecore-xmi/2.3.1/emf-ecore-xmi-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/esb/jbossesb-rosetta/4.7/jbossesb-rosetta-4.7.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.cdl/3.1.0.Final/org.pi4soa.cdl-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.common/3.1.0.Final/org.pi4soa.common-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.service/3.1.0.Final/org.pi4soa.service-3.1.0.Final.jar"/>
+ <classpathentry kind="src" path="/savara-validator-jboss"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
\ No newline at end of file
Added: branches/experimental/2.0.x/validators/jboss/esb/.project
===================================================================
--- branches/experimental/2.0.x/validators/jboss/esb/.project (rev 0)
+++ branches/experimental/2.0.x/validators/jboss/esb/.project 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,15 @@
+<projectDescription>
+ <name>savara-validator-jbossesb</name>
+ <comment>The SAVARA project. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <projects>
+ <project>savara-validator-jboss</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
Property changes on: branches/experimental/2.0.x/validators/jboss/wsnative
___________________________________________________________________
Name: svn:ignore
+ .settings
target
Added: branches/experimental/2.0.x/validators/jboss/wsnative/.classpath
===================================================================
--- branches/experimental/2.0.x/validators/jboss/wsnative/.classpath (rev 0)
+++ branches/experimental/2.0.x/validators/jboss/wsnative/.classpath 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,210 @@
+<classpath>
+ <classpathentry kind="src" path="src/test/java" output="target/test-classes" including="**/*.java"/>
+ <classpathentry kind="src" path="src/test/resources" output="target/test-classes" excluding="**/*.java"/>
+ <classpathentry kind="src" path="src/main/java" including="**/*.java"/>
+ <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+ <classpathentry kind="output" path="target/classes"/>
+ <classpathentry kind="var" path="M2_REPO/javax/activation/activation/1.1/activation-1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/security/jaas/1.0.01/jaas-1.0.01.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/security/jacc/1.0/jacc-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/xml/ws/jaxws-api/2.1/jaxws-api-2.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/jws/jsr181-api/1.0-MR1/jsr181-api-1.0-MR1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/transaction/jta/1.1/jta-1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/mail/mail/1.4/mail-1.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant/1.7.0/ant-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-junit/1.7.0/ant-junit-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/ant/ant-launcher/1.7.0/ant-launcher-1.7.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.6/antlr-2.7.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-avalon/avalon-framework/4.1.5/avalon-framework-4.1.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/bcel/bcel/5.1/bcel-5.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/beanshell/bsh/1.3.0/bsh-1.3.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/cglib/cglib/2.1.3/cglib-2.1.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-beanutils/commons-beanutils/1.8.0/commons-beanutils-1.8.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-collections/commons-collections/3.1/commons-collections-3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/commons-logging/commons-logging/1.1.0.jboss/commons-logging-1.1.0.jboss.jar"/>
+ <classpathentry kind="var" path="M2_REPO/oswego-concurrent/concurrent/1.3.4-jboss-update1/concurrent-1.3.4-jboss-update1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/wutka-dtdparser/dtdparser121/1.2.1/dtdparser121-1.2.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/ejb3-persistence/1.0.2.GA/ejb3-persistence-1.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-common/2.3.0/emf-common-2.3.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-ecore/2.3.1/emf-ecore-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/savara/dependencies/eclipse/emf-ecore-xmi/2.3.1/emf-ecore-xmi-2.3.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/fastinfoset/FastInfoset/1.2.2/FastInfoset-1.2.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/gnu-getopt/getopt/1.0.12-brew/getopt-1.0.12-brew.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-annotations/3.4.0.GA/hibernate-annotations-3.4.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-commons-annotations/3.1.0.GA/hibernate-commons-annotations-3.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/3.3.0.SP1/hibernate-core-3.3.0.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-entitymanager/3.4.0.GA/hibernate-entitymanager-3.4.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jacorb/jacorb/2.3.0jboss.patch6-brew/jacorb-2.3.0jboss.patch6-brew.jar"/>
+ <classpathentry kind="var" path="M2_REPO/javassist/javassist/3.6.0.GA/javassist-3.6.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaxb/jaxb-api/2.1.9-brew/jaxb-api-2.1.9-brew.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-impl/2.1.12/jaxb-impl-2.1.12.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/bind/jaxb-xjc/2.1.12/jaxb-xjc-2.1.12.jar"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaxws/jaxws-api/2.1.1/jaxws-api-2.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/ws/jaxws-rt/2.1.7/jaxws-rt-2.1.7.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/ws/jaxws-tools/2.1.7/jaxws-tools-2.1.7.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.1.1.GA/jboss-aop-2.1.1.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop/2.1.1.GA/jboss-aop-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-core/2.1.1.GA/jboss-aop-asintegration-core-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-jmx/2.1.1.GA/jboss-aop-asintegration-jmx-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-asintegration-mc/2.1.1.GA/jboss-aop-asintegration-mc-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/jboss-aop-aspects/2.1.1.GA/jboss-aop-aspects-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-aop-mc-int/2.0.6.GA/jboss-aop-mc-int-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-aspects/5.1.0.GA/jboss-as-aspects-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-cluster/5.1.0.GA/jboss-as-cluster-5.1.0.GA-jboss-ha-legacy-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-cluster/5.1.0.GA/jboss-as-cluster-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-connector/5.1.0.GA/jboss-as-connector-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-deployment/5.1.0.GA/jboss-as-deployment-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-ejb3/5.1.0.GA/jboss-as-ejb3-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-iiop/5.1.0.GA/jboss-as-iiop-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-iiop/5.1.0.GA/jboss-as-iiop-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-j2se/5.1.0.GA/jboss-as-j2se-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-j2se/5.1.0.GA/jboss-as-j2se-5.1.0.GA-tests.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-jmx/5.1.0.GA/jboss-as-jmx-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-main/5.1.0.GA/jboss-as-main-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-main/5.1.0.GA/jboss-as-main-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-management/5.1.0.GA/jboss-as-management-5.1.0.GA-jsr77-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-mbeans/5.1.0.GA/jboss-as-mbeans-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-profileservice/5.1.0.GA/jboss-as-profileservice-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-security/5.1.0.GA/jboss-as-security-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-server/5.1.0.GA/jboss-as-server-5.1.0.GA-jmx-invoker-adaptor-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system/5.1.0.GA/jboss-as-system-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system/5.1.0.GA/jboss-as-system-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system-jmx/5.1.0.GA/jboss-as-system-jmx-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-as-system-jmx/5.1.0.GA/jboss-as-system-jmx-5.1.0.GA-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/bootstrap/jboss-bootstrap/1.0.0-Beta-3/jboss-bootstrap-1.0.0-Beta-3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloader/2.0.6.GA/jboss-classloader-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading/2.0.6.GA/jboss-classloading-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-classloading-spi/5.1.0.GA/jboss-classloading-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cl/jboss-classloading-vfs/2.0.6.GA/jboss-classloading-vfs-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-common-core/2.2.14.GA/jboss-common-core-2.2.14.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-corba-ots-spi/5.1.0.GA/jboss-corba-ots-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-current-invocation-aspects/1.0.0.CR1/jboss-current-invocation-aspects-1.0.0.CR1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-dependency/2.0.6.GA/jboss-dependency-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client/2.0.7.GA/jboss-deployers-client-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-client-spi/2.0.7.GA/jboss-deployers-client-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core/2.0.7.GA/jboss-deployers-core-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-core-spi/2.0.7.GA/jboss-deployers-core-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-impl/2.0.7.GA/jboss-deployers-impl-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-spi/2.0.7.GA/jboss-deployers-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-structure-spi/2.0.7.GA/jboss-deployers-structure-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs/2.0.7.GA/jboss-deployers-vfs-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/deployers/jboss-deployers-vfs-spi/2.0.7.GA/jboss-deployers-vfs-spi-2.0.7.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-deployment-spi/5.1.0.GA/jboss-deployment-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-ejb-api/3.0.0.GA/jboss-ejb-api-3.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-as-int/1.1.5/jboss-ejb3-as-int-1.1.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-cache/1.0.0/jboss-ejb3-cache-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-common/1.0.0/jboss-ejb3-common-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-common/1.0.0/jboss-ejb3-common-1.0.0-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-core/1.1.5/jboss-ejb3-core-1.1.5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-core/1.1.5/jboss-ejb3-core-1.1.5-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-deployers/1.0.0/jboss-ejb3-deployers-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-endpoint/0.1.0/jboss-ejb3-endpoint-0.1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api/1.0.0/jboss-ejb3-ext-api-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-ext-api-impl/1.0.0/jboss-ejb3-ext-api-impl-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-interceptors/1.0.2/jboss-ejb3-interceptors-1.0.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-mc-int/1.0.1/jboss-ejb3-mc-int-1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-metadata/1.0.0/jboss-ejb3-metadata-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-clustered/1.0.1/jboss-ejb3-proxy-clustered-1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-clustered/1.0.1/jboss-ejb3-proxy-clustered-1.0.1-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-impl/1.0.2/jboss-ejb3-proxy-impl-1.0.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-impl/1.0.2/jboss-ejb3-proxy-impl-1.0.2-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-spi/1.0.0/jboss-ejb3-proxy-spi-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-proxy-spi/1.0.0/jboss-ejb3-proxy-spi-1.0.0-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-security/1.0.0/jboss-ejb3-security-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-security/1.0.0/jboss-ejb3-security-1.0.0-client.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-timerservice-spi/1.0.0/jboss-ejb3-timerservice-spi-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ejb3/jboss-ejb3-transactions/1.0.0/jboss-ejb3-transactions-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-client/1.1.1.GA/jboss-ha-client-1.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-api/1.1.1.GA/jboss-ha-server-api-1.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-cache-jbc/2.0.0.GA/jboss-ha-server-cache-jbc-2.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cluster/jboss-ha-server-cache-spi/2.0.0.GA/jboss-ha-server-cache-spi-2.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-integration/5.1.0.GA/jboss-integration-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jacc-api/1.1.0.GA_SP1/jboss-jacc-api-1.1.0.GA_SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jad-api/1.2.0.GA/jboss-jad-api-1.2.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jaspi-api/1.0.0.GA/jboss-jaspi-api-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-javaee/5.0.1.GA/jboss-javaee-5.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jaxbintros/jboss-jaxb-intros/1.0.2.GA/jboss-jaxb-intros-1.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jbossws/jboss-jaxws/3.0.1-native-2.0.4.GA/jboss-jaxws-3.0.1-native-2.0.4.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jca-api/1.5.0.GA/jboss-jca-api-1.5.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-jca-spi/5.0.3.GA/jboss-jca-spi-5.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-jms-api/1.1.0.GA/jboss-jms-api-1.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jpa/jboss-jpa-deployers/1.0.0/jboss-jpa-deployers-1.0.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/microcontainer/jboss-kernel/2.0.6.GA/jboss-kernel-2.0.6.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logbridge/jboss-logbridge/1.0.0.GA/jboss-logbridge-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-jdk/2.1.0.GA/jboss-logging-jdk-2.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-log4j/2.1.0.GA/jboss-logging-log4j-2.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-spi/2.1.0.GA/jboss-logging-spi-2.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/logmanager/jboss-logmanager/1.0.0.GA/jboss-logmanager-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-managed/2.1.0.CR8/jboss-managed-2.1.0.CR8.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-mdr/2.0.1.GA/jboss-mdr-2.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/messaging/jboss-messaging/1.4.3.GA/jboss-messaging-1.4.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/metadata/jboss-metadata/1.0.1.GA/jboss-metadata-1.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/man/jboss-metatype/2.1.0.SP1/jboss-metatype-2.1.0.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/profiler/jvmti/jboss-profiler-jvmti/1.0.0.CR5/jboss-profiler-jvmti-1.0.0.CR5.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-profileservice-spi/5.1.0.GA/jboss-profileservice-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-reflect/2.0.2.GA/jboss-reflect-2.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/remoting/jboss-remoting/2.5.1/jboss-remoting-2.5.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-remoting-aspects/1.0.2/jboss-remoting-aspects-1.0.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-security-aspects/1.0.0.GA/jboss-security-aspects-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jboss-security-spi/2.0.3.SP1/jboss-security-spi-2.0.3.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/jboss-serialization/1.0.3.GA/jboss-serialization-1.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossas/jboss-server-manager/1.0.2.GA/jboss-server-manager-1.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/test/jboss-test/1.1.4.GA/jboss-test-1.1.4.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/javaee/jboss-transaction-api/1.0.1.GA/jboss-transaction-api-1.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aspects/jboss-transaction-aspects/1.0.0.GA/jboss-transaction-aspects-1.0.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/integration/jboss-transaction-spi/5.1.0.GA/jboss-transaction-spi-5.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jboss-vfs/2.1.2.GA/jboss-vfs-2.1.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/cache/jbosscache-core/3.1.0.GA/jbosscache-core-3.1.0.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx/2.0.3.SP1/jbosssx-2.0.3.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbosssx-client/2.0.3.SP1/jbosssx-client-2.0.3.SP1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/jbossws-common/1.2.2.GA/jbossws-common-1.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/jbossws-framework/3.2.2.GA/jbossws-framework-3.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-core/3.2.2.GA/jbossws-native-core-3.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-jaxrpc/3.2.2.GA/jbossws-native-jaxrpc-3.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-jaxws/3.2.2.GA/jbossws-native-jaxws-3.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-jaxws-ext/3.2.2.GA/jbossws-native-jaxws-ext-3.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/native/jbossws-native-saaj/3.1.2.GA/jbossws-native-saaj-3.1.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/ws/jbossws-spi/1.2.2.GA/jbossws-spi-1.2.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/security/jbossxacml/2.0.3/jbossxacml-2.0.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/jbossxb/2.0.1.GA/jbossxb-2.0.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/jettison/jettison/1.0-RC2/jettison-1.0-RC2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jgroups/jgroups/2.6.10.GA/jgroups-2.6.10.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/naming/jnp-client/5.0.3.GA/jnp-client-5.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/naming/jnpserver/5.0.3.GA/jnpserver-5.0.3.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jpl-pattern/jpl-pattern/1.0/jpl-pattern-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/jpl-util/jpl-util/1.0/jpl-util-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/sun-jaxws/jsr181-api/2.1.1/jsr181-api-2.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/junit/junit/4.4/junit-4.4.jar"/>
+ <classpathentry kind="var" path="M2_REPO/log4j/log4j/1.2.14/log4j-1.2.14.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/mimepull/1.3/mimepull-1.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/netty/netty/3.1.5.GA/netty-3.1.5.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.cdl/3.1.0.Final/org.pi4soa.cdl-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.common/3.1.0.Final/org.pi4soa.common-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/pi4soa/org.pi4soa.service/3.1.0.Final/org.pi4soa.service-3.1.0.Final.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/aop/pluggable-instrumentor/2.1.1.GA/pluggable-instrumentor-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/wscommons-policy/policy/1.0/policy-1.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/qdox/qdox/1.6.1/qdox-1.6.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/quartz/quartz/1.6.0/quartz-1.6.0.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/org/apache/xml/internal/resolver/20050927/resolver-20050927.jar"/>
+ <classpathentry kind="src" path="/savara-validator-jboss"/>
+ <classpathentry kind="var" path="M2_REPO/jboss/web/servlet-api/2.1.1.GA/servlet-api-2.1.1.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.5.6/slf4j-api-1.5.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jboss/slf4j/slf4j-jboss-logging/1.0.2.GA/slf4j-jboss-logging-1.0.2.GA.jar"/>
+ <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/jvnet/staxex/stax-ex/1.2/stax-ex-1.2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/com/sun/xml/stream/buffer/streambuffer/0.9/streambuffer-0.9.jar"/>
+ <classpathentry kind="var" path="M2_REPO/trove/trove/2.1.1/trove-2.1.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/wsdl4j/wsdl4j/1.6.1/wsdl4j-1.6.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.3/wstx-asl-3.2.3.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/wstx-lgpl/3.2.6/wstx-lgpl-3.2.6.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/apache-xerces/xml-apis/2.9.1/xml-apis-2.9.1.jar"/>
+ <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.0.b2/xml-apis-1.0.b2.jar"/>
+ <classpathentry kind="var" path="M2_REPO/org/apache/xmlsec/1.4.2/xmlsec-1.4.2.jar"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+</classpath>
\ No newline at end of file
Added: branches/experimental/2.0.x/validators/jboss/wsnative/.project
===================================================================
--- branches/experimental/2.0.x/validators/jboss/wsnative/.project (rev 0)
+++ branches/experimental/2.0.x/validators/jboss/wsnative/.project 2010-12-16 14:37:55 UTC (rev 504)
@@ -0,0 +1,15 @@
+<projectDescription>
+ <name>savara-validator-jbossws-native</name>
+ <comment>The SAVARA project. NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment>
+ <projects>
+ <project>savara-validator-jboss</project>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
\ No newline at end of file
More information about the savara-commits
mailing list