Package org.jitterbit.integration.filetransfer.client

Examples of org.jitterbit.integration.filetransfer.client.ServerFile


    public boolean isSampleFileMode() {
        return model.getInputMode() == FileInputMode.FROM_SAMPLE_FILE;
    }

    public final String[] getAvailableRoots() {
        ServerFile file = getSelectedFile();
        return rootElementManager.getRoots(file);
    }
View Full Code Here


    public void applyTo(XmlStructure structure) {
        if (isSampleFileMode()) {
            // The structure is populated on the next page.
            return;
        }
        ServerFile file = getSelectedFile();
        structure.setFilePath(file.getFilePath());
        String[] roots = getAvailableRoots();
        if ((roots != null) && (roots.length == 1)) {
            structure.setRootNodeName(roots[0]);
        }
    }
View Full Code Here

    public boolean prepareForForwardNavigation() {
        if (isSampleFileMode()) {
            return true;
        }
        if (doFileTransfer()) {
            ServerFile file = getSelectedFile();
            if (!rootElementManager.isCached(file)) {
                rootElementManager.retrieveRootNames(file);
            }
            return true;
        }
View Full Code Here

        assert !isSampleFileMode();
        if (isLocalMode()) {
            File file = model.getLocalFile();
            return structureFileManager.doUpload(file);
        } else {
            ServerFile file = model.getSelectedServerFile();
            return structureFileManager.downloadStructureFile(file);
        }
    }
View Full Code Here

    private boolean uploadStructureFile(String filePath) {
        abortUploadInProgress();
        boolean success = executeUpload(filePath, null);
        if (success) {
            ServerFile structFile = uploadManager.getMainFile();
            onFileUploaded(filePath, structFile);
        }
        return success;
    }
View Full Code Here

   
    private final class WsdlDownloader implements FileDownloadClient {

        public void download(String locator) {
            // TODO: Add getServerFile() to WsdlFile
            ServerFile toDownload = ServerFile.fromPath(getWsdlFile().getLocator());
            FileDownloadManager downloader = new FileDownloadManager(this);
            downloader.download(toDownload);
        }
View Full Code Here

        ErrorLog.attention(XsdUploadClient.class, th.getMessage(), th);
    }

    @Override
    public synchronized boolean isFileClearedForUpload(File f) {
        ServerFile existingFile = lookupExistingFile(folder, f.getName());
        if ((existingFile == null) || isIdenticalContent(existingFile, f)) {
            return true;
        }
        return askPermissionToOverwriteExistingFile(f);
    }
View Full Code Here

    public List<ServerFile> getAvailableFiles() {
        return availableFiles.get();
    }

    public void setAvailableFiles(ServerFileFolder[] folders) {
        ServerFile oldSelection = getSelectedServerFile();
        setSelectedServerFile(null);
        List<ServerFile> files = applyServerFileFilter(folders);
        availableFiles.set(files);
        if (oldSelection != null) {
            restoreOldSelection(oldSelection, files);
View Full Code Here

        this.sourceTarget = sourceTarget;
    }
   
    public XmlStructureWizardPage getNextPage() {
        assert !startPage.isSampleFileMode();
        ServerFile selectedFile = startPage.getSelectedFile();
        XmlStructureWizardPage page = getCachedNextPage(selectedFile);
        if (page == null) {
            String[] roots = startPage.getAvailableRoots();
            page = createNextPage(roots);
            nextPageCache.put(selectedFile, page);
View Full Code Here

        }
        return downloadSelectedFile();
    }

    private boolean downloadSelectedFile() {
        ServerFile file = model.getSelectedServerFile();
        return structureFileManager.downloadStructureFile(file);
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.filetransfer.client.ServerFile

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.