diff options
author | 2017-05-17 17:45:08 +0300 | |
---|---|---|
committer | 2017-05-17 17:45:55 +0300 | |
commit | 9d2e5833689f56f38b21b67818530d23c503fcbb (patch) | |
tree | 993cdd16e58c98b011e1a9ecd36e65a04aa21590 /src/main/java/org/openecomp/modelloader/entity | |
parent | 4c0349b696a1a2d8990d9ec98c4df894c45acde5 (diff) |
Ensure shutdown hook is called on docker stop
Change-Id: I7f2165c6c4b8cfeb3d62c4a286b62f4e42dde449
Signed-off-by: Blimkie, Steven (sb787e) <steven.blimkie@amdocs.com>
Diffstat (limited to 'src/main/java/org/openecomp/modelloader/entity')
-rw-r--r-- | src/main/java/org/openecomp/modelloader/entity/model/ModelArtifactHandler.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/org/openecomp/modelloader/entity/model/ModelArtifactHandler.java b/src/main/java/org/openecomp/modelloader/entity/model/ModelArtifactHandler.java index 6f9f64f..19b69cf 100644 --- a/src/main/java/org/openecomp/modelloader/entity/model/ModelArtifactHandler.java +++ b/src/main/java/org/openecomp/modelloader/entity/model/ModelArtifactHandler.java @@ -166,11 +166,14 @@ public class ModelArtifactHandler extends ArtifactHandler { private String getURL(ModelArtifact model) { String baseURL = config.getAaiBaseUrl().trim(); String subURL = null; + String instance = null; if (model.getType().equals(ArtifactType.MODEL)) { subURL = config.getAaiModelUrl(model.getModelNamespaceVersion()).trim(); + instance = model.getModelInvariantId(); } else { subURL = config.getAaiNamedQueryUrl(model.getModelNamespaceVersion()).trim(); + instance = model.getNameVersionId(); } if ( (!baseURL.endsWith("/")) && (!subURL.startsWith("/")) ) { @@ -185,18 +188,21 @@ public class ModelArtifactHandler extends ArtifactHandler { subURL = subURL + "/"; } - String url = baseURL + subURL + model.getModelInvariantId(); + String url = baseURL + subURL + instance; return url; } private String getModelVerURL(ModelArtifact model) { String baseURL = config.getAaiBaseUrl().trim(); String subURL = null; + String instance = null; if (model.getType().equals(ArtifactType.MODEL)) { subURL = config.getAaiModelUrl(model.getModelNamespaceVersion()).trim() + model.getModelInvariantId() + AAI_MODEL_VER; + instance = model.getModelVerId(); } else { subURL = config.getAaiNamedQueryUrl(model.getModelNamespaceVersion()).trim(); + instance = model.getNameVersionId(); } if ( (!baseURL.endsWith("/")) && (!subURL.startsWith("/")) ) { @@ -211,8 +217,7 @@ public class ModelArtifactHandler extends ArtifactHandler { subURL = subURL + "/"; } - String url = baseURL + subURL + model.getModelVerId(); - System.out.println(url); + String url = baseURL + subURL + instance; return url; } |