Commit bf8830f6 authored by Matija Obreza's avatar Matija Obreza

Crops methods

parent 52816a70
/target
/local.properties
/prd.properties
/target
......@@ -411,4 +411,28 @@ public class GenesysClient {
public String deleteParameter(String name) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.DELETE, "/kpi/parameter/" + name, null, null);
}
public String listCrops() throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query("/crops");
}
public String putCrop(ObjectNode node) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.POST, "/crops", null, node.toString());
}
public String deleteCrop(String shortName) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.DELETE, "/crops/" + shortName, null, null);
}
public String getCropRules(String shortName) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query("/crops/" + shortName + "/rules");
}
public String putCropRules(String shortName, ArrayNode currentCropRules) throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.PUT, "/crops/" + shortName + "/rules", null, currentCropRules.toString());
}
public String rebuildCropTaxa() throws OAuthAuthenticationException, PleaseRetryException, GenesysApiException {
return query(Verb.POST, "/crops/rebuild", null, null);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment