Package org.jitterbit.integration.data.entity

Examples of org.jitterbit.integration.data.entity.Transformation$StructureListener


    public ChunkingOptionUi(ChunkingOption option, OperationPipeline pipeline) {
        activator = createActivator(option);
        valueField = createValueField(option);
        maxThreadsField = createMaxThreadsField(option);
        Transformation firstTf = getFirstTransformation(pipeline);
        sourceNodeField = createChunkNodeField(option.getSourceChunkNode(),
                        (firstTf != null ? firstTf.getInputStructure() : null), "Source chunk node:");
        selectSourceNodeAction = new SelectChunkNodeAction(firstTf, sourceNodeField, SourceTarget.Source);
        Transformation lastTf = getLastTransformation(pipeline);
        targetNodeField = createChunkNodeField(option.getTargetChunkNode(),
                        (lastTf != null ? lastTf.getOutputStructure() : null), "Target chunk node:");
        selectTargetNodeAction = new SelectChunkNodeAction(lastTf, targetNodeField, SourceTarget.Target);
        bindEnabling();
        setEnabled(option.isApplicableFor(pipeline));
    }
View Full Code Here


    public void setTransformation(Transformation tf) {
        if (tf == transformation) {
            return;
        }
        Transformation old = transformation;
        transformation = tf;
        targetFilter = (tf != null) ? new TargetFilter(tf) : EntityFilter.ACCEPT_ALL;
        changeSupport.firePropertyChange(TRANSFORMATION, old, tf);
        changeSupport.firePropertyChange(TARGET_FILTER, null, targetFilter);
        setSourceMessage(tf);
View Full Code Here

        }
    }

    private void checkTransformation(OperationPipeline pipeline) {
        TransformationPipelineBrowser browser = new TransformationPipelineBrowser(pipeline);
        Transformation tx = browser.getTransformation();
        if (tx != null) {
            if (tx.isXmlSourceEdi()) {
                Source s = browser.getSource();
                applyPluginToSourceOrTarget(s);
            }
            if (tx.isXmlTargetEdi()) {
                Target t = browser.getTarget();
                applyPluginToSourceOrTarget(t);
            }
        }
    }
View Full Code Here

        return ediPlugin;
    }

    private void checkWebServiceCall(OperationPipeline pipeline) {
        WebServicePipelineBrowser browser = new WebServicePipelineBrowser(pipeline);
        Transformation request = browser.getRequest();
        if (request != null && request.isXmlSourceEdi()) {
            Source s = browser.getSource();
            applyPluginToSourceOrTarget(s);
        }
        Transformation response = browser.getResponse();
        if (response != null && response.isXmlTargetEdi()) {
            Target t = browser.getTarget();
            applyPluginToSourceOrTarget(t);
        }
    }
View Full Code Here

        @Override
        public void testOperation(Operation op) {
            if (!isOperationTestable(op)) {
                return;
            }
            Transformation tx = getTransformationToTest(op);
            if (tx == null) {
                Alert.error("The operation \"" + op.getName() + "\" is incomplete and cannot be tested." ,
                                "Incomplete Operation");
                return;
            }
View Full Code Here

        }
        return Type.HIERARCHICAL;
    }

    private static DataStructure getStructure(TreeComponent tree) {
        Transformation tx = tree.getTreeMapper().getTransformation();
        if (tree instanceof TreeMapperTargetTree) {
            return tx.getOutputStructure();
        } else if (tree instanceof TreeMapperSourceTree || tree instanceof FormulaBuilderSourceTree) {
            return tx.getInputStructure();
        }
        throw new RuntimeException("Unsupported tree type: " + tree.getClass().getName());
    }
View Full Code Here

            impl.setTestOperationService(op);
            return impl;
        }

        private TransformationFileStore createFileStore(TransformationPage page) {
            Transformation tx = page.getObject();
            ManagedProject project = ProjectUtils.getManagedProject(tx);
            EntityResources resources = project.getEntityResources();
            return new TransformationFileStoreImpl(tx, resources);
        }
View Full Code Here

            if (canContinue(result)) {
                return true;
            }
            if (result.unknownFile) {
                // This is OK if the transformation does not take any input.
                Transformation tx = page.getObject();
                DataStructure input = tx.getInputStructure();
                return input instanceof NoStructure;
            }
            return false;
        }
View Full Code Here

    }

    private Transformation createTransformation() {
        Folder parent = getTransformationParent();
        String name = EntityUtils.getAvailableChildName(parent, wizardName);
        Transformation tx = new Transformation(name);
        S input = pages.getSourceStructure();
        T output = pages.getTargetStructure();
        tx.setInputStructure(input);
        tx.setOutputStructure(output);
        doAdditionalConfiguration(tx, input, output);
        project.insertEntity(tx, parent);
        return tx;
    }
View Full Code Here

        assertTrue(runOpIds.contains(opId));
    }
   
    @Test
    public void ensureGetAllIdsFromTransformationWorks() {
        Transformation tf = new Transformation("Test");
        tf.setMapList(Arrays.asList("A\t" + ScriptConstants.wrapInTags(expression + ";1")));
        IntegrationEntityMapLookup lookup = new IntegrationEntityMapLookup();
        lookup.addItem(tf);
        verifyAllIdsWereDetected(GrammarUtils.getAllIdsFromTransformation(lookup, tf.getID()));
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.entity.Transformation$StructureListener

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.