Package org.jitterbit.util.persist

Examples of org.jitterbit.util.persist.XmlPersistor.createChild()


    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


    public void testSaveAndLoad() {
        LdapStructureEntryPersistor toTest = new LdapStructureEntryPersistor();
        XmlPersistor xml = XmlPersistor.newRoot("Test");
        LdapStructureEntry[] entries = createEntries();
        for (LdapStructureEntry e : entries) {
            Persistor p = xml.createChild("Entry");
            toTest.writeTo(e, p);
        }
        if (PRINT_XML) {
            xml.printToConsole();
        }
View Full Code Here

    public void testSaveAndLoad() {
        LdapSearchParametersPersistor toTest = new LdapSearchParametersPersistor();
        XmlPersistor xml = XmlPersistor.newRoot("Test");
        LdapSearchParameters[] entries = createSearchParams();
        for (LdapSearchParameters e : entries) {
            Persistor p = xml.createChild("Params");
            toTest.writeTo(e, p);
        }
        if (PRINT_XML) {
            xml.printToConsole();
        }
View Full Code Here

        }

        private XmlPersistor persistProject(IntegrationProject project) {
            XmlPersistor root = XmlPersistor.newRoot("project");
            storeNameAndId(project, root);
            Persistor operations = root.createChild(OPERATIONS);
            addItems(project, operations, EntityType.Operation);
            Persistor schedules = root.createChild(SCHEDULES);
            addItems(project, schedules, EntityType.Schedule);
            return root;
        }
View Full Code Here

        private XmlPersistor persistProject(IntegrationProject project) {
            XmlPersistor root = XmlPersistor.newRoot("project");
            storeNameAndId(project, root);
            Persistor operations = root.createChild(OPERATIONS);
            addItems(project, operations, EntityType.Operation);
            Persistor schedules = root.createChild(SCHEDULES);
            addItems(project, schedules, EntityType.Schedule);
            return root;
        }

        private static void storeNameAndId(IntegrationEntity e, Persistor p) {
View Full Code Here

    @Override
    public synchronized Persistor getClassSettings(EntityType type) {
        XmlPersistor root = getRoot(type);
        Persistor p = root.getFirstChild(CLASS_SETTINGS);
        if (p == null) {
            p = root.createChild(CLASS_SETTINGS);
        }
        return p;
    }

    private XmlPersistor getRoot(EntityType type) {
View Full Code Here

    public synchronized Persistor getEntitySettings(IntegrationEntity entity) {
        XmlPersistor root = getRoot(entity.getEntityType());
        String name = getNameOfEntityPersistor(entity);
        Persistor p = root.getFirstChild(name);
        if (p == null) {
            p = root.createChild(name);
        }
        return p;
    }

    private static String getNameOfEntityPersistor(IntegrationEntity entity) {
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.