summaryrefslogtreecommitdiffstats
path: root/aai-resources
diff options
context:
space:
mode:
Diffstat (limited to 'aai-resources')
-rw-r--r--aai-resources/src/main/java/org/onap/aai/dbgen/ForceDeleteTool.java2
-rw-r--r--aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java2
-rw-r--r--aai-resources/src/main/java/org/onap/aai/rest/tools/ModelVersionTransformer.java22
3 files changed, 13 insertions, 13 deletions
diff --git a/aai-resources/src/main/java/org/onap/aai/dbgen/ForceDeleteTool.java b/aai-resources/src/main/java/org/onap/aai/dbgen/ForceDeleteTool.java
index 27fadb5..56af86f 100644
--- a/aai-resources/src/main/java/org/onap/aai/dbgen/ForceDeleteTool.java
+++ b/aai-resources/src/main/java/org/onap/aai/dbgen/ForceDeleteTool.java
@@ -239,7 +239,7 @@ public class ForceDeleteTool {
qStringForMsg = qStringForMsg + ".has(" + propName + "," + propVal + ")";
}
}
- if( (g != null)){
+ if(g != null){
Iterator<Vertex> vertItor = g;
while( vertItor.hasNext() ){
resCount++;
diff --git a/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java b/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java
index 1267792..e03c7fd 100644
--- a/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java
+++ b/aai-resources/src/main/java/org/onap/aai/rest/BulkConsumer.java
@@ -276,7 +276,7 @@ public abstract class BulkConsumer extends RESTAPI {
*/
private void fillBulkOperationObjectFromTransaction(List<BulkOperation> bulkOperations,
JsonObject transaction, Loader loader, TransactionalGraphEngine dbEngine, String inputMediaType)
- throws AAIException, JsonSyntaxException, UnsupportedEncodingException {
+ throws AAIException,UnsupportedEncodingException {
if (transaction.has(BULK_PUT_METHOD) && this.functionAllowed(HttpMethod.PUT)) {
diff --git a/aai-resources/src/main/java/org/onap/aai/rest/tools/ModelVersionTransformer.java b/aai-resources/src/main/java/org/onap/aai/rest/tools/ModelVersionTransformer.java
index 3eb031f..08b2461 100644
--- a/aai-resources/src/main/java/org/onap/aai/rest/tools/ModelVersionTransformer.java
+++ b/aai-resources/src/main/java/org/onap/aai/rest/tools/ModelVersionTransformer.java
@@ -79,7 +79,7 @@ public class ModelVersionTransformer extends RESTAPI {
protected static String authPolicyFunctionName = "REST";
private ModelType introspectorFactoryType = ModelType.MOXY;
private QueryStyle queryStyle = QueryStyle.TRAVERSAL;
-
+ protected static String MODEL_ELEMENTS = "model-elements";
/**
* POST for model transformation.
@@ -180,11 +180,11 @@ public class ModelVersionTransformer extends RESTAPI {
modelVerObj.setValue("model-version", oldModelVersion);
- if (obj.hasProperty("model-elements")) {
- Introspector oldModelElements = obj.getWrappedValue("model-elements");
+ if (obj.hasProperty(MODEL_ELEMENTS)) {
+ Introspector oldModelElements = obj.getWrappedValue(MODEL_ELEMENTS);
if (oldModelElements != null) {
- Introspector newModelElements = modelVerObj.newIntrospectorInstanceOfProperty("model-elements");
- modelVerObj.setValue("model-elements", newModelElements.getUnderlyingObject());
+ Introspector newModelElements = modelVerObj.newIntrospectorInstanceOfProperty(MODEL_ELEMENTS);
+ modelVerObj.setValue(MODEL_ELEMENTS, newModelElements.getUnderlyingObject());
repackModelElements(oldModelElements, newModelElements, modelVersionIdToModelInvariantIdMap);
}
}
@@ -315,11 +315,11 @@ public class ModelVersionTransformer extends RESTAPI {
}
}
- if (oldModelElement.hasProperty("model-elements")) {
- Introspector nextOldModelElements = oldModelElement.getWrappedValue("model-elements");
+ if (oldModelElement.hasProperty(MODEL_ELEMENTS)) {
+ Introspector nextOldModelElements = oldModelElement.getWrappedValue(MODEL_ELEMENTS);
if (nextOldModelElements != null) {
- Introspector nextNewModelElements = newModelElement.newIntrospectorInstanceOfProperty("model-elements");
- newModelElement.setValue("model-elements", nextNewModelElements.getUnderlyingObject());
+ Introspector nextNewModelElements = newModelElement.newIntrospectorInstanceOfProperty(MODEL_ELEMENTS);
+ newModelElement.setValue(MODEL_ELEMENTS, nextNewModelElements.getUnderlyingObject());
repackModelElements(nextOldModelElements, nextNewModelElements, modelVersionIdToModelInvariantIdMap);
}
}
@@ -329,7 +329,7 @@ public class ModelVersionTransformer extends RESTAPI {
}
- private Map<String, String> getCurrentModelsFromGraph(HttpHeaders headers, String transactionId, UriInfo info) throws NoEdgeRuleFoundException, AAIException {
+ private Map<String, String> getCurrentModelsFromGraph(HttpHeaders headers, String transactionId, UriInfo info) throws AAIException {
TransactionalGraphEngine dbEngine = null;
Map<String, String> modelVerModelMap = new HashMap<String,String>() ;
@@ -352,7 +352,7 @@ public class ModelVersionTransformer extends RESTAPI {
} catch (NoSuchElementException e) {
throw new NoSuchElementException();
} catch (Exception e1) {
- e1.printStackTrace();
+ LOGGER.error("Exception while getting current models from graph"+e1);
}
return modelVerModelMap;