use of com.vmware.connectors.airwatch.greenbox.GreenBoxApp in project connectors-workspace-one by vmware.
the class AirWatchController method toGreenBoxApp.
private GreenBoxApp toGreenBoxApp(JsonDocument document, String appName) {
int RIGHT_APP_COUNT = 1;
JSONArray jsonArray = document.read("$._embedded.entitlements");
if (jsonArray.size() != RIGHT_APP_COUNT) {
throw new GbAppMapException("Unable to map " + appName + " to a single GreenBox app");
}
return new GreenBoxApp(document.read("$._embedded.entitlements[0].name"), document.read("$._embedded.entitlements[0]._links.install.href"));
}
Aggregations