public void transformWithinSequence( TransformationInfo information, EsbNode subject, SequenceMediator sequence) throws TransformerException { Assert.isTrue(subject instanceof DefaultEndPoint, "Invalid subject"); DefaultEndPoint visualEndPoint = (DefaultEndPoint) subject; Endpoint synapseEP = create(visualEndPoint, visualEndPoint.getEndPointName()); setEndpointToSendOrCallMediator(sequence, synapseEP); }
public void createSynapseObject( TransformationInfo info, EObject subject, List<Endpoint> endPoints) { Assert.isTrue(subject instanceof EndPoint, "Invalid subject"); DefaultEndPoint visualEP = (DefaultEndPoint) subject; Endpoint endPoint = (Endpoint) create(visualEP, visualEP.getEndPointName()); endPoints.add(endPoint); // Transform endpoint output data flow. transformEndpointOutflow(info); }
/** {@inheritDoc} */ public void transform(TransformationInfo info, EsbNode subject) throws TransformerException { // Check subject. Assert.isTrue(subject instanceof EndPoint, "Invalid subject"); DefaultEndPoint visualEP = (DefaultEndPoint) subject; DefaultEndpoint synapseEP = create(visualEP, visualEP.getEndPointName()); setEndpointToSendCallOrProxy(info, visualEP, synapseEP); if (!info.isEndPointFound) { info.isEndPointFound = true; info.firstEndPoint = visualEP; } if (visualEP.getOutputConnector() != null) { if (visualEP.getOutputConnector().getOutgoingLink() != null) { InputConnector nextInputConnector = visualEP.getOutputConnector().getOutgoingLink().getTarget(); if ((!(nextInputConnector instanceof SequenceInputConnector)) || ((((Sequence) nextInputConnector.eContainer()) .getOutputConnector() .get(0) .getOutgoingLink() != null) && (!(((Sequence) nextInputConnector.eContainer()) .getOutputConnector() .get(0) .getOutgoingLink() .getTarget() .eContainer() instanceof EndPoint)))) { info.setParentSequence(info.getOriginOutSequence()); info.setTraversalDirection(TransformationInfo.TRAVERSAL_DIRECTION_OUT); } else if (visualEP.getInputConnector().getIncomingLinks().get(0).getSource().eContainer() instanceof Sequence) { info.setParentSequence(info.getCurrentReferredSequence()); } } } List<EsbNode> transformedMediators = info.getTransformedMediators(); if (visualEP.getOutputConnector() != null && visualEP.getOutputConnector().getOutgoingLink() != null) { EsbNode nextElement = (EsbNode) visualEP.getOutputConnector().getOutgoingLink().getTarget().eContainer(); if (transformedMediators.contains(nextElement)) { return; } transformedMediators.add(nextElement); } // Transform endpoint output data flow. // TODO: find out why this was commented out. // might want to check if the flow is connected back to initial proxy // service doTransform(info, visualEP.getOutputConnector()); }