use of net.geoprism.registry.etl.OauthExternalSystem in project geoprism-registry by terraframe.
the class ExternalSystemService method applyInTrans.
@Transaction
private JsonObject applyInTrans(String json) {
JsonObject jo = JsonParser.parseString(json).getAsJsonObject();
ExternalSystem system = ExternalSystem.desieralize(jo);
system.apply();
if (system instanceof OauthExternalSystem) {
OauthExternalSystem oauthSystem = (OauthExternalSystem) system;
oauthSystem.updateOauthServer(jo);
if (system instanceof DHIS2ExternalSystem) {
// Test the DHIS2 connection information
new DHIS2FeatureService().setExternalSystemDhis2Version((DHIS2ExternalSystem) system);
}
}
return system.toJSON();
}
Aggregations