Package org.jitterbit.integration.client.plugin.pipeline.cache

Examples of org.jitterbit.integration.client.plugin.pipeline.cache.PipelinePluginManifestCache


        // This plugin store cannot be modified
    }

    private PipelinePluginManifest[] getCachedManifests(ServerGuid serverId) {
        try {
            PipelinePluginManifestCache cache = getCache(serverId);
            if (cache != null) {
                return cache.getCachedManifests();
            }
        } catch (DataCacheException ex) {
            ex.printStackTrace();
        }
        return new PipelinePluginManifest[0];
View Full Code Here


            }
        }
    }

    private void restoreMissingManifests(Set<String> pluginNames) {
        PipelinePluginManifestCache projectCache = projectPlugins.getManifestCache();
        for (String name : pluginNames) {
            if (isMissing(name)) {
                MissingPluginManifest missing = new MissingPluginManifest(name, projectCache);
                missing.setLogger(logger);
                missing.restore(serverCache, knownServers);
View Full Code Here

        }
    }

    private boolean isMissing(String pluginName) {
        try {
            PipelinePluginManifestCache projectCache = projectPlugins.getManifestCache();
            PipelinePluginManifest manifest = projectCache.getCachedManifest(pluginName);
            if (manifest != null) {
                return false;
            }
        } catch (DataCacheException e) {
            logger.info("Error from cache: " + e.getMessage());
View Full Code Here

                    Function<AppliedPipelinePlugin, PipelinePluginManifestCache> cacheLookup) throws Exception {
        try {
            IntegrationProjectLock.acquire();
            appliedPlugins.setAssociations(entity, plugins);
            for (AppliedPipelinePlugin plugin : plugins) {
                PipelinePluginManifestCache cache = cacheLookup.apply(plugin);
                if (cache == null) {
                    // TODO: Handle this
                    continue;
                }
                addManifestToCache(plugin, cache);
View Full Code Here

        this.logger = logger;
    }

    public void restore(PipelinePluginManifestServerCache serverCache, List<KnownServer> knownServers) {
        for (KnownServer server : knownServers) {
            PipelinePluginManifestCache cache = serverCache.getCache(server.getServerInfo().getGuid());
            try {
                PipelinePluginManifest manifest = cache.getCachedManifest(pluginName);
                if (manifest != null) {
                    projectCache.add(Arrays.asList(manifest));
                    logger.info("The manifest for the plugin " + pluginName + " was found in the cache for server "
                                    + server.getServerInfo().getName());
                    return;
View Full Code Here

    @Override
    public void selectedPositions(List<PipelinePosition> positions) {
        List<SelectedPosition> res = Lists.newArrayList();
        for (PipelinePosition p : positions) {
            PipelinePluginManifestCache cache = model.getManifestCache(p.getPluginId());
            if (cache == null) {
                throw new RuntimeException("Could not find the manifest cache for the plugin " + p.getPluginId());
            }
            res.add(new SelectedPosition(p, cache));
        }
View Full Code Here

    private class ViewDetailsAction extends ViewPipelinePluginInfoAction {

        @Override
        protected PipelinePluginManifestCache getManifestCache(PluginIdentifier pluginId) {
            PipelinePluginManifestCache cache = model.getManifestCache(pluginId);
            if (cache == null) {
                cache = pluginSelector.getModel().getManifestCache(pluginId);
            }
            return cache;
        }
View Full Code Here

    public AppliedPipelinePluginsModel(ProjectPluginInfo projectPlugins, IntegrationEntity entity) {
        this.plugins = Maps.newHashMap();
        this.entity = entity;
        AppliedPipelinePluginStore entityPlugins = projectPlugins.getAppliedPlugins();
        PipelinePluginManifestCache cache = projectPlugins.getManifestCache();
        for (AppliedPipelinePlugin p : entityPlugins.getAllAssociations(entity)) {
            plugins.put(p, cache);
        }
    }
View Full Code Here

     *         plugin can be found. <code>null</code> is returned if no such cache could be found.
     */
    protected abstract PipelinePluginManifestCache getManifestCache(PluginIdentifier pluginId);

    private void displayDetails(PluginTableItem item) {
        PipelinePluginManifestCache cache = getManifestCache(item.getPluginId());
        if (cache != null) {
            displayDetails(item, cache);
        } else {
            Alert.error(Strings.get("PipelinePlugin.ViewDetailsAction.NoManifestFound"), Strings.get("Error"));
        }
View Full Code Here

            workThread.execute(new Runnable() {

                @Override
                public void run() {
                    synchronized (lock) {
                        PipelinePluginManifestCache cache = serverCache.getCache(server.getGuid());
                        if (cache == null) {
                            model.removeAllPluginPositions();
                        } else {
                            switchToCache(server.getGuid(), cache);
                        }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.client.plugin.pipeline.cache.PipelinePluginManifestCache

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.