Disentangle ListPlugins and PluginLsCommand
ListPlugins has a lot of code that is only used for printing the output to stdout, which is only used by PluginLsCommand. Simplify ListPlugins to only return the map of plugins, and move the logic for displaying the output into PluginLsCommand. PluginLsCommand does not have access to the Plugin objects, but only to what is returned in PluginInfo instances. Extend that to include the filename, which was previously accessible to ListPlugins. This change removes support for the format option from the list plugins REST API endpoint. Change-Id: I0c352e587d5f0e8d524ae5b7322e1feec9434d58
This commit is contained in:
@@ -18,12 +18,14 @@ public class PluginInfo {
|
||||
public final String id;
|
||||
public final String version;
|
||||
public final String indexUrl;
|
||||
public final String filename;
|
||||
public final Boolean disabled;
|
||||
|
||||
public PluginInfo(String id, String version, String indexUrl, Boolean disabled) {
|
||||
public PluginInfo(String id, String version, String indexUrl, String filename, Boolean disabled) {
|
||||
this.id = id;
|
||||
this.version = version;
|
||||
this.indexUrl = indexUrl;
|
||||
this.filename = filename;
|
||||
this.disabled = disabled;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user