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);
|
log.debug("[VOCREATE] new scope added {}",scope);
|
||||||
ResourceMediator.setScope(resource, scope);
|
ResourceMediator.setScope(resource, scope);
|
||||||
}
|
}
|
||||||
|
|
||||||
// validating the resource
|
// validating the resource
|
||||||
try {
|
try {
|
||||||
Resources.validate(resource);
|
Resources.validate(resource);
|
||||||
|
@ -103,7 +102,7 @@ public class RegistryPublisherImpl implements RegistryPublisher {
|
||||||
throw new IllegalArgumentException("the resource is not valid ", e.getCause());
|
throw new IllegalArgumentException("the resource is not valid ", e.getCause());
|
||||||
}
|
}
|
||||||
try{
|
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
|
// 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);
|
String currentVO = Utils.getCurrentVO(currentScope);
|
||||||
if (currentVO != null){
|
if (currentVO != null){
|
||||||
|
@ -116,6 +115,7 @@ public class RegistryPublisherImpl implements RegistryPublisher {
|
||||||
createResource(resource, currentVO, stub);
|
createResource(resource, currentVO, stub);
|
||||||
return resource;
|
return resource;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// update the resource for each VO
|
// update the resource for each VO
|
||||||
for (String voScope: vosScopes){
|
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
|
// 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);
|
HashSet<String> vosScopes = Utils.getInternalVOScopes(resource);
|
||||||
try{
|
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
|
// 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);
|
String currentVO = Utils.getCurrentVO(currentScope);
|
||||||
if (currentVO != null){
|
if (currentVO != null){
|
||||||
|
@ -243,6 +244,7 @@ public class RegistryPublisherImpl implements RegistryPublisher {
|
||||||
registryUpdate(resource, 0);
|
registryUpdate(resource, 0);
|
||||||
return resource;
|
return resource;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int tries=0;
|
int tries=0;
|
||||||
for (String voScope: vosScopes){
|
for (String voScope: vosScopes){
|
||||||
|
|
|
@ -65,7 +65,7 @@ public class Utils {
|
||||||
ScopeBean scopeBean = new ScopeBean(scope);
|
ScopeBean scopeBean = new ScopeBean(scope);
|
||||||
if(scopeBean.is(Type.VRE))
|
if(scopeBean.is(Type.VRE))
|
||||||
vosScopes.add(scopeBean.enclosingScope().toString());
|
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);
|
vosScopes.add(scope);
|
||||||
}
|
}
|
||||||
return vosScopes;
|
return vosScopes;
|
||||||
|
|
Loading…
Reference in New Issue