Code Review
/
aai
/
gizmo.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Replace OxmModelLoader with aaiutils
[aai/gizmo.git]
/
src
/
main
/
java
/
org
/
openecomp
/
schema
/
OxmModelValidator.java
diff --git
a/src/main/java/org/openecomp/schema/OxmModelValidator.java
b/src/main/java/org/openecomp/schema/OxmModelValidator.java
index
45a2597
..
0ae3e13
100644
(file)
--- a/
src/main/java/org/openecomp/schema/OxmModelValidator.java
+++ b/
src/main/java/org/openecomp/schema/OxmModelValidator.java
@@
-32,6
+32,7
@@
import org.eclipse.persistence.internal.helper.DatabaseField;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
import org.eclipse.persistence.mappings.DatabaseMapping;
import org.eclipse.persistence.oxm.XMLField;
import org.eclipse.persistence.jaxb.dynamic.DynamicJAXBContext;
import org.eclipse.persistence.mappings.DatabaseMapping;
import org.eclipse.persistence.oxm.XMLField;
+import org.onap.aaiutils.oxm.OxmModelLoader;
import org.openecomp.crud.entity.Vertex;
import org.openecomp.crud.exception.CrudException;
import org.openecomp.crud.util.CrudServiceUtil;
import org.openecomp.crud.entity.Vertex;
import org.openecomp.crud.exception.CrudException;
import org.openecomp.crud.util.CrudServiceUtil;
@@
-74,7
+75,12
@@
public class OxmModelValidator {
Map<String, String> filter)
throws CrudException {
Map<String, String> filter)
throws CrudException {
- DynamicJAXBContext jaxbContext = OxmModelLoader.getContextForVersion(version);
+ DynamicJAXBContext jaxbContext = null;
+ try {
+ jaxbContext = OxmModelLoader.getContextForVersion(version);
+ } catch (Exception e) {
+ throw new CrudException(e);
+ }
Map<String, Object> result = new HashMap<String, Object>();
if (jaxbContext == null) {
Map<String, Object> result = new HashMap<String, Object>();
if (jaxbContext == null) {
@@
-107,7
+113,12
@@
public class OxmModelValidator {
public static String resolveCollectionType(String version, String type) throws CrudException {
public static String resolveCollectionType(String version, String type) throws CrudException {
- DynamicJAXBContext jaxbContext = OxmModelLoader.getContextForVersion(version);
+ DynamicJAXBContext jaxbContext = null;
+ try {
+ jaxbContext = OxmModelLoader.getContextForVersion(version);
+ } catch (Exception e) {
+ throw new CrudException(e);
+ }
if (jaxbContext == null) {
throw new CrudException("", Status.NOT_FOUND);
if (jaxbContext == null) {
throw new CrudException("", Status.NOT_FOUND);