aboutsummaryrefslogtreecommitdiffstats
path: root/mso-api-handlers/mso-api-handler-common/src/main/java
diff options
context:
space:
mode:
authorChan, Mercy <merce.chan@att.com>2019-07-01 08:07:17 -0400
committerBenjamin, Max (mb388a) <mb388a@us.att.com>2019-07-01 08:10:00 -0400
commit0d562688867a1b2e7a34ee6416cd54f7a9f6b89e (patch)
tree502d37dc8a666f8adbdf0b3ffc8c65d1c5f079ec /mso-api-handlers/mso-api-handler-common/src/main/java
parentcabd51660c3c8ec52e329027179f5c6cabb03aca (diff)
support new query param format
- added format query parameter (optional), implemented logic to populate requestStatus field based on whether or not format is present moved request status constants to its own class visible globally. - changed @requestParam to @QueryParam in GET endpoint (OrchestrationRequests class. updated unit tests to call method being tested directly rather than from another private function - moved setting requestStatus to a separate method, also updated unit tests to separate out each scenarion into its own method - added unit test for when format=detail, corrected existing unit tests to test result to be FAILED - updated Status.java to include extra request status values; moved Status class to common org.onap.so.constants package Change-Id: Ic593de5fdfdcbc3121f481c86d1e261406082260 Issue-ID: SO-2080 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-api-handlers/mso-api-handler-common/src/main/java')
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/filters/ResponseUpdateFilter.java2
-rw-r--r--mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Status.java29
2 files changed, 1 insertions, 30 deletions
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/filters/ResponseUpdateFilter.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/filters/ResponseUpdateFilter.java
index eb52625bb6..119a0a560e 100644
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/filters/ResponseUpdateFilter.java
+++ b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandler/filters/ResponseUpdateFilter.java
@@ -31,7 +31,7 @@ import javax.ws.rs.core.Response;
import javax.ws.rs.ext.Provider;
import javax.ws.rs.ext.Providers;
import org.onap.logging.ref.slf4j.ONAPLogConstants;
-import org.onap.so.apihandlerinfra.Status;
+import org.onap.so.constants.Status;
import org.onap.so.db.request.beans.InfraActiveRequests;
import org.onap.so.db.request.client.RequestsDbClient;
import org.onap.so.serviceinstancebeans.RequestError;
diff --git a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Status.java b/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Status.java
deleted file mode 100644
index b791bf147b..0000000000
--- a/mso-api-handlers/mso-api-handler-common/src/main/java/org/onap/so/apihandlerinfra/Status.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*-
- * ============LICENSE_START=======================================================
- * ONAP - SO
- * ================================================================================
- * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
- * ================================================================================
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- * ============LICENSE_END=========================================================
- */
-
-package org.onap.so.apihandlerinfra;
-
-
-/*
- * Enum for Status values returned by API Handler to Tail-F
- */
-public enum Status {
- PENDING, IN_PROGRESS, COMPLETE, COMPLETED, FAILED, TIMEOUT, UNLOCKED, PENDING_MANUAL_TASK
-}