Package org.jitterbit.integration.data.persist

Examples of org.jitterbit.integration.data.persist.InterchangeSavingException


    @Override
    public void save(IntegrationEntity entity) throws InterchangeSavingException {
        writeToDisk = true;
        SaveEditorException e = savePageIfOpen(entity);
        if (e != null) {
            throw new InterchangeSavingException(e.getMessage(), e);
        }
        if (writeToDisk) {
            saveWorker.save(entity);
        }
    }
View Full Code Here


            if (rootDir.isDirectory()) {
                try {
                    // We need to delete everything under the root directory:
                    FileUtils.cleanDirectory(rootDir);
                } catch (IOException e) {
                    throw new InterchangeSavingException(
                                    "Failed to delete the old contents under the "
                                                    + "specified project directory "
                                                    + rootDir.getAbsolutePath() + ".");
                }
            }
            else {
                if (!rootDir.delete()) {
                    throw new InterchangeSavingException(
                                    "Failed to create the root directory for the "
                                                    + "new project because the parent directory contains a "
                                                    + "file having the same name that could not be deleted.");
                }
            }
        }

        if (!rootDir.isDirectory()) {
            if (!rootDir.mkdirs()) {
                throw new InterchangeSavingException("Failed to create the directory "
                                + rootDir.getAbsolutePath() + ".");
            }
        }
    }
View Full Code Here

        file.update(project);
        try {
            file.save();
        }
        catch (FileNotFoundException e) {
            throw new InterchangeSavingException(e);
        }
        catch (IOException e) {
            throw new InterchangeSavingException(e);
        }
    }
View Full Code Here

                entity.willBeSaved();
                entity.writeTo(xml);
                xml.store(getFile(entity));
                entity.setTransient(false);
            } catch (Exception ex) {
                throw new InterchangeSavingException("An error occurred while saving \"" + entity.getName() + "\" ["
                                + entity.getEntityType() + "]" + ": " + ex.getMessage(), ex);
            }
        }
    }
View Full Code Here

    private static class FailingToDiskPersistor implements ProjectPersistor {

        @Override
        public void save(IntegrationEntity entity) throws InterchangeSavingException {
            throw new InterchangeSavingException("I will always fail.");
        }
View Full Code Here

    public void savePluginInfo() throws InterchangeSavingException {
        try {
            PipelinePluginInfoWriter writer = new PipelinePluginInfoWriter(managedProject);
            writer.write();
        } catch (IOException ex) {
            throw new InterchangeSavingException(ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.data.persist.InterchangeSavingException

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.