Return a list of plugins that are newer versions of already installed plugins.

@return list of plugins that have updates
512145
public List<PluginInfo> getUpdates() {
        List<PluginInfo> updates = new ArrayList<>();
        for (PluginWrapper installed : pluginManager.getPlugins()) {
            String pluginId = installed.getPluginId();
            if (hasPluginUpdate(pluginId)) {
                updates.add(getPluginsMap().get(pluginId));
            }
        }

        return updates;
    }
1026089
public function getUpdates()
    {
        if (!$this->loadRepositories()) {
            return Repository::STATUS_NO_REPOSITORIES;
        }

        $modules = $this->getModulesFromRepository();

        // Is a higher version of an already installed package available?
        foreach ($modules as $key => $module) {
            $version = $this->packageService->getVersion($module->name);

            if (!$version) {
                // Not installed at all.
                unset($modules[$key]);
            } elseif (version_compare($version, $module->version, '<')) {
                // Older version installed.
                $modules[$key]->versionInstalled = $version;
            } else {
                unset($modules[$key]);
            }
        }

        return $modules;
    }
968237
public java.util.List<String> getVersions() {
        if (versions == null) {
            versions = new com.amazonaws.internal.SdkInternalList<String>();
        }
        return versions;
    }
994874
public List<MoskitoPlugin> getPlugins() {
		ArrayList<MoskitoPlugin> ret = new ArrayList<MoskitoPlugin>(plugins.values());
		return ret;
	}
399848
private Map<AddonId, AddonRepository> getInstalledAddons()
   {
      Map<AddonId, AddonRepository> addons = new HashMap<>();
      for (AddonRepository repository : getRepositories())
      {
         List<AddonId> listEnabled = repository.listAll();
         for (AddonId addonId : listEnabled)
         {
            addons.put(addonId, repository);
         }
      }
      return addons;
   }
1166063
public synchronized Map<String, String> getComponentsVersions() {
        SortedMap<String, String> keys = new TreeMap<>(componentVersions);
        return keys;
    }
1135574
public boolean syncPlugins(NewRelicCache cache)
    {
        boolean ret = true;

        if(apiClient == null)
            throw new IllegalArgumentException("null API client");

        // Get the Plugins configuration using the REST API
        if(cache.isPluginsEnabled())
        {
            ret = false;

            logger.info("Getting the plugins");
            Collection<Plugin> plugins = apiClient.plugins().list(true);
            for(Plugin plugin : plugins)
            {
                cache.plugins().add(plugin);

                logger.fine("Getting the components for plugin: "+plugin.getId());
                Collection<PluginComponent> components = apiClient.pluginComponents().list(PluginComponentService.filters().pluginId(plugin.getId()).build());
                cache.plugins().components(plugin.getId()).add(components);
            }

            cache.setUpdatedAt();

            ret = true;
        }

        return ret;
    }
525596
public boolean hasUpdates() {
        String hasUpdates = m_resultFields.get(HAS_UPDATES);
        return hasUpdates != null && Boolean.parseBoolean(hasUpdates);
    }
103651
private List getVersions() {

        ArrayList ret = new ArrayList();

        int defaultHistoryVersions = OpenCms.getSystemInfo().getHistoryVersions();
        int historyVersions = 0;

        // Add the option for disabled version history
        ret.add(
            new CmsSelectWidgetOption(
                "-1",
                true,
                Messages.get().getBundle().key(Messages.GUI_HISTORY_CLEAR_VERSION_SELECT_0)));

        // Iterate from 1 to 50 with a stepping of 1 for the first 10 entries and a stepping of five for the entries from 10 to 50
        while (historyVersions < 50) {

            // increment the history version
            historyVersions++;

            if (((historyVersions % 5) == 0) || (historyVersions <= 10)) {

                ret.add(
                    new CmsSelectWidgetOption(String.valueOf(historyVersions), false, String.valueOf(historyVersions)));
            }
        }

        // If the default setting for the version history is more than 50
        if (defaultHistoryVersions > historyVersions) {
            ret.add(
                new CmsSelectWidgetOption(
                    String.valueOf(defaultHistoryVersions),
                    false,
                    String.valueOf(defaultHistoryVersions)));
        }

        return ret;
    }
689701
public <P extends Plugin> List<P> getPlugins(Class<P> clazz) {
        List<P> result = new ArrayList<>();
        for (PluginWrapper w: pluginManager.getPlugins(clazz)) {
            result.add((P)w.getPlugin());
        }
        return Collections.unmodifiableList(result);
    }
1167717
@CheckForNull
    public JSONArray getPlatformPluginUpdates() {
        final VersionNumber version = getCurrentLevel();
        if (version == null) {
            return null;
        }
        return getPlatformPluginsForUpdate(version, Jenkins.getVersion());
    }
293208
public static @Nonnull
    List<DetachedPlugin> getDetachedPlugins() {
        return DETACHED_LIST.stream()
                .filter(plugin -> JavaUtils.getCurrentJavaRuntimeVersionNumber().isNewerThanOrEqualTo(plugin.getMinimumJavaVersion()))
                .collect(Collectors.toList());
    }
651924
public boolean hasPluginUpdate(String id) {
        PluginInfo pluginInfo = getPluginsMap().get(id);
        if (pluginInfo == null) {
            return false;
        }

        String installedVersion = pluginManager.getPlugin(id).getDescriptor().getVersion();
        PluginRelease last = getLastPluginRelease(id);

        return last != null && versionManager.compareVersions(last.version, installedVersion) > 0;
    }
904502
@Exported
    public List<Plugin> getAvailables() {
        List<Plugin> r = new ArrayList<>();
        Data data = getData();
        if(data==null)     return Collections.emptyList();
        for (Plugin p : data.plugins.values()) {
            if(p.getInstalled()==null)
                r.add(p);
        }
        return r;
    }
1028312
public java.util.List<UpdateTarget> getUpdateTargets() {
        if (updateTargets == null) {
            updateTargets = new com.amazonaws.internal.SdkInternalList<UpdateTarget>();
        }
        return updateTargets;
    }
1143176
public List getPlugins() {
        synchronized (pluginMap) {
            List pluginList = new ArrayList(pluginMap.size());
            Iterator iter = pluginMap.values().iterator();

            while (iter.hasNext()) {
                pluginList.add(iter.next());
            }
            return pluginList;
        }
    }
1213457
public Collection<INDArray> getUpdates() {
        // just drain stuff from the queue
        val list = new ArrayList<INDArray>();
        updatesQueue.drainTo(list);
        return list;
    }