get packages by dependency
This commit is contained in:
parent
9c20a28710
commit
eddcaba803
|
@ -7637,6 +7637,14 @@ When pattern[x] is used to constrain a complex object, it means that each proper
|
|||
return hasId() ? getId() : getPath();
|
||||
}
|
||||
|
||||
public boolean hasFixedOrPattern() {
|
||||
return hasFixed() || hasPattern();
|
||||
}
|
||||
|
||||
public Type getFixedOrPattern() {
|
||||
return hasFixed() ? getFixed() : getPattern();
|
||||
}
|
||||
|
||||
// end addition
|
||||
|
||||
}
|
|
@ -242,4 +242,17 @@ public class PackageClient {
|
|||
return result;
|
||||
}
|
||||
|
||||
public void findDependents(Set<String> list, String id) {
|
||||
CommaSeparatedStringBuilder params = new CommaSeparatedStringBuilder("&");
|
||||
params.append("dependency="+id);
|
||||
try {
|
||||
JsonArray json = fetchJsonArray(Utilities.pathURL(address, "catalog?")+params.toString());
|
||||
for (JsonElement e : json) {
|
||||
JsonObject obj = (JsonObject) e;
|
||||
list.add(JSONUtil.str(obj, "Name", "name"));
|
||||
}
|
||||
} catch (IOException e1) {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue