Refs #11288: Made resource-registry more RESTful
Task-Url: https://support.d4science.org/issues/11288 git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry@169072 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
5fb6eae171
commit
4f07e57030
|
@ -165,10 +165,17 @@ public abstract class ERManagement<ERType extends ER, El extends Element> {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setElementType(String erType) throws ResourceRegistryException {
|
public void setElementType(String erType) throws ResourceRegistryException {
|
||||||
this.elementType = erType;
|
if(this.elementType==null) {
|
||||||
if(erType == null || erType.compareTo("") == 0) {
|
if(erType == null || erType.compareTo("") == 0) {
|
||||||
erType = accessType.getName();
|
erType = accessType.getName();
|
||||||
}
|
}
|
||||||
|
this.elementType = erType;
|
||||||
|
}else {
|
||||||
|
if(elementType.compareTo(erType)!=0) {
|
||||||
|
throw new ResourceRegistryException("Provided type " + erType + " does not match with the one already known " + this.accessType);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(jsonNode != null) {
|
if(jsonNode != null) {
|
||||||
checkERMatch();
|
checkERMatch();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue