Package org.jitterbit.application.filestore

Examples of org.jitterbit.application.filestore.FileStore


        updateLatestFile(file);
    }

    private void addNewFileToFileStore(File file) {
        try {
            FileStore files = delegate.getFiles();
            String path = delegate.getRootPath() + File.separator + file.getName();
            if (isFileFromFileStore(file, path)) {
                return;
            }
            FileCollisionResolver cr = FileCollisionResolver.REPLACE_EXISTING;
            if (ZipUtils.isLikelyZipped(file)) {
                files.addFile(file, path, cr);
            } else {
                byte[] compressedFile = ZipUtils.deflateFileContents(file);
                files.addFile(path, compressedFile, cr);
            }
        } catch (IOException e) {
            logStoreFileFailed(e);
        } catch (FileStoreException e) {
            logStoreFileFailed(e);
View Full Code Here


    /**
     * Checks if the file used in the Load Source comes from the project file store.
     * If it does we do not need to add it again.
     */
    private boolean isFileFromFileStore(File file, String fileStorePath) {
        FileStore files = delegate.getFiles();
        FileStoreFile existingFile = files.getFile(fileStorePath);
        return existingFile != null && existingFile.getPhysicalRepresentation().getAbsolutePath().equals(file.getAbsolutePath());
    }
View Full Code Here

    }

    private XsdFileStore getXsdFiles(EntityExplorerSupport explorer) {
        IntegrationProject project = explorer.getProject();
        ManagedProject mp = project.getExtensionObject(ManagedProject.class);
        FileStore fileStore = mp.getFileStore();
        return new XsdFileStore(fileStore);
    }
View Full Code Here

    }

    private XsdFileStore getXsdFiles(EntityExplorerSupport explorer) {
        IntegrationProject project = explorer.getProject();
        ManagedProject mp = project.getExtensionObject(ManagedProject.class);
        FileStore fileStore = mp.getFileStore();
        return new XsdFileStore(fileStore);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.application.filestore.FileStore

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.