Package org.jitterbit.integration.data.entity.operation.pipeline

Examples of org.jitterbit.integration.data.entity.operation.pipeline.PipelineActivity


        PipelineActivity previous = pipeline.getPreviousActivity(inserted);
        return (previous != null ? pipeline.getPosition(previous) : null);
    }

    private PipelineActivityPosition getNext(OperationPipeline pipeline, PipelineActivity inserted) {
        PipelineActivity next = pipeline.getNextActivity(inserted);
        return (next != null ? pipeline.getPosition(next) : null);
    }
View Full Code Here


public final class WebServiceRemovingPolicyJUnitTest {

    @Test
    public void testAllowed() {
        OperationPipeline pipeline = WebServiceOperationType.TYPE.createNewTemplate();
        PipelineActivity source = pipeline.getFirstActivity();
        WebServicePipelineBrowser browser = new WebServicePipelineBrowser(pipeline);
        PipelineActivity response = browser.getResponseActivity();
        PipelineActivity target = pipeline.getNextActivity(response);
        try {
            pipeline.removeActivity(source);
            pipeline.removeActivity(target);
        } catch (RemoveActivityVetoException ex) {
            fail();
View Full Code Here

public class ArchiveEntryRemovingPolicyJUnitTest {

    @Test
    public void run() {
        OperationPipeline archive = ArchiveOperationType.TYPE.createNewTemplate();
        PipelineActivity source = archive.getFirstActivity();
        PipelineActivity target = archive.getNextActivity(source);
        PipelineActivity script = new ScriptActivity("Send Email");
        archive.insertLast(script);
        try {
            archive.removeActivity(source);
            fail();
        } catch (RemoveActivityVetoException ex) {
View Full Code Here

public class TransformationEntryRemovingPolicyJUnitTest {

    @Test
    public void testAllowedRemovals() {
        OperationPipeline pipeline = TransformationOperationType.TYPE.createNewTemplate();
        PipelineActivity source = pipeline.getFirstActivity();
        PipelineActivity transformation = pipeline.getNextActivity(source);
        PipelineActivity target = pipeline.getNextActivity(transformation);
        try {
            pipeline.removeActivity(source);
            pipeline.removeActivity(target);
        } catch (RemoveActivityVetoException ex) {
            fail();
View Full Code Here

    @Test
    public void testDisallowedRemoval() {
        try {
            OperationPipeline pipeline = TransformationOperationType.TYPE.createNewTemplate();
            PipelineActivity source = pipeline.getFirstActivity();
            PipelineActivity transformation = pipeline.getNextActivity(source);
            pipeline.removeActivity(transformation);
            fail();
        } catch (RemoveActivityVetoException ex) {
            // ok
        }
View Full Code Here

        }
        return EnumSet.noneOf(PipelineActivityType.class);
    }

    private boolean isPreviousWsCall(ActivityConnection connection) {
        PipelineActivity a = connection.getFrom();
        return a != null && a.getType() == PipelineActivityType.WEBSERVICECALL;
    }
View Full Code Here

     * @return the optional second step in the <code>Transformation</code> chain.
     *         <code>null</code> is returned if the second transformation activity is missing or
     *         empty.
     */
    public Transformation getSecondTransformation() {
        PipelineActivity first = getFirstTransformationActivity();
        return getNextContent(first, PipelineActivityType.TRANSFORMATION, Transformation.class);
    }
View Full Code Here

     * @return the optional second step in the <code>Transformation</code> chain. <code>null</code>
     *         is returned if the second transformation activity is missing or empty.
     * @since 2.1.0        
     */
    public TransformationActivity getSecondTransformationActivity() {
        PipelineActivity first = getFirstTransformationActivity();
        return (TransformationActivity) getNextActivity(first, PipelineActivityType.TRANSFORMATION);
    }
View Full Code Here

    @Override
    public void checkRemovalAllowed(PipelineActivity activity) throws RemoveActivityVetoException {
        if (activity instanceof WebServiceCallActivity) {
            throw new RemoveActivityVetoException("The Web Service Call cannot be removed from a hosted web service operation");
        } else if (activity instanceof TransformationActivity) {
            PipelineActivity prev = pipeline.getPreviousActivity(activity);
            if (prev.getType() == PipelineActivityType.WEBSERVICECALL) {
                throw new RemoveActivityVetoException("The first Transformation cannot be removed");
            }
        }
    }
View Full Code Here

            throw new IllegalArgumentException("entry is not part of this pipeline");
        }
    }

    private WebServiceCall getWebServiceCall() {
        PipelineActivity a = pipeline.getFirstActivityOfType(PipelineActivityType.WEBSERVICECALL);
        if (a != null && !a.isEmpty()) {
            return (WebServiceCall) a.getContent();
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.entity.operation.pipeline.PipelineActivity

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.