Package org.jitterbit.application.cache

Examples of org.jitterbit.application.cache.DataCacheException


    protected final File createFile() throws DataCacheException {
        // TODO: Do this here? Or wait until we actually create the file on
        // disk and try to write to it?
        if (parentDirectory.exists() && !parentDirectory.isDirectory()) {
            throw new DataCacheException("The specified parent directory is not a directory: " +
                    parentDirectory.getAbsolutePath());
        }
        if (!parentDirectory.exists() && !parentDirectory.mkdirs()) {
            throw new DataCacheException("Failed to create the specified parent directory: " +
                    parentDirectory.getAbsolutePath());
        }
        return new File(parentDirectory, getFileName());
    }
View Full Code Here


            String fileName = id + prefix + ".gz";
            zip = new GZIPOutputStream(new BufferedOutputStream(new FileOutputStream(folder.getFile(fileName))));
            zipStreamPrepared = true;
            return new OutputStreamWriter(zip);
        } catch (IOException ex) {
            throw new DataCacheException(ex);
        } finally {
            if (!zipStreamPrepared) {
                KongaIoUtils.close(zip);
            }
        }
View Full Code Here

            String extension = getFileExtension(originalFile);
            File copy = folder.getFile(newId + prefix + extension);
            try {
                FileUtils.copyFile(originalFile, copy);
            } catch (IOException ex) {
                throw new DataCacheException(ex);
            }
        }
    }
View Full Code Here

            try {
                Collection<DriverDescriptor> drivers = readFromFile(file);
                setDrivers(drivers);
                hasBeenLoaded = true;
            } catch (IOException ex) {
                throw new DataCacheException(DatabaseMessages.getString("DatabaseDriverCache.LoadingError"), ex);
            }
        }
    }
View Full Code Here

                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

                cachedManifests.put(d.getName(), d);
            }
            doDiskRead = false;
            return manifests;
        } catch (PluginSpecificationException ex) {
            throw new DataCacheException("Failed to read the cached plugin manifests. ", ex);
        }
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.application.cache.DataCacheException

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.