@ -94,7 +94,6 @@ public class RegistryPublisherImpl implements RegistryPublisher {
log.debug("[VOCREATE] new scope added {}",scope);
ResourceMediator.setScope(resource,scope);
}
// validating the resource
try{
Resources.validate(resource);
@ -103,18 +102,19 @@ public class RegistryPublisherImpl implements RegistryPublisher {
thrownewIllegalArgumentException("the resource is not valid ",e.getCause());
}
try{
// checking the current scope: if the operation fails in the current VO it will give an exception, if it fails in another VO no exception will be given
StringcurrentVO=Utils.getCurrentVO(currentScope);
if(currentVO!=null){
RegistryStubstub=getRegistryStub();
createResource(resource,currentVO,stub);
vosScopes.remove(currentVO);
//in this case it is a root-vo scope so we need to create the resource only at root-vo level
}else{
RegistryStubstub=getRegistryStub();
createResource(resource,currentVO,stub);
returnresource;
if(currentScope!=null){
// checking the current scope: if the operation fails in the current VO it will give an exception, if it fails in another VO no exception will be given
StringcurrentVO=Utils.getCurrentVO(currentScope);
if(currentVO!=null){
RegistryStubstub=getRegistryStub();
createResource(resource,currentVO,stub);
vosScopes.remove(currentVO);
//in this case it is a root-vo scope so we need to create the resource only at root-vo level
}else{
RegistryStubstub=getRegistryStub();
createResource(resource,currentVO,stub);
returnresource;
}
}
// update the resource for each VO
for(StringvoScope:vosScopes){
@ -231,17 +231,19 @@ public class RegistryPublisherImpl implements RegistryPublisher {