Package org.jitterbit.integration.structure.mapping

Examples of org.jitterbit.integration.structure.mapping.NodePath


        String pattern = "if(IsNull({0}), {0} = {1});\n{0}[SourceInstanceCount() - 1]";
        return MessageFormat.format(pattern, deName, path);
    }

    private String constructArrayDataElementName(Node node) {
        NodePath path = new NodePath(node.m_deName);
        String leaf = path.getLeafName();
        String deName = "$jitterbit.connect.upsert." + leaf;
        if (!leaf.endsWith("s")) {
            deName += "s";
        }
        return deName;
View Full Code Here


        Mapping m = MappingFactory.newMapping(targetPath, expression);
        return newMapping(m);
    }
   
    public NodeMapping newMapping(String targetPath, String expression) {
        return newMapping(new NodePath(targetPath), expression);
    }
View Full Code Here

    public String getTranslatedExpression(ExpressionTranslator translator) {
        return translator.toDisplay(getExpression());
    }

    public void setNewExpression(String expression) {
        NodePath targetPath = getTargetPath();
        mapping = MappingFactory.newMapping(targetPath, expression);
    }
View Full Code Here

        Node node = finder.findNode(pathFragment);
        if (node != null) {
            if (node.isFolder()) {
                Alert.error("You cannot map a target folder node.", "Not Allowed");
            } else {
                page.showMapping(new NodePath(node.m_deName));
            }
        }
    }
View Full Code Here

    }

    @Override
    protected void handleDeleteRequest(Node node) {
        if (m_gotFocus && node != null && m_TreeMapper.getMappingManager().hasMappings()) {
             m_TreeMapper.deleteMapping(new NodePath(node.m_deName));
             if(node.isPrecondition() && !node.isTargetMapped()) {
                 Answer a = Ask.yesOrNo("The condition expression has been removed. Do you also want to delete the condition node itself?",
                                 "Remove Condition Node?");
                 if (a.isYes()) {
                   node.m_parent.deletePreCondition();
View Full Code Here

    private void removeMapping(Node targetNode) {
        if (targetNode.isFolder()) {
            page.getTreeMapper().deleteAllMappings(targetNode);
        } else {
            page.getTreeMapper().deleteMapping(new NodePath(targetNode.m_deName));
        }
    }
View Full Code Here

        this.treeMapper = treeMapper;
        this.sourceTreeFactory = sourceTreeFactory;
        sourceDEs = new SourceTreeDataElementContainer(treeMapper.m_sourceTreeComponent);
        sourceTree = sourceTreeFactory.newSourceTree();
        sourceTreeLayout = layoutSourceTree();
        exprSource = new TransformationExpressionSource(treeMapper.getTransformation(), new NodePath(targetDE));
        scriptModel = createScriptBuilderModel(project);
        Node target=treeMapper.findTargetNode(targetDE);
        scriptBuilder = createScriptBuilder(project, modeSelector, target, expression);
        expressionParser = createExpressionParser();
        expressionScanner = createExpressionScanner();
View Full Code Here

        return null;
    }

    private void deleteMappedPreCondition(NodeMapping mp) {
        TreeMapper treemapper = mp.getTreeMapper();
        NodePath targetPath = mp.getTargetPath();
        Node targetNode = treemapper.findTargetNode(targetPath);
        Node parentNode = targetNode.m_parent;
        treemapper.getMappingManager().deleteMapping(mp);
        treemapper.updateMapAreaTables(targetPath.toString(), null);
        Node precon = parentNode.getPrecondition();
        try {
            precon.updateMappingKits("");
        } catch (Exception e) {
            e.printStackTrace();
View Full Code Here

        TreeMapper treemapper = getTreeMapper();
        if (anyChildUsed()) {
            removeEntireMappedFolder();
            treemapper.updateMappingFlag();
        } else {
            if (treemapper.getMappingManager().deleteMapping(new NodePath(m_deName))) {
                treemapper.updateMappingFlag();
                treemapper.updateMapAreaTables(m_deName, null);
            }
            m_TreeComponent.setDirty();
        }
View Full Code Here

    private void removeEntireMappedFolder() {
        if (getTreeMapper() == null) {
            return;
        }
        if (getTreeMapper().deleteMapping(new NodePath(m_deName))) {
            getTreeMapper().updateMapAreaTables(m_deName, null);
        }
        for (Node node : m_children) {
            if (!node.isFolder() && node.isTargetMapped()) {
                getTreeMapper().deleteMapping(new NodePath(node.m_deName));
                getTreeMapper().updateMapAreaTables(node.m_deName, null);
                node.updateMappingKits("");
            } else if (node.isFolder()) {
                node.removeEntireMappedFolder();
            }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.structure.mapping.NodePath

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.