summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/crud/service/CrudGraphDataService.java
diff options
context:
space:
mode:
authorGurjeet Bedi <gurjeetb@amdocs.com>2017-12-06 15:16:34 -0500
committerGurjeet Bedi <gurjeetb@amdocs.com>2017-12-06 16:36:28 -0500
commit382e07e97ccd5f7bd47bdd735143ab3658661a68 (patch)
treee9aa166a92017b16b289262ceb073fd5871d9e76 /src/main/java/org/onap/crud/service/CrudGraphDataService.java
parent3cba0debb7ef72781ecbab25474d27918d4d2407 (diff)
Port async pipeline for gizmo
Port async pipeline for gizmo Issue-ID: AAI-552 Change-Id: I255127174d1154849f440bab8b1f0bda3311ec9f Signed-off-by: Gurjeet Bedi <gurjeetb@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap/crud/service/CrudGraphDataService.java')
-rw-r--r--src/main/java/org/onap/crud/service/CrudGraphDataService.java15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/main/java/org/onap/crud/service/CrudGraphDataService.java b/src/main/java/org/onap/crud/service/CrudGraphDataService.java
index d7def67..4e42d44 100644
--- a/src/main/java/org/onap/crud/service/CrudGraphDataService.java
+++ b/src/main/java/org/onap/crud/service/CrudGraphDataService.java
@@ -30,15 +30,14 @@ import java.util.Map;
import javax.ws.rs.core.Response.Status;
-import org.onap.aaiutils.oxm.OxmModelLoader;
import org.onap.crud.dao.GraphDao;
import org.onap.crud.entity.Edge;
import org.onap.crud.entity.Vertex;
import org.onap.crud.exception.CrudException;
import org.onap.crud.parser.CrudResponseBuilder;
+import org.onap.crud.util.CrudServiceUtil;
import org.onap.schema.OxmModelValidator;
-import org.onap.schema.RelationshipSchemaLoader;
import org.onap.schema.RelationshipSchemaValidator;
import com.google.gson.JsonElement;
@@ -50,18 +49,10 @@ public class CrudGraphDataService {
public CrudGraphDataService(GraphDao dao) throws CrudException {
this.dao = dao;
- loadModels();
+ CrudServiceUtil.loadModels();
}
- private void loadModels() throws CrudException {
- // load the schemas
- try {
- OxmModelLoader.loadModels();
- } catch (Exception e) {
- throw new CrudException(e);
- }
- RelationshipSchemaLoader.loadModels();
- }
+
public String addVertex(String version, String type, VertexPayload payload) throws CrudException {
Vertex vertex = OxmModelValidator.validateIncomingUpsertPayload(null, version, type, payload.getProperties());