Examples of Persistor


Examples of org.jitterbit.util.persist.Persistor

    public void writeTo(Persistor p) {
        p.putString(OPERATION_ID, operationId.toString());
        p.putBoolean(COLLAPSED, collapsed);
        PersistUtils.writeBounds(p.createChild(OP_NODE_BOUNDS), opNodeBounds);
        for (Map.Entry<PipelineActivityPosition, Rectangle> e : activityBounds.entrySet()) {
            Persistor part = p.createChild(ACTIVITY_NODE);
            part.putString(POSITION, e.getKey().toString());
            PersistUtils.writeBounds(part, e.getValue());
        }
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        nodeBounds.put(id, new Rectangle(r));
    }
   
    public void writeTo(Persistor p) {
        for (Map.Entry<EmailMessageId, Rectangle> e : nodeBounds.entrySet()) {
            Persistor child = p.createChild(EMAIL);
            child.putString(EMAIL_ID, e.getKey().toString());
            PersistUtils.writeBounds(child, e.getValue());
        }
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

            this();
            try {
                Map<OperationType, OperationNodeLayoutMemento> restored = Maps.newHashMap();
                for (Persistor typeRoot : p.getChildren(TYPE)) {
                    OperationType type = OperationType.valueOf(typeRoot.getString(NAME));
                    Persistor mementoRoot = typeRoot.getFirstChild(MEMENTO);
                    OperationNodeLayoutMemento memento = new OperationNodeLayoutMemento(mementoRoot);
                    restored.put(type, memento);
                }
                this.mementos.putAll(restored);
            } catch (RuntimeException ex) {
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

            return mementos.get(pipeline.getType());
        }
       
        public void writeTo(Persistor p) {
            for (Map.Entry<OperationType, OperationNodeLayoutMemento> e : mementos.entrySet()) {
                Persistor type = p.createChild(TYPE);
                type.putString(NAME, e.getKey().name());
                Persistor memento = type.createChild(MEMENTO);
                e.getValue().writeTo(memento);
            }
        }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

    public static void save(final StringKeyValuePairs pairs, final Persistor p, final Set<String> skip) {
        for (String key : pairs.getKeys()) {
            if (skip != null && skip.contains(key)) {
                continue;
            }
            Persistor item = p.createChild(ITEM);
            item.putString(KEY, key);
            String value = pairs.get(key);
            if (value != null) {
                item.putString(VALUE, value);
            }
        }
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

            ErrorLog.attention(OperationGraphPanel.class, "Failed to store the graph layout.", ex);
        }
    }

    private void saveZoomLevel(OperationGraph2D graph) {
        Persistor p = getOperationSettings(graph);
        p.putDouble(OperationGraphPanel.ZOOM_KEY, graph.getZoomLevel());
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

    private static void log(String msg) {
        IntegrationEntityPageLog.LOG.info(msg);
    }

    private void restoreZoomLevel(OperationGraph2D graph) {
        Persistor p = getOperationSettings();
        Double zoom = p.getDouble(OperationGraphPanel.ZOOM_KEY);
        if (zoom != null) {
            try {
                graph.setZoomLevel(zoom.doubleValue());
            } catch (RuntimeException ex) {
                // Guarding against the case where the settings file has been tempered with or
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

            persistStackTraceElement(ste, p);
        }
    }

    private void persistStackTraceElement(StackTraceElement ste, Persistor p) {
        Persistor child = p.createChild(STACK_TRACE_ELEMENT);
        child.putString(STACKTRACE_CLASSNAME, ste.getClassName());
        child.putString(METHOD, ste.getMethodName());
        child.putString(FILENAME, ste.getFileName());
        child.putInteger(LINENUMBER, ste.getLineNumber());
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

    private void store() throws DataCacheException {
        try {
            File file = createFile();
            XmlPersistor persistor = XmlPersistor.newRoot("Drivers");
            for (DriverDescriptor d : driverDescriptors) {
                Persistor driverPersistor = persistor.createChild("Driver");
                DriverDescriptorPersistor.persist(d, driverPersistor);
            }
            persistor.store(file);
        } catch (Exception ex) {
            throw new DataCacheException(DatabaseMessages.getString("DatabaseDriverCache.StoringError"), ex);
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

    protected void writeAdditionalData(Persistor p) {
        // Default does nothing
    }

    private void writeHeader(Persistor p) {
        Persistor header = p.createChild("Header");
        header.putString("Name", getName());
        header.putText("Description", getDescription());
        header.putString("ID", getID().toString());
        header.putBoolean("Deployed", hasBeenDeployed);
        header.putBoolean("DeployDirty", deployDirty);
        header.putBoolean("HasMoved", hasMoved);
        header.putBoolean("Deleted", isDeleted());
    }
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.