Package org.jitterbit.util.version

Examples of org.jitterbit.util.version.Version


        ErrorLog.log(getClass(), message, e);
    }

    private ServerInfo getServerInfo(AuthenticateResult res, LoginCredentials credentials) {
        ServerPlatform platform = getServerPlatform(res);
        Version version = getVersion(res.versionString());
        return new ServerInfo(res.serverGuid(), credentials.getServer(), version, platform);
    }
View Full Code Here


     * @throws IllegalVersionException
     *             if <tt>serverVersion</tt> cannot be converted into a valid Version instance.
     */
    void checkServerVersion(String serverName, String serverVersionString)
                                                throws UnsupportedVersionException, IllegalVersionException {
        Version serverVersion = VersionFactory.fromString(serverVersionString);
        if (serverVersion.isEarlierThan(FIRST_RELEASE)) {
            throwPre_1_0_Error(serverName, serverVersion);
        }
        if (serverVersion.isEarlierThan(requiredVersion)) {
            String msg = MessageFormat.format(
                            "The current version of the Jitterbit Integration Environment requires a minimum server version " +
                            "of {0}. The server {1} is running version {2}. All connections are refused.",
                            new Object[] { requiredVersion, serverName, serverVersion });
            throw new UnsupportedVersionException(serverVersion, msg);
View Full Code Here

        String versionString = getValue(PluginXmlConstants.PLUGIN_VERSION);
        if (versionString == null) {
            return null;
        }
        try {
            Version version = VersionFactory.fromString(versionString);
            return new PluginIdentifier(name, version);
        } catch (IllegalVersionException ex) {
            return null;
        }
    }
View Full Code Here

        PipelinePluginManifestLoaderFactory factory = getLoaderFactory(xml);
        return factory.newLoader();
    }

    private PipelinePluginManifestLoaderFactory getLoaderFactory(String xml) throws PluginSpecificationException {
        Version pluginSpecVersion = getPipelinePluginSpecVersion(xml);
        return PipelinePluginManifestLoaderFactory.getFactory(pluginSpecVersion);
    }
View Full Code Here

        Version pluginSpecVersion = getPipelinePluginSpecVersion(xml);
        return PipelinePluginManifestLoaderFactory.getFactory(pluginSpecVersion);
    }

    private Version getPipelinePluginSpecVersion(String xml) throws PluginSpecificationException {
        Version pluginSpecVersion = getPluginSpecVersion(xml);
        PipelinePluginSpecVersionExtractor extractor =
            PipelinePluginSpecVersionExtractor.getExtractor(pluginSpecVersion);
        return extractor.getVersion(xml);
    }
View Full Code Here

    private void setVersionSavedIn() {
        properties.setProperty(SAVED_IN_VERSION, Versions.CURRENT.toString());
    }

    private void setMinimumVersionRequired() {
        Version min = ApplicationConfiguration.getVersion("IntegrationProject.RequiredVersion", null);
        if (min == null) {
            // This means that the ApplicationConfiguration contains invalid data. If this happens
            // it is either because:
            // 1. A developer has entered an invalid version value in the properties file (i.e. a
            //    programming error)
            // 2. The user has edited the properties file (as shipped in the JAR file) and messed
            //    it up.
            // 3. The file has become corrupted somehow.
            // Not much to do here, other than to log the error and use the current client version
            // as the minimmum.
            ErrorLog.log(ProjectFile.class,
                    "Invalid or missing Minimum Version Required property in the ApplicationConfiguration", new Exception());
            min = Versions.CURRENT;
        }
        if (project != null) {
            Version requiredByProject = project.getRequiredVersion();
            if (requiredByProject.isLaterThan(min)) {
                min = requiredByProject;
            }
        }
        properties.setProperty(REQUIRES_VERSION, min.toString());
    }
View Full Code Here

     */
    public static PluginIdentifier getPluginId() {
        try {
            String name = ApplicationConfiguration.getString("EdiPlugin.Name",
                            "http://www.jitterbit.com/plugins/pipeline/user/EDIReader");
            Version version = ApplicationConfiguration.getVersion("EdiPlugin.Version", VersionFactory
                            .fromString("1.0.0-beta"));
            return new PluginIdentifier(name, version);
        } catch (IllegalVersionException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

        this.cutoff = cutoff;
    }

    @Override
    public boolean apply(ProjectLocation loc) {
        Version required = loc.getVersionRequired();
        return isUnkownVersion(required) || isCompatible(required);
    }
View Full Code Here

        checkPreReleaseVersion(projectName, projectFile);
    }

    private static void checkRequiredVersion(String projectName, ProjectFile projectFile)
                                                                    throws UnsupportedVersionException {
        Version required = projectFile.getMinimumVersionRequired();
        if (required.isLaterThan(Versions.CURRENT)) {
            String msg = "The project \"" + projectName + "\" requires version " + required + " or later of "
                    + ProductNames.CLIENT + ". You are " + "currently using version " + Versions.CURRENT + ".";
            throw new UnsupportedVersionException(required, msg);
        }
    }
View Full Code Here

        }
    }

    private static void checkPreReleaseVersion(String projectName, ProjectFile projectFile)
                                                                    throws UnsupportedVersionException {
        Version version = projectFile.getVersionCreatedIn();
        if (version.isEarlierThan(Versions.V_1_0_0)) {
            String msg = "'" + projectName + "' was created with a pre-release " + "version of the "
                    + ProductNames.CLIENT + ". It cannot "
                    + "be opened with this version.\n\nYou can try to open the project "
                    + "again, in a later release, since more backward compatibility may " + "be added.";
            throw new UnsupportedVersionException(version, msg);
View Full Code Here

TOP

Related Classes of org.jitterbit.util.version.Version

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.