Package org.jitterbit.util.version

Examples of org.jitterbit.util.version.Version


        return new JobImpl(projectName, rootDirectory);
    }

    private List<ProjectVersionHandler> getApplicableHandlers(String name, File rootDirectory)  {
        try {
            Version savedWith = getVersionSavedIn(name, rootDirectory);
            return factories.getHandlers(savedWith);
        } catch (IOException ex) {
            ErrorLog.log(ProjectVersionHandlerManager.class,
                            "Failed to retrieve the version the project was saved in: " + ex.getMessage(), ex);
        } catch (IllegalVersionException ex) {
View Full Code Here


            return null;
        }
    }

    private Class<? extends ProjectLoader> getLoaderClass(ManagedProject project) throws Exception {
        Version cutoff = VersionFactory.newVersion(2, 0, 0, 5);
        Class<?> clazz = null;
        if (project.getProjectFile().getVersionSavedWith().isEarlierThan(cutoff)) {
            clazz = Class.forName("org.jitterbit.integration.client.project.persistor.v10.InterchangeXmlReader");
        } else {
            clazz = Class.forName("org.jitterbit.integration.client.project.persistor.v20.ProjectLoaderImpl");
View Full Code Here

        }
       
        protected final ServerInfo restoreServerInfo(Persistor p) {
            String name = p.getString(SERVER_NAME);
            String id = p.getString(SERVER_ID);
            Version version = null;
            try {
                version = VersionFactory.fromString(p.getString(SERVER_VERSION));
            } catch (IllegalVersionException ex) {
                ex.printStackTrace();
                version = Version.UNKNOWN;
View Full Code Here

        return getOperationType().isSelectable();
    }

    @Override
    public Version getRequiredVersion() {
        Version def = super.getRequiredVersion();
        Version typeVersion = getOperationType().getVersionIntroduced();
        return typeVersion.isLaterThan(def) ? typeVersion : def;
    }
View Full Code Here

    private final class CategoryHandler implements StartElementHandler {

        @Override
        public void handleStart(KongaSaxParser parser) throws KongaSaxParserException {
            String name = getCategoryName(parser);
            Version since = getVersion(parser);
            functionFactory.newCategory(name, since);
        }
View Full Code Here

        }
        return comment;
    }

    private VersionInfo readVersionInfo(Properties data) throws IllegalDataFormatException {
        Version created = readVersion(data, CREATED_VERSION);
        Version required = readVersion(data, REQUIRED_VERSION);
        return new DefaultVersionInfo(created, required);
    }
View Full Code Here

    }
   
    public static synchronized void update(Map<String, String> keyValues) {
        String[] keys = { STABLE_SERVER, STABLE_CLIENT, LATEST_SERVER, LATEST_CLIENT };
        for (String key : keys) {
            Version v = readVersion(keyValues, key);
            if (v != null) {
                storage.putString(key, v.toString());
            }
        }
    }
View Full Code Here

        }
        return date;
    }

    private Version loadCurrentVersion() throws IllegalVersionException {
        Version v = readOriginalVersion();
        v = decorateVersionIfNeeded(v);
        return v;
    }
View Full Code Here

        public void available(PipelinePluginManifest manifest) {
            String name = manifest.getName();
            if (entries.containsKey(name)) {
                Entry e = entries.get(name);
                Version v = manifest.getVersion();
                if (v.isSameAsOrLaterThan(e.requiredVersion)) {
                    entries.remove(name);
                    return;
                } else if (e.availableVersion == null || v.isLaterThan(e.availableVersion)) {
                    e.availableVersion = v;
                }
            }
        }
View Full Code Here

                                                    throws ArchiveException, InvalidPasswordException {
        TrueZipUtils.unzip(jitterPack, destination, params.getPassword());
    }

    private void checkVersion(JitterPackDescriptor descriptor) throws UnsupportedVersionException {
        Version current = Versions.CURRENT;
        Version required = descriptor.getVersionInfo().minimumRequired();
        if (current.isEarlierThan(required)) {
            throw new UnsupportedVersionException(current, "This " + JitterPackConstants.SINGULAR + " must be opened "
                            + "in version " + required + " or later. The current version is " + current + ".");
        }
    }
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.