Package org.jitterbit.integration.filetransfer.client

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


      String[] missingDependencies = uploadResult.getMissingWsdlFiles();

            List<ServerFile> existingDependenciesList = Lists.newArrayList();
            if( existingDependencies != null && existingDependencies.length > 0 ) {
              for( CWsdlFile existingDep : existingDependencies ) {
                ServerFile file = ServerFile.fromPathAndHash(existingDep.getWsdlLocator(), existingDep.getMD5());
                existingDependenciesList.add(file);
              }
            }
      ServerInfo server = new ServerInfo(serverId, serverName);
      ServerFile uploadedFile = ServerFile.fromPathAndCompressedContents(wsdlLocator, md5, compressedBase64contents);
      ServerFileUploadResult result = new ServerFileUploadResult(server, uploadedFile, missingDependencies, existingDependenciesList);
      callback.fileWasUploaded(result);
    }
        catch (RemoteException e) {
            callback.caught(convert(e));
View Full Code Here


                    ServerFileFolder folder = folderMap.get(folderPath);
                    if (folder == null) {
                        folder = new ServerFileFolder(folderPath);
                        folderMap.put(folderPath, folder);
                    }
                    ServerFile structureFile = ServerFile.fromPathAndHash(parts[1], file.getMD5());
                    structureFile.setLastModified(file.getModifiedTime());
                    folder.addFile(structureFile);
                }
            }
            int nFolders = folderMap.size();
            ServerFileFolder[] returnFolders = new ServerFileFolder[nFolders];
View Full Code Here

            // This releases the file contents
            sEncodedContents = null;
            inputFile = null;

            CXmlStructureFile resultFile = uploadResult.getXmlStructureFile();
            ServerFile structureFile = ServerFile.fromPathAndHash(resultFile.getPath(), sMD5);

            List<ServerFile> existingDependencies = Lists.newArrayList();
            if (uploadResult.getExistingDependencies() != null) {
                for (CXmlStructureFile dep : uploadResult.getExistingDependencies()) {
                    existingDependencies.add(ServerFile.fromPathAndHash(dep.getPath(), dep.getMD5()));
View Full Code Here

    public final synchronized void abort() {
        cancelled();
    }

    private void notifyClientOnSuccess() {
        ServerFile mainFile = uploadedFiles.get(firstFile);
        client.uploadComplete(serverInfo, mainFile, uploadedFiles.values().toArray(new ServerFile[uploadedFiles.size()]));
    }
View Full Code Here

    private boolean doesFileAlreadyExistOnServer(ServerFileFolder[] serverFolders) {
        String localHash = DigestUtils.getMd5DigestAsHexString(model.getContent());
        String path = model.getFileName();
        for (ServerFileFolder folder : serverFolders) {
            ServerFile file = folder.getFile(path);
            if (file != null) {
                String serverHash = file.getMD5();
                if (localHash.equals(serverHash)) {
                    return true;
                }
            }
        }
View Full Code Here

   
    private void addToListOfDownloadedFiles(ServerInfo server, String path, String content) {
        if (files == null) {
            files = new DownloadedFiles(server);
        }
        ServerFile file = ServerFile.fromPathAndContents(path, content);
        files.addFile(file);
    }
View Full Code Here

    public List<ServerFile> findConflicts(CreateXsdResult createdXsds, List<ServerFile> existingXsds) {
        List<ServerFile> conflicts = Lists.newArrayList();
        if (existingXsds != null && !existingXsds.isEmpty()) {
            Map<String, ServerFile> existingFilesMap = toMap(existingXsds);
            for (File f : createdXsds.getXsds().getAllFiles()) {
                ServerFile e = existingFilesMap.get(f.getName());
                if (e != null && !areIdentical(f, e)) {
                    conflicts.add(e);
                }
            }
        }
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.