Package org.jitterbit.integration.client.project.jitterpack

Examples of org.jitterbit.integration.client.project.jitterpack.JitterPackException


    private static JitterPackFormat getPackFormat(Version v, JitterPackParameters params) throws JitterPackException {
        try {
            return JitterPackFormatFactory.getFormat(v, params);
        } catch (UnsupportedVersionException ex) {
            // This can only happen if the integration.properties are messed up.
            throw new JitterPackException("Failed to create the " + JitterPackConstants.SINGULAR
                            + " due to an application configuration "
                            + "error. Please contact Please contact jitterbit support: " + "www.jitterbit.com", ex);
        }
    }
View Full Code Here


            // into the extractDescriptor() method. The current implementation checks if the file is encrypted
            // again (see V110_DescriptorDataFactory), which is unnecessary.
            JitterPackFormat format = JitterPackUtils.getPackFormat(params);
            return format.extractDescriptor(file);
        } catch (IOException ex) {
            throw new JitterPackException("An IO error occurred: " + ex.getMessage(), ex);
        } catch (InvalidPasswordException ex) {
            throw new JitterPackException(ex.getMessage(), ex);
        }
    }
View Full Code Here

                oldProjectFile.setNewName(newName);
                FileUtils.copyDirectory(oldProjectFile.getParentFolder(), newLocation);
                locationOfUnpackedProject = newLocation;
                return newName;
            } catch (IOException e) {
                throw new JitterPackException("Could not rename the unpacked project: " + e.getMessage(), e);
            }
        }
View Full Code Here

            try {
                closeUnpackedProject();
                copyProject(projectName);
                return projectManager.loadProject(projectName, new File(destinationFolder, locationOfUnpackedProject.getName()), ProjectLoadingIssuesHandler.IGNORE);
            } catch (Exception e) {
                throw new JitterPackException("An error occurred when generating new GUIDs for the imported project.", e);
            }
        }
View Full Code Here

            JitterPackDescriptor descriptor = createDescriptorForWriting(project, comment);
            header.write(descriptor, projectFolder);
            zipProject(projectFolder, target);
            return new JitterPack(target, descriptor);
        } catch (KongaZipException ex) {
            throw new JitterPackException("An error occurred: " + ex.getMessage(), ex);
        } catch (IOException ex) {
            throw new JitterPackException("An IO error occurred: " + ex.getMessage(), ex);
        }
    }
View Full Code Here

    public IntegrationProject unpack(JitterPack jitterpack, JitterPackDescriptor descriptor, File destinationFolder,
                    ImportParameters params, ProjectLoadingIssuesHandler issuesHandler) throws JitterPackException,
                    UnsupportedVersionException, ProjectLoadingCancelledException {
        logUnpackRequest(jitterpack, destinationFolder);
        if (descriptor.isEncrypted() && params.getPassword() == null) {
            throw new JitterPackException("This Jitterpak is encrypted. Please provide the correct password.");
        }
        JitterPackFormat format = JitterPackUtils.getPackFormat(descriptor, params);
        ProjectDescriptor projectDescriptor = format.unpack(jitterpack.getFile(), destinationFolder);
        return loadProject(projectDescriptor, issuesHandler, params.createNewGUIDsWhenImporting(), descriptor.isPackedProjectReadOnly());
    }
View Full Code Here

        }
        return null;
    }
   
    private void handleProjectLoadingException(Exception ex) throws JitterPackException {
        JitterPackException jex = new JitterPackException("Failed to load the unpacked project.", ex);
        logLoadProjectException(jex);
        throw jex;
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.client.project.jitterpack.JitterPackException

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.