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

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


                } finally {
                    KongaIoUtils.close(in);
                }
            }
        }
        throw new IllegalDataFormatException();
    }
View Full Code Here


    }

    private String readProjectName(Properties data) throws IllegalDataFormatException {
        String name = data.getProperty(PROJECT_NAME);
        if (name == null) {
            throw new IllegalDataFormatException(getErrorMessageHeader() + "The name field is missing.");
        }
        return name;
    }
View Full Code Here

    }

    private String readComment(Properties data) throws IllegalDataFormatException {
        String comment = data.getProperty(COMMENT);
        if (comment == null) {
            throw new IllegalDataFormatException(getErrorMessageHeader() + "The comment field is missing.");
        }
        return comment;
    }
View Full Code Here

    }

    private Date readCreatedDate(Properties data) throws IllegalDataFormatException {
        String dateString = data.getProperty(CREATED_AT);
        if (dateString == null) {
            throw new IllegalDataFormatException(getErrorMessageHeader() + "Creation date is missing.");
        }
        try {
            long date = Long.parseLong(dateString);
            return new Date(date);
        } catch (NumberFormatException e) {
            throw new IllegalDataFormatException(getErrorMessageHeader() + "Creation date is invalid.");
        }
    }
View Full Code Here

    }

    private Version readVersion(Properties data, String key) throws IllegalDataFormatException {
        String versionString = data.getProperty(key);
        if (versionString == null) {
            throw new IllegalDataFormatException(getErrorMessageHeader() + "Version information is missing.");
        }
        try {
            long versionNumber = Long.parseLong(versionString);
            return VersionFactory.fromNumber(versionNumber);
        } catch (NumberFormatException e) {
            throw new IllegalDataFormatException(getErrorMessageHeader() + "Version information is invalid.");
        } catch (IllegalVersionException e) {
            throw new IllegalDataFormatException(getErrorMessageHeader() + "Version information is invalid.");
        }
    }
View Full Code Here

                }
            }
        } else {
            return new V110_DescriptorDataFactory(headerFilename, password);
        }
        throw new IllegalDataFormatException();
    }
View Full Code Here

        for (Enumeration<? extends ZipEntry> entries = zipFile.entries(); entries.hasMoreElements();) {
            ZipEntry entry = entries.nextElement();
            File entryFile = new File(ZipUtils.getPlatformIndependentName(entry));
            return org.jitterbit.util.file.FileUtils.getRootFolder(entryFile).getName();
        }
        throw new IllegalDataFormatException(getErrorMessageHeader() + "Invalid file contents.");
    }
View Full Code Here

            File file = new File(entryName);
            if (file.getName().equals(headerFileName)) {
                return entry;
            }
        }
        throw new IllegalDataFormatException(getErrorMessageHeader() + "Missing header information.");
    }
View Full Code Here

TOP

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

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.