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 {
|
||||
boolean update = serviceEndpoint != null;
|
||||
|
||||
serviceEndpoint = new ServiceEndpoint();
|
||||
serviceEndpoint.setId(catalogueConfiguration.getID());
|
||||
boolean update = true;
|
||||
if(serviceEndpoint==null) {
|
||||
serviceEndpoint = new ServiceEndpoint();
|
||||
serviceEndpoint.setId(catalogueConfiguration.getID());
|
||||
update = false;
|
||||
}
|
||||
|
||||
Profile profile = serviceEndpoint.newProfile();
|
||||
profile = setProfileProperties(profile, update);
|
||||
|
@ -671,14 +673,14 @@ public class GCoreISConfigurationProxy {
|
|||
return serviceEndpoint;
|
||||
}
|
||||
|
||||
public ServiceCatalogueConfiguration createOnIS(ServiceEndpoint serviceEndpoint) throws Exception {
|
||||
public ServiceCatalogueConfiguration createOnIS() throws Exception {
|
||||
RegistryPublisher registryPublisher = RegistryPublisherFactory.create();
|
||||
String id = catalogueConfiguration.getID();
|
||||
if(id==null || id.compareTo("")==0) {
|
||||
id = UUID.randomUUID().toString();
|
||||
catalogueConfiguration.setID(id);
|
||||
}
|
||||
serviceEndpoint = createServiceEndpoint(serviceEndpoint);
|
||||
ServiceEndpoint serviceEndpoint = createServiceEndpoint(null);
|
||||
registryPublisher.create(serviceEndpoint);
|
||||
return catalogueConfiguration;
|
||||
}
|
||||
|
@ -699,7 +701,7 @@ public class GCoreISConfigurationProxy {
|
|||
updateOnIS(serviceEndpoint);
|
||||
}else {
|
||||
// It's a create
|
||||
createOnIS(serviceEndpoint);
|
||||
createOnIS();
|
||||
}
|
||||
return catalogueConfiguration;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue