Package org.jitterbit.application.filestore

Examples of org.jitterbit.application.filestore.FileCollisionResolver


            return;
        }
        try {
            WsdlFileStore wsdlFiles = wizard.getFileStore();
            String filePath = parsedInfo.getWSDLFile();
            FileCollisionResolver collisionResolver = getFileCollisionResolver(wizard.getWindow());
            wsdlFiles.add(file.getLocator(), filePath, collisionResolver);
        } catch (IOException e) {
            onFileStorageFailed(e);
        } catch (FileStoreException e) {
            onFileStorageFailed(e);
View Full Code Here


            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);
View Full Code Here

    public static void main(String[] args) throws Exception {
        DefaultFileStore store = new DefaultFileStore(new File("C:\\project\\temp\\myFileStore")); //$NON-NLS-1$
        store.deleteAll(false);
        store = new DefaultFileStore(new File("C:\\project\\temp\\myFileStore"));
        FileCollisionResolver resolver = new FileCollisionResolverImpl(null);
        store.report(System.out);
        store.addFile("abc\\123\\nisse.txt", "hihi", resolver);
        store.addFile("abc\\123\\nisse2.txt", "hihi2", resolver); //$NON-NLS-1$ //$NON-NLS-2$
        store.addFile("abc\\123\\nisse.txt", "hihi3", resolver);
        store.deleteAll(false);
View Full Code Here

        }
    }

    private void addFileToFileStore(String contents, String filePath, String parentPath) throws FileStoreException {
        // TODO: Use a prompting resolver. Need the ApplicationWindow to provide parent JFrame
        FileCollisionResolver collisionResolver = FileCollisionResolver.REPLACE_EXISTING;
        client.getFileStore().addFile(filePath, contents, collisionResolver);
        if (parentPath != null) {
            client.getFileStore().addDependency(parentPath, filePath);
        }
    }
View Full Code Here

TOP

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

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.