forked from gCubeSystem/registry-publisher
hotfix bug: #17849
This commit is contained in:
parent
565312cbb0
commit
108c194bf2
|
@ -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,7 +102,7 @@ public class RegistryPublisherImpl implements RegistryPublisher {
|
|||
throw new IllegalArgumentException("the resource is not valid ", e.getCause());
|
||||
}
|
||||
try{
|
||||
|
||||
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
|
||||
String currentVO = Utils.getCurrentVO(currentScope);
|
||||
if (currentVO != null){
|
||||
|
@ -116,6 +115,7 @@ public class RegistryPublisherImpl implements RegistryPublisher {
|
|||
createResource(resource, currentVO, stub);
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
// update the resource for each VO
|
||||
for (String voScope: vosScopes){
|
||||
// if update is calling on create operation and the scope is not equal to create operation scope or if is a simple update operation, try to update it
|
||||
|
@ -231,6 +231,7 @@ public class RegistryPublisherImpl implements RegistryPublisher {
|
|||
}
|
||||
HashSet<String> vosScopes = Utils.getInternalVOScopes(resource);
|
||||
try{
|
||||
if(currentScope != null){
|
||||
// checking the current scope: if the operation fail in the current VO it will give an exception, if it fails in another VO no exception will be given
|
||||
String currentVO = Utils.getCurrentVO(currentScope);
|
||||
if (currentVO != null){
|
||||
|
@ -243,6 +244,7 @@ public class RegistryPublisherImpl implements RegistryPublisher {
|
|||
registryUpdate(resource, 0);
|
||||
return resource;
|
||||
}
|
||||
}
|
||||
|
||||
int tries=0;
|
||||
for (String voScope: vosScopes){
|
||||
|
|
|
@ -65,7 +65,7 @@ public class Utils {
|
|||
ScopeBean scopeBean = new ScopeBean(scope);
|
||||
if(scopeBean.is(Type.VRE))
|
||||
vosScopes.add(scopeBean.enclosingScope().toString());
|
||||
// else if(scopeBean.is(Type.VO))
|
||||
// if the scope is a root-vo scope, it will be added to the vosScope array
|
||||
vosScopes.add(scope);
|
||||
}
|
||||
return vosScopes;
|
||||
|
|
Loading…
Reference in New Issue