@RequirePOST
    public JSONArray doPrevalidateConfig(StaplerRequest req) throws IOException {
        Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER);

        JSONArray response = new JSONArray();

        for (Map.Entry<String,VersionNumber> p : parseRequestedPlugins(req.getInputStream()).entrySet()) {
            PluginWrapper pw = getPlugin(p.getKey());
            JSONObject j = new JSONObject()
                    .accumulate("name", p.getKey())
                    .accumulate("version", p.getValue().toString());
            if (pw == null) { // install new
                response.add(j.accumulate("mode", "missing"));
            } else if (pw.isOlderThan(p.getValue())) { // upgrade
                response.add(j.accumulate("mode", "old"));
            } // else already good
        }

        return response;
    }
@ RequirePOST public JSONArray doPrevalidateConfig ( StaplerRequest req ) throws IOException { Jenkins . getInstance ( ) . checkPermission ( Jenkins . ADMINISTER ) ; JSONArray response = new JSONArray ( ) ; for ( Map . Entry < String , VersionNumber > p : parseRequestedPlugins ( req . getInputStream ( ) ) . entrySet ( ) ) { PluginWrapper pw = getPlugin ( p . getKey ( ) ) ; JSONObject j = new JSONObject ( ) . accumulate ( "name" , p . getKey ( ) ) . accumulate ( "version" , p . getValue ( ) . toString ( ) ) ; if ( pw == null ) { response . add ( j . accumulate ( "mode" , "missing" ) ) ; } else if ( pw . isOlderThan ( p . getValue ( ) ) ) { response . add ( j . accumulate ( "mode" , "old" ) ) ; } } return response ; }
Like {@link #doInstallNecessaryPlugins(StaplerRequest)} but only checks if everything is installed
or if some plugins need updates or installation.

This method runs without side-effect. I'm still requiring the ADMINISTER permission since
XML file can contain various external references and we don't configure parsers properly against
that.

@since 1.483