lucene-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucene-solr] chatman commented on a change in pull request #994: SOLR-13662: Package Manager (CLI)
Date Tue, 12 Nov 2019 01:57:50 GMT
chatman commented on a change in pull request #994: SOLR-13662: Package Manager (CLI)
URL: https://github.com/apache/lucene-solr/pull/994#discussion_r344986387
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/packagemanager/SolrPackage.java
 ##########
 @@ -0,0 +1,107 @@
+package org.apache.solr.packagemanager;
+
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Describes a package (along with all released versions) as it appears in a repository.
+ */
+public class SolrPackage implements Serializable, Comparable<SolrPackage> {
+
+  public String id;
+  public String description;
+  public List<SolrPackageRelease> versions;
+
+  private String repositoryId;
+
+  public static class SolrPackageRelease {
+
+    public String version;
+    public Date date;
+    public String url;
+
+    public String sha512sum;
+    public String sig;
+
+    public Metadata metadata;
+    @Override
+    public String toString() {
+      return "SolrPackageRelease{" +
+          "version='" + version + '\'' +
+          ", date=" + date +
+          ", url='" + url + '\'' +
+          ", sig='" + sig + '\'' +
+          ", min='" + metadata.minSolrVersion + '\'' +
+          ", max='" + metadata.maxSolrVersion + '\'' +
+          ", dependencies='" + metadata.dependencies + '\'' +
+          ", plugins='" + metadata.plugins + '\'' +
+          ", paramDefaults='" + metadata.parameterDefaults + '\'' +
+          ", sha512sum='" + sha512sum + '\'' +
+          '}';
+    }
+  }
+
+  public static class Metadata {
+    @JsonProperty("min-solr-version")
+    public String minSolrVersion;
+    @JsonProperty("max-solr-version")
+    public String maxSolrVersion;
+
+    public List<String> dependencies;
+    public List<Plugin> plugins;
+    @JsonProperty("parameter-defaults")
+    public Map<String, String> parameterDefaults;
+  }
+
+  public static class Plugin {
+    public String id;
+    @JsonProperty("setup-command")
+    public String setupCommand;
+
+    @JsonProperty("update-command")
+    public String updateCommand;
+
+    @JsonProperty("uninstall-command")
+    public String uninstallCommand;
+
+    @JsonProperty("verify-command")
+    public Command verifyCommand;
+
+    @Override
+    public String toString() {
+      return id + ": {setup: "+setupCommand+", update: "+updateCommand+", uninstall: "+uninstallCommand+",
verify: "+verifyCommand+"}";
+    }
+  }
+
+  @Override
+  public int compareTo(SolrPackage o) {
+    return id.compareTo(o.id);
+  }
+
+  public String getRepositoryId() {
+    return repositoryId;
+  }
+
+  public void setRepositoryId(String repositoryId) {
+    this.repositoryId = repositoryId;
+  }
+
+  public static class Command {
+    public String path;
+    public String method;
+    public Map payload;
+    public String condition;
+    public String expected;
+    
+    @Override
+      public String toString() {
 
 Review comment:
   Done, thanks!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Mime
View raw message