Fixing update configuration
This commit is contained in:
parent
1dbf73bc41
commit
b74d768630
|
@ -650,10 +650,12 @@ public class GCoreISConfigurationProxy {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
protected ServiceEndpoint createServiceEndpoint(ServiceEndpoint serviceEndpoint) throws Exception {
|
protected ServiceEndpoint createServiceEndpoint(ServiceEndpoint serviceEndpoint) throws Exception {
|
||||||
boolean update = serviceEndpoint != null;
|
boolean update = true;
|
||||||
|
if(serviceEndpoint==null) {
|
||||||
serviceEndpoint = new ServiceEndpoint();
|
serviceEndpoint = new ServiceEndpoint();
|
||||||
serviceEndpoint.setId(catalogueConfiguration.getID());
|
serviceEndpoint.setId(catalogueConfiguration.getID());
|
||||||
|
update = false;
|
||||||
|
}
|
||||||
|
|
||||||
Profile profile = serviceEndpoint.newProfile();
|
Profile profile = serviceEndpoint.newProfile();
|
||||||
profile = setProfileProperties(profile, update);
|
profile = setProfileProperties(profile, update);
|
||||||
|
@ -671,14 +673,14 @@ public class GCoreISConfigurationProxy {
|
||||||
return serviceEndpoint;
|
return serviceEndpoint;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ServiceCatalogueConfiguration createOnIS(ServiceEndpoint serviceEndpoint) throws Exception {
|
public ServiceCatalogueConfiguration createOnIS() throws Exception {
|
||||||
RegistryPublisher registryPublisher = RegistryPublisherFactory.create();
|
RegistryPublisher registryPublisher = RegistryPublisherFactory.create();
|
||||||
String id = catalogueConfiguration.getID();
|
String id = catalogueConfiguration.getID();
|
||||||
if(id==null || id.compareTo("")==0) {
|
if(id==null || id.compareTo("")==0) {
|
||||||
id = UUID.randomUUID().toString();
|
id = UUID.randomUUID().toString();
|
||||||
catalogueConfiguration.setID(id);
|
catalogueConfiguration.setID(id);
|
||||||
}
|
}
|
||||||
serviceEndpoint = createServiceEndpoint(serviceEndpoint);
|
ServiceEndpoint serviceEndpoint = createServiceEndpoint(null);
|
||||||
registryPublisher.create(serviceEndpoint);
|
registryPublisher.create(serviceEndpoint);
|
||||||
return catalogueConfiguration;
|
return catalogueConfiguration;
|
||||||
}
|
}
|
||||||
|
@ -699,7 +701,7 @@ public class GCoreISConfigurationProxy {
|
||||||
updateOnIS(serviceEndpoint);
|
updateOnIS(serviceEndpoint);
|
||||||
}else {
|
}else {
|
||||||
// It's a create
|
// It's a create
|
||||||
createOnIS(serviceEndpoint);
|
createOnIS();
|
||||||
}
|
}
|
||||||
return catalogueConfiguration;
|
return catalogueConfiguration;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue