summaryrefslogtreecommitdiffstats
path: root/src/main/java/org/onap/schema/RelationshipSchemaValidator.java
diff options
context:
space:
mode:
authorShwetank Dave <shwetank.dave@amdocs.com>2018-06-13 08:40:26 -0400
committerShwetank Dave <shwetank.dave@amdocs.com>2018-06-13 08:54:06 -0400
commit00832f054dd0c21492af531548e321ea25cdb8b4 (patch)
treee9017ca88d1e987a315c2faad1c49b873d3e5ca1 /src/main/java/org/onap/schema/RelationshipSchemaValidator.java
parent18703cdc19842806969d30f19f8171469c79a0fe (diff)
Gizmo to load multiple Db Edge Rules files
There is an Edge Rule file for each OXM file. For every OXM version that is loaded, an edge rule file should also be loaded. Issue-ID: AAI-1201 Change-Id: I728e577ea8152623d3c5e2f0e8edf677f0eb9ef4 Signed-off-by: Shwetank Dave <shwetank.dave@amdocs.com>
Diffstat (limited to 'src/main/java/org/onap/schema/RelationshipSchemaValidator.java')
-rw-r--r--src/main/java/org/onap/schema/RelationshipSchemaValidator.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/org/onap/schema/RelationshipSchemaValidator.java b/src/main/java/org/onap/schema/RelationshipSchemaValidator.java
index 4b05c6f..15b1762 100644
--- a/src/main/java/org/onap/schema/RelationshipSchemaValidator.java
+++ b/src/main/java/org/onap/schema/RelationshipSchemaValidator.java
@@ -49,7 +49,7 @@ public class RelationshipSchemaValidator {
Map<String, String> filter)
throws CrudException {
- RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+ RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
if (schema == null) {
throw new CrudException("", Status.NOT_FOUND);
}
@@ -77,7 +77,7 @@ public class RelationshipSchemaValidator {
public static void validateType(String version, String type) throws CrudException {
- RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+ RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
if (!schema.isValidType(type)) {
throw new CrudException("Invalid " + RelationshipSchema.SCHEMA_RELATIONSHIP_TYPE
+ ": " + type,
@@ -101,7 +101,7 @@ public class RelationshipSchemaValidator {
public static Edge validateIncomingAddPayload(String version, String type, EdgePayload payload)
throws CrudException {
- RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+ RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
try {
@@ -151,7 +151,7 @@ public class RelationshipSchemaValidator {
public static Edge validateIncomingPatchPayload(Edge edge, String version, EdgePayload payload)
throws CrudException {
- RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+ RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
try {
if (payload.getSource() != null) {
@@ -243,7 +243,7 @@ public class RelationshipSchemaValidator {
public static Edge validateIncomingUpdatePayload(Edge edge, String version, EdgePayload payload)
throws CrudException {
- RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+ RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
try {
@@ -328,7 +328,7 @@ public class RelationshipSchemaValidator {
.get()).source(edge.getSource())
.target(edge.getTarget());
- RelationshipSchema schema = RelationshipSchemaLoader.getSchemaForVersion(version);
+ RelationshipSchema schema = EdgeRulesLoader.getSchemaForVersion(version);
String key = edge.getSource().getType() + ":" + edge.getTarget().getType()
+ ":" + edge.getType();