Examples of Persistor


Examples of org.jitterbit.util.persist.Persistor

        }
    }

    private void persistItemRenames(Persistor p) {
        for (RenamedEntity r : renamedItems) {
            Persistor child = p.createChild(ITEM_RENAME);
            persistEntityId(r.getIntegrationId(), child);
            child.putString(OLD_NAME, r.getOldName());
            child.putString(NEW_NAME, r.getNewName());
        }
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        }
    }

    @Override
    public void restoreFrom(Persistor p) {
        Persistor segRoot = p.getFirstChild("Segment");
        if (segRoot == null) {
            throw new IllegalArgumentException("Invalid persistor: the Segment field is missing");
        }
        synchronized (getDataLock()) {
            super.restoreFrom(p);
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

            ErrorLog.log(BackupLog.class, "Failed to update the project backup log file", ex);
        }
    }

    private void writeEntry(XmlPersistor xml, Entry e) {
        Persistor child = xml.createChild(ENTRY);
        child.putString(FOLDER, e.folder.getAbsolutePath());
        child.putLong(TIME, e.time);
        child.putString(TYPE, e.type.name());
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        textStructure.writeTo(p.createChild("Structure"));
    }

    @Override
    protected void restoreAdditionalData(Persistor p) {
        Persistor delim = p.getFirstChild("Delimiter");
        if (delim != null) {
            setDelimiter(FieldDelimiter.fromPersistor(delim));
        } else {
            // If saved in versions 2.0.0.5 - 2.0.0.7, the persistor was saved as part of
            // the key-value pairs.
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

    }

    private void saveFields(Segment seg, Persistor media) {
        Iterable<Field> fields = seg.getFieldList();
        if (fields != null) {
            Persistor fieldRoot = media.createChild(FIELDS);
            FieldPersistor fieldPersistor = new FieldPersistor();
            for (Field f : fields) {
                fieldPersistor.save(f, fieldRoot.createChild(FIELD));
            }
        }
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        }
        return seg;
    }

    private List<Field> restoreFields(Persistor media) {
        Persistor fieldRoot = media.getFirstChild(FIELDS);
        if (fieldRoot == null) {
            return null;
        }
        List<Field> list = Lists.newArrayList();
        FieldPersistor loader = new FieldPersistor();
        for (Persistor p : fieldRoot.getChildren(FIELD)) {
           list.add(loader.restoreFrom(p));
        }
        return list;
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        operations.writeTo(parent.createChild("Operations"));
    }
   
    private void restoreOperations(Persistor root) {
        operations = new TriggeredOperations();
        Persistor opRoot = root.getFirstChild("Operations");
        if (opRoot != null) {
            operations.restoreFrom(opRoot);
        }
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

    public DeployOptionPreference(ManagedProject project) {
        this.project = project;
    }

    public void write(DeployOption option) {
        Persistor p = getStorage();
        p.putString(KEY, option.getId());
    }
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        Persistor p = getStorage();
        p.putString(KEY, option.getId());
    }

    public DeployOption read(DeployOption[] candidates) {
        Persistor p = getStorage();
        if (p != null) {
            String id = p.getString(KEY);
            if (id != null) {
                return findCandidateWithId(candidates, id);
            }
        }
        return null;
View Full Code Here

Examples of org.jitterbit.util.persist.Persistor

        return null;
    }

    private Persistor getStorage() {
        EntitySettings settings = project.getEntityResources().getSettings();
        Persistor p = settings.getClassSettings(EntityType.Project);
        return p;
    }
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.