diff options
author | Sindhuri.A <arcot.sindhuri@huawei.com> | 2019-04-22 07:43:41 +0530 |
---|---|---|
committer | Sindhuri.A <arcot.sindhuri@huawei.com> | 2019-04-22 07:43:41 +0530 |
commit | 7a67a7fa82c931e9cc6002a4689002c9e3a25627 (patch) | |
tree | eeb62b963f169638d839d889bfa6c214b08872cd /cloudify-client/src/main/java/org | |
parent | 0a355f91e1da586f70450329d8620b823d59b9e5 (diff) |
Define constant for String literal
Define constant for String literal BlueprintsReource class
Issue-ID: SO-1490
Change-Id: Iebe6399d36d9124910facfafd18b40929ea98f02
Signed-off-by: Sindhuri.A <arcot.sindhuri@huawei.com>
Diffstat (limited to 'cloudify-client/src/main/java/org')
-rw-r--r-- | cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java index 3eae02bcee..9877eb9f43 100644 --- a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java +++ b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/BlueprintsResource.java @@ -31,6 +31,7 @@ import org.onap.so.cloudify.base.client.CloudifyRequest; public class BlueprintsResource { private final CloudifyClient client; + private static final String BLUEPRINTS_PATH = "/api/v3/blueprints/"; public BlueprintsResource(CloudifyClient client) { this.client = client; @@ -72,7 +73,7 @@ public class BlueprintsResource { // If a URL is provided, add it to the query string // If a Stream is provided, set it as the Entity body super(client, HttpMethod.PUT, - "/api/v3/blueprints/" + blueprintId + "?application_file_name=" + mainFileName + BLUEPRINTS_PATH + blueprintId + "?application_file_name=" + mainFileName + ((blueprintUrl != null) ? "&blueprint_archive=" + blueprintUrl : ""), ((blueprint != null) ? Entity.stream(blueprint) : null), Blueprint.class); } @@ -80,13 +81,13 @@ public class BlueprintsResource { public class DeleteBlueprint extends CloudifyRequest<Blueprint> { public DeleteBlueprint(String blueprintId) { - super(client, HttpMethod.DELETE, "/api/v3/blueprints/" + blueprintId, null, Blueprint.class); + super(client, HttpMethod.DELETE, BLUEPRINTS_PATH + blueprintId, null, Blueprint.class); } } public class GetBlueprint extends CloudifyRequest<Blueprint> { public GetBlueprint(String id, String queryArgs) { - super(client, HttpMethod.GET, "/api/v3/blueprints/" + id + queryArgs, null, Blueprint.class); + super(client, HttpMethod.GET, BLUEPRINTS_PATH + id + queryArgs, null, Blueprint.class); } } |