Package org.jitterbit.integration.data.entity

Examples of org.jitterbit.integration.data.entity.Script


        return getActivity().getContent();
    }

    @Override
    protected String getContentString() {
        Script script = getScript();
        return script != null ? script.getName() : getActivity().getRole();
    }
View Full Code Here


        return script != null ? script.getName() : getActivity().getRole();
    }

    @Override
    protected String getContentToolTip() {
        Script script = getScript();
        return (script != null) ? ToolTipStringFactory.getToolTip(script) : TOOLTIP_WHEN_EMPTY;
    }
View Full Code Here

    private ExpressionParser parser;

    @Before
    public void setup() {
        script = new Script("Test");
        parser = new ExpressionParser(script);
    }
View Full Code Here

    public void setup() {
        op = new Operation("op");
        source = new Source("source");
        tf = new Transformation("tf");
        target = new Target("target");
        script = new Script("script");
        opCalledFromScript = new Operation("opCalledFromScript");
        deps = new Dependencies();
        addLinks(op, script, source, tf, target);
        addLinks(script, opCalledFromScript);
    }
View Full Code Here

    }
   
    @Test
    public void ensureValidLinkCanBeCreated() {
        Operation op = new Operation("Op");
        Script script = new Script("Script");
        ScriptedLink link = new ScriptedLink(op, script);
        assertSame(op, link.getMainObject());
        assertSame(script, link.getDependantObject());
        assertSame(script, link.getLinkSource());
    }
View Full Code Here

        ScriptActivity empty = new ScriptActivity("Pre-Source");
        ScriptActivity emptyClone = empty.clone();
        assertNotSame(empty, emptyClone);
        assertEquals(empty, emptyClone);
        ScriptActivity filled = new ScriptActivity("Pre-Source");
        Script script = new Script("Script");
        filled.setContent(script);
        ScriptActivity filledClone = filled.clone();
        assertNotSame(filled, filledClone);
        assertEquals(filled, filledClone);
        assertSame(filled.getContent(), filledClone.getContent());
View Full Code Here

        dataElements = new DefaultGlobalDataElements();
        dataElements.scanProject(project);
    }

    private static Script createScript(String expr) {
        Script script = new Script("Test");
        script.setScript(ScriptConstants.wrapInTags(expr));
        return script;
    }
View Full Code Here

    }

    @Test
    public void ensureCreatingAndSavingInvalidScriptIsHandledGracefully() {
        // Test case for bug 2860335
        Script invalid = createScript("");
        project.insertEntityUnderRoot(invalid);
        dataElements.scanProject(project);
        invalid.setScript(ScriptConstants.wrapInTags("\"Unbalanced quotes"));
        dataElements.getAllDataElements();
    }
View Full Code Here

        OperationPipeline pipeline = TransformationOperationType.TYPE.createNewTemplate();
        ScriptActivity first = new ScriptActivity("First");
        pipeline.insertFirst(first);
        ScriptActivity last = new ScriptActivity("Last");
        pipeline.insertLast(last);
        Script script = new Script("Script");
        first.setContent(script);
        last.setContent(script);
        assertEquals(Arrays.asList(first, last), pipeline.getActivitiesFor(script));
        assertTrue(pipeline.getActivitiesFor(new Script("Unknown")).isEmpty());
    }
View Full Code Here

    }
   
    @Test
    public void ensurePopulatedActivityIsConsideredValid() {
        ScriptActivity a = (ScriptActivity) pipeline.getFirstActivity();
        a.setContent(new Script("Script"));
        validator.validate();
        collector.verify(ValidationStatus.VALID);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.entity.Script

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.