summaryrefslogtreecommitdiffstats
path: root/cloudify-client/src/main
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2019-04-23 10:42:12 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-23 10:42:12 +0000
commitf173b99450f252da6e938694a31383c4d91db00a (patch)
treeb5e9054656d41e6c4b10e1c3436789f58ff6329d /cloudify-client/src/main
parent91cc893325bf5edcc7f996c8c96085e49eff8616 (diff)
parentc2088b86b363cda57bca06eb9bb1e824379f83a2 (diff)
Merge "Declare constant for String literal"
Diffstat (limited to 'cloudify-client/src/main')
-rw-r--r--cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java9
-rw-r--r--cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java7
2 files changed, 9 insertions, 7 deletions
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java
index 262045a367..335f6b1697 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/DeploymentsResource.java
@@ -32,6 +32,7 @@ import org.onap.so.cloudify.base.client.CloudifyRequest;
public class DeploymentsResource {
private final CloudifyClient client;
+ private static final String DEPLOYMENT_PATH = "/api/v3/deployments/";
public DeploymentsResource(CloudifyClient client) {
this.client = client;
@@ -59,25 +60,25 @@ public class DeploymentsResource {
public class CreateDeployment extends CloudifyRequest<Deployment> {
public CreateDeployment(String deploymentId, CreateDeploymentParams body) {
- super(client, HttpMethod.PUT, "/api/v3/deployments/" + deploymentId, Entity.json(body), Deployment.class);
+ super(client, HttpMethod.PUT, DEPLOYMENT_PATH + deploymentId, Entity.json(body), Deployment.class);
}
}
public class DeleteDeployment extends CloudifyRequest<Deployment> {
public DeleteDeployment(String deploymentId) {
- super(client, HttpMethod.DELETE, "/api/v3/deployments/" + deploymentId, null, Deployment.class);
+ super(client, HttpMethod.DELETE, DEPLOYMENT_PATH + deploymentId, null, Deployment.class);
}
}
public class GetDeployment extends CloudifyRequest<Deployment> {
public GetDeployment(String id) {
- super(client, HttpMethod.GET, "/api/v3/deployments/" + id, null, Deployment.class);
+ super(client, HttpMethod.GET, DEPLOYMENT_PATH + id, null, Deployment.class);
}
}
public class GetDeploymentOutputs extends CloudifyRequest<DeploymentOutputs> {
public GetDeploymentOutputs(String id) {
- super(client, HttpMethod.GET, "/api/v3/deployments/" + id + "/outputs", null, DeploymentOutputs.class);
+ super(client, HttpMethod.GET, DEPLOYMENT_PATH + id + "/outputs", null, DeploymentOutputs.class);
}
}
diff --git a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java
index 51aaea94bb..34251bfe52 100644
--- a/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java
+++ b/cloudify-client/src/main/java/org/onap/so/cloudify/v3/client/ExecutionsResource.java
@@ -33,6 +33,7 @@ import org.onap.so.cloudify.base.client.CloudifyRequest;
public class ExecutionsResource {
private final CloudifyClient client;
+ private static final String EXECUTIONS_PATH = "/api/v3/executions/";
public ExecutionsResource(CloudifyClient client) {
this.client = client;
@@ -76,7 +77,7 @@ public class ExecutionsResource {
public class GetExecution extends CloudifyRequest<Execution> {
public GetExecution(String id) {
- super(client, HttpMethod.GET, "/api/v3/executions/" + id, null, Execution.class);
+ super(client, HttpMethod.GET, EXECUTIONS_PATH + id, null, Execution.class);
}
}
@@ -95,13 +96,13 @@ public class ExecutionsResource {
public class UpdateExecution extends CloudifyRequest<Execution> {
public UpdateExecution(String executionId, UpdateExecutionParams body) {
- super(client, HttpMethod.PATCH, "/api/v3/executions/" + executionId, Entity.json(body), Execution.class);
+ super(client, HttpMethod.PATCH, EXECUTIONS_PATH + executionId, Entity.json(body), Execution.class);
}
}
public class CancelExecution extends CloudifyRequest<Execution> {
public CancelExecution(String executionId, CancelExecutionParams body) {
- super(client, HttpMethod.POST, "/api/v3/executions/" + executionId, Entity.json(body), Execution.class);
+ super(client, HttpMethod.POST, EXECUTIONS_PATH + executionId, Entity.json(body), Execution.class);
}
}