if (CsarValidationUtils.isCsarPayloadName(resourceInfoObject.getPayloadName())) {
log.debug("import resource from csar");
importedResourceStatus = importResourceFromUICsar(resourceInfoObject, user, resourceUniqueId);
- } else if (!authority.isUserTypeResource()) {
- log.debug("import normative type resource");
- createOrUpdateResponse =
- resourceImportManager.importNormativeResource(yamlAsString, resourceInfoObject, user, createNewVersion, true, false);
- } else {
+ } else if (authority.isUserTypeResource()) {
log.debug("import user resource (not normative type)");
createOrUpdateResponse = resourceImportManager.importUserDefinedResource(yamlAsString, resourceInfoObject, user, false);
+ } else {
+ log.debug("import normative type resource");
+ createOrUpdateResponse =
+ resourceImportManager.importNormativeResource(yamlAsString, resourceInfoObject, null, user, createNewVersion, true, false);
}
if (createOrUpdateResponse != null) {
importedResourceStatus = createOrUpdateResponse;