Examples of Persistor


Examples of org.jitterbit.util.persist.Persistor

            restoreAdditionalData(p);
        }
    }

    private void restoreHeader(Persistor p) {
        Persistor header = p.getFirstChild("Header");
        if (header == null) {
            throw new IllegalArgumentException("Invalid persistor: the Header element is missing");
        }
        String name = header.getString("Name");
        if (name == null) {
            throw new IllegalArgumentException("Invalid persistor: the Name field is missing");
        }
        try {
            setName(name);
        } catch (IllegalNameException shouldNotHappen) {
            shouldNotHappen.printStackTrace();
        }
        String id = header.getString("ID");
        if (id == null) {
            throw new IllegalArgumentException("Invalid persistor: the ID field is missing");
        }
        setID(entityType.getIntegrationId(id));
        setDescription(header.getText("Description"));
        hasBeenDeployed = header.getBoolean("Deployed");
        deployDirty = header.getBoolean("DeployDirty");
        hasMoved = header.getBoolean("HasMoved");
        setDeleted(header.getBoolean("Deleted"));
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

                // as this, we let this keep its old name
                if (EntityUtils.isNameUnique(this, other.getName())) {
                    setName(other.getName());
                }
                setDescription(other.getDescription());
                Persistor props = BinaryPersistor.newRoot("Properties");
                other.writeTo(props);
                // In case of a name conflict (see above):
                props.getFirstChild("Header").putString("Name", getName());
                restoreFrom(props);
                importAdditionalDataFrom(other);
            }
        }
        firePropertyChange(null, null, null);
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

                        outputLink = f.outputLink();
                    }

                    private void restoreExpansionState() {
                        try {
                            Persistor p = m_transformationSettings.getEntitySettings(m_Transformation);
                            NodeExpansionMemento memento = new NodeExpansionMemento(TreeMapper.this, p);
                            memento.restore();
                        } catch (Exception ex) {
                            ErrorLog.log(TreeMapper.class, "Failed to restore the node expansion state for the transformation \""
                                            + m_Transformation.getName(), ex);
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        ManagedProject project = getManagedProject();
        return project.getEntityResources().getSettings();
    }

    private void applyPreferredTextSize() {
        Persistor settings = m_transformationSettings.getClassSettings(EntityType.Transformation);
        Integer text_size = settings.getInteger("MappingTree.Zoom");
        if (text_size == null) {
            text_size = 11;
            settings.putInteger("MappingTree.Zoom", text_size);
        }
        if (!text_size.equals(m_textSize)) {
            updateFonts(text_size.intValue());
        }
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        }
        checkNotNull(mode, "mode");
        m_nodeExpansionMode = mode;
        m_sourceTreeComponent.xsdExpandMinimum=mode==NodeExpansionMode.MINIMAL;
        m_targetTreeComponent.xsdExpandMinimum=mode==NodeExpansionMode.MINIMAL;
        Persistor p = m_transformationSettings.getEntitySettings(m_Transformation);
        p.putString(NODE_EXPANSION_MODE_KEY, mode.name());
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

    public NodeExpansionMode getNodeExpansionMode() {
        return m_nodeExpansionMode;
    }

    private NodeExpansionMode getInitialExpansionMode() {
        Persistor p = m_transformationSettings.getEntitySettings(m_Transformation);
        String value = p.getString(NODE_EXPANSION_MODE_KEY);
        if (value != null) {
            try {
                return NodeExpansionMode.valueOf(value);
            } catch (RuntimeException ex) {
                // This can only happen if the settings file has become corrupt. Return the default.
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        NodeExpansionMemento expansion = new NodeExpansionMemento(this);
        expansion.persist(m_transformationSettings.getEntitySettings(m_Transformation));
    }

    private void saveMapDisplaySettings() {
        Persistor root = m_transformationSettings.getEntitySettings(m_Transformation);
        root.removeChildren("MapAreaDisplay");
        Persistor p = root.createChild("MapAreaDisplay");
        for (MapAreaDisplayOption o : mapAreaDisplay) {
            p.putBoolean(o.name(), Boolean.TRUE);
        }
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        return restoreBooleanSetting("ShowMappedNodesOnly", false);
    }

    private EnumSet<MapAreaDisplayOption> restoreMapDisplaySettings() {
        EnumSet<MapAreaDisplayOption> values = EnumSet.noneOf(MapAreaDisplayOption.class);
        Persistor p = m_transformationSettings.getEntitySettings(m_Transformation).getFirstChild("MapAreaDisplay");
        if (p != null) {
            for (MapAreaDisplayOption o : MapAreaDisplayOption.values()) {
                if (Boolean.TRUE.equals(p.getBoolean(o.name()))) {
                    values.add(o);
                }
            }
        } else {
            if (DrawAttributeMappingsPreference.value()) {
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        persistItemRenames(p);
    }

    private void persistGlobalWarnings(Persistor p) {
        for (String s : globalWarnings) {
            Persistor child = p.createChild(GLOBAL_WARNING);
            child.putString(VALUE, s);
        }
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        }
    }

    private void persistItemWarnings(Persistor p) {
        for (EntityWarning w : itemWarnings) {
            Persistor child = p.createChild(ITEM_WARNING);
            persistEntityId(w.getIntegrationEntityId(), child);
            child.putString(VALUE, w.getWarning());
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.