You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ode.apache.org by mr...@apache.org on 2008/10/22 03:01:27 UTC
svn commit: r706828 [2/2] - in /ode/branches/restful:
axis2/src/main/java/org/apache/ode/axis2/
axis2/src/main/java/org/apache/ode/axis2/soapbinding/
bpel-api/src/main/java/org/apache/ode/bpel/iapi/
bpel-api/src/main/java/org/apache/ode/bpel/rapi/ bpel...
Modified: ode/branches/restful/engine/src/main/java/org/apache/ode/bpel/engine/PartnerLinkPartnerRoleImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/restful/engine/src/main/java/org/apache/ode/bpel/engine/PartnerLinkPartnerRoleImpl.java?rev=706828&r1=706827&r2=706828&view=diff
==============================================================================
--- ode/branches/restful/engine/src/main/java/org/apache/ode/bpel/engine/PartnerLinkPartnerRoleImpl.java (original)
+++ ode/branches/restful/engine/src/main/java/org/apache/ode/bpel/engine/PartnerLinkPartnerRoleImpl.java Tue Oct 21 18:01:25 2008
@@ -62,7 +62,7 @@
InvocationStyle istyle = mexdao.getInvocationStyle();
PartnerRoleMessageExchangeImpl mex;
Operation op = _plinkDef.getPartnerRoleOperation(mexdao.getOperation());
- EndpointReference myroleEPR = _plinkDef.hasMyRole() ? _process.getInitialMyRoleEPR(_plinkDef) : null;
+ EndpointReference myroleEPR = _plinkDef.hasMyRole() ? ((ODEWSProcess)_process).getInitialMyRoleEPR(_plinkDef) : null;
switch (istyle) {
case UNRELIABLE:
mex = new UnreliablePartnerRoleMessageExchangeImpl(_process, mexdao.getInstance().getInstanceId(), mexdao
@@ -109,7 +109,7 @@
}
EndpointReference myRoleEpr = null;
- if (_plinkDef.hasMyRole()) myRoleEpr = _process.getInitialMyRoleEPR(_plinkDef);
+ if (_plinkDef.hasMyRole()) myRoleEpr = ((ODEWSProcess)_process).getInitialMyRoleEPR(_plinkDef);
_process.setStatefulEPRs(mexDao);
Operation operation = _plinkDef.getPartnerRoleOperation(mexDao.getOperation());
Set<InvocationStyle> supportedStyles = _contexts.mexContext.getSupportedInvocationStyle(_channel, partnerEpr);
@@ -323,10 +323,6 @@
*
* @param blockingMex
* the MEX we're invoking on the partner
- * @param iworker
- * instance worker (for scheduling continuation)
- * @param lastBpelRuntimeContextImpl
- * the BRC that initiated this invoke
*/
public UnreliableInvoker(UnreliablePartnerRoleMessageExchangeImpl blockingMex) {
_unreliableMex = blockingMex;
Modified: ode/branches/restful/engine/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/restful/engine/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java?rev=706828&r1=706827&r2=706828&view=diff
==============================================================================
--- ode/branches/restful/engine/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java (original)
+++ ode/branches/restful/engine/src/main/java/org/apache/ode/bpel/engine/ProcessAndInstanceManagementImpl.java Tue Oct 21 18:01:25 2008
@@ -695,8 +695,6 @@
* destination XMLBean
* @param pconf
* process configuration object (from store)
- * @param proc
- * source DAO object
* @param custom
* used to customize the quantity of information produced in the
* info
@@ -758,7 +756,8 @@
for (PartnerLinkModel oplink : pmodel.getAllPartnerLinks()) {
if (oplink.hasPartnerRole() && oplink.isInitializePartnerRoleSet()) {
// TODO: this is very uncool.
- EndpointReference pepr = _server.getBpelProcess(pconf.getProcessId()).getInitialPartnerRoleEPR(oplink);
+ EndpointReference pepr = ((ODEWSProcess)_server.getBpelProcess(pconf.getProcessId()))
+ .getInitialPartnerRoleEPR(oplink);
if (pepr != null) {
TEndpointReferences.EndpointRef epr = eprs.addNewEndpointRef();
Document eprNodeDoc = epr.getDomNode().getOwnerDocument();
Modified: ode/branches/restful/engine/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java
URL: http://svn.apache.org/viewvc/ode/branches/restful/engine/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java?rev=706828&r1=706827&r2=706828&view=diff
==============================================================================
--- ode/branches/restful/engine/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java (original)
+++ ode/branches/restful/engine/src/test/java/org/apache/ode/bpel/runtime/MockBpelServer.java Tue Oct 21 18:01:25 2008
@@ -34,18 +34,7 @@
import org.apache.ode.bpel.dao.BpelDAOConnectionFactory;
import org.apache.ode.bpel.dao.BpelDAOConnectionFactoryJDBC;
import org.apache.ode.bpel.engine.BpelServerImpl;
-import org.apache.ode.bpel.iapi.BindingContext;
-import org.apache.ode.bpel.iapi.ContextException;
-import org.apache.ode.bpel.iapi.Endpoint;
-import org.apache.ode.bpel.iapi.EndpointReference;
-import org.apache.ode.bpel.iapi.EndpointReferenceContext;
-import org.apache.ode.bpel.iapi.InvocationStyle;
-import org.apache.ode.bpel.iapi.Message;
-import org.apache.ode.bpel.iapi.MessageExchangeContext;
-import org.apache.ode.bpel.iapi.MyRoleMessageExchange;
-import org.apache.ode.bpel.iapi.PartnerRoleChannel;
-import org.apache.ode.bpel.iapi.PartnerRoleMessageExchange;
-import org.apache.ode.bpel.iapi.Scheduler;
+import org.apache.ode.bpel.iapi.*;
import org.apache.ode.dao.jpa.BPELDAOConnectionFactoryImpl;
import org.apache.ode.il.EmbeddedGeronimoFactory;
import org.apache.ode.il.MockScheduler;
@@ -288,6 +277,14 @@
};
};
}
+
+ public void activateProvidedResource(Resource resource) {
+ throw new UnsupportedOperationException();
+ }
+
+ public void deactivateProvidedResource(Resource resource) {
+ throw new UnsupportedOperationException();
+ }
};
return _bindContext;
}
Modified: ode/branches/restful/jbi/src/main/java/org/apache/ode/jbi/BindingContextImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/restful/jbi/src/main/java/org/apache/ode/jbi/BindingContextImpl.java?rev=706828&r1=706827&r2=706828&view=diff
==============================================================================
--- ode/branches/restful/jbi/src/main/java/org/apache/ode/jbi/BindingContextImpl.java (original)
+++ ode/branches/restful/jbi/src/main/java/org/apache/ode/jbi/BindingContextImpl.java Tue Oct 21 18:01:25 2008
@@ -70,7 +70,14 @@
}
}
-
+ public void activateProvidedResource(Resource resource) {
+ throw new UnsupportedOperationException("RESTful resources not supported in JBI integration layer.");
+ }
+
+ public void deactivateProvidedResource(Resource resource) {
+ throw new UnsupportedOperationException("RESTful resources not supported in JBI integration layer.");
+ }
+
private class PartnerRoleChannelImpl implements PartnerRoleChannel {
private final JbiEndpointReference _initialEPR;
Modified: ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v1/OProcess.java
URL: http://svn.apache.org/viewvc/ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v1/OProcess.java?rev=706828&r1=706827&r2=706828&view=diff
==============================================================================
--- ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v1/OProcess.java (original)
+++ ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v1/OProcess.java Tue Oct 21 18:01:25 2008
@@ -18,10 +18,7 @@
*/
package org.apache.ode.bpel.rtrep.v1;
-import org.apache.ode.bpel.rapi.ProcessModel;
-import org.apache.ode.bpel.rapi.ActivityModel;
-import org.apache.ode.bpel.rapi.PartnerLinkModel;
-import org.apache.ode.bpel.rapi.PropertyAliasModel;
+import org.apache.ode.bpel.rapi.*;
import javax.wsdl.Operation;
import javax.xml.namespace.QName;
@@ -216,4 +213,8 @@
public int getModelVersion() {
return 1;
}
+
+ public Collection<? extends ResourceModel> getProvidedResources() {
+ return null;
+ }
}
Modified: ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v1/RuntimeImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v1/RuntimeImpl.java?rev=706828&r1=706827&r2=706828&view=diff
==============================================================================
--- ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v1/RuntimeImpl.java (original)
+++ ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v1/RuntimeImpl.java Tue Oct 21 18:01:25 2008
@@ -125,6 +125,10 @@
return null;
}
+ public String extractAddress(ResourceModel resource) {
+ return null;
+ }
+
public void clear() {
_pconf = null;
_oprocess = null;
Modified: ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/OProcess.java
URL: http://svn.apache.org/viewvc/ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/OProcess.java?rev=706828&r1=706827&r2=706828&view=diff
==============================================================================
--- ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/OProcess.java (original)
+++ ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/OProcess.java Tue Oct 21 18:01:25 2008
@@ -18,10 +18,7 @@
*/
package org.apache.ode.bpel.rtrep.v2;
-import org.apache.ode.bpel.rapi.ProcessModel;
-import org.apache.ode.bpel.rapi.PartnerLinkModel;
-import org.apache.ode.bpel.rapi.PropertyAliasModel;
-import org.apache.ode.bpel.rapi.ActivityModel;
+import org.apache.ode.bpel.rapi.*;
import javax.wsdl.Operation;
import javax.xml.namespace.QName;
@@ -66,7 +63,7 @@
public final Set<PartnerLinkModel> allPartnerLinks = new HashSet<PartnerLinkModel>();
/** All web resources in the process. */
- public final Set<OResource> allResources = new HashSet<OResource>();
+ public final Set<ResourceModel> providedResources = new HashSet<ResourceModel>();
public final List<OProperty> properties = new ArrayList<OProperty>();
@@ -132,8 +129,8 @@
return null;
}
- public Set<OResource> getAllResources() {
- return Collections.unmodifiableSet(allResources);
+ public Set<ResourceModel> getProvidedResources() {
+ return Collections.unmodifiableSet(providedResources);
}
public PartnerLinkModel getPartnerLink(int partnerLinkModelId) {
Modified: ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/OResource.java
URL: http://svn.apache.org/viewvc/ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/OResource.java?rev=706828&r1=706827&r2=706828&view=diff
==============================================================================
--- ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/OResource.java (original)
+++ ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/OResource.java Tue Oct 21 18:01:25 2008
@@ -1,13 +1,16 @@
package org.apache.ode.bpel.rtrep.v2;
+import org.apache.ode.bpel.rapi.ResourceModel;
+
/**
* RESTful resource representation at the process level
*/
-public class OResource extends OBase {
+public class OResource extends OBase implements ResourceModel {
private String name;
private OExpression subpath;
private OResource reference;
+ private String method;
public OResource(OProcess owner) {
super(owner);
@@ -37,4 +40,11 @@
this.reference = reference;
}
+ public String getMethod() {
+ return method;
+ }
+
+ public void setMethod(String method) {
+ this.method = method;
+ }
}
Modified: ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/RuntimeImpl.java
URL: http://svn.apache.org/viewvc/ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/RuntimeImpl.java?rev=706828&r1=706827&r2=706828&view=diff
==============================================================================
--- ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/RuntimeImpl.java (original)
+++ ode/branches/restful/runtimes/src/main/java/org/apache/ode/bpel/rtrep/v2/RuntimeImpl.java Tue Oct 21 18:01:25 2008
@@ -133,6 +133,14 @@
return null;
}
+ public String extractAddress(ResourceModel resourceModel) {
+ OResource resource = (OResource) resourceModel;
+ String rootPath = "";
+ if (resource.getReference() != null)
+ rootPath = extractAddress(resource.getReference());
+ return rootPath + "/" + resource.getSubpath();
+ }
+
public String extractMatch(Element msgData, PropertyExtractor extractor) throws FaultException {
OExpression expr = (OExpression) extractor;
BoundVariableEvaluationContext ctx = new BoundVariableEvaluationContext();