From 5a6a6de6f1a26a1897e4917a0df613e25a24eb70 Mon Sep 17 00:00:00 2001 From: "Benjamin, Max (mb388a)" Date: Mon, 30 Jul 2018 15:56:09 -0400 Subject: Containerization feature of SO Change-Id: I95381232eeefcd247a66a5cec370a8ce1c288e18 Issue-ID: SO-670 Signed-off-by: Benjamin, Max (mb388a) --- .../adapter/requests/db/MsoRequestsDbAdapter.java | 35 --- .../requests/db/MsoRequestsDbAdapterClient.java | 300 --------------------- .../db/entities/MsoRequestsDbException.java | 62 ----- .../db/entities/MsoRequestsDbExceptionBean.java | 48 ---- .../requests/db/entities/RequestStatusType.java | 69 ----- .../requests/db/entities/ResponseStatus.java | 33 --- .../adapter/requests/db/entities/Status.java | 40 --- .../requests/db/entities/UpdateInfraRequest.java | 138 ---------- 8 files changed, 725 deletions(-) delete mode 100644 bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/MsoRequestsDbAdapter.java delete mode 100644 bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/MsoRequestsDbAdapterClient.java delete mode 100644 bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/MsoRequestsDbException.java delete mode 100644 bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/MsoRequestsDbExceptionBean.java delete mode 100644 bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/RequestStatusType.java delete mode 100644 bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/ResponseStatus.java delete mode 100644 bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/Status.java delete mode 100644 bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/UpdateInfraRequest.java (limited to 'bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db') diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/MsoRequestsDbAdapter.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/MsoRequestsDbAdapter.java deleted file mode 100644 index c3ba8e16ea..0000000000 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/MsoRequestsDbAdapter.java +++ /dev/null @@ -1,35 +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.openecomp.mso.client.adapter.requests.db; - -import org.openecomp.mso.client.adapter.requests.db.entities.MsoRequestsDbException; -import org.openecomp.mso.client.adapter.requests.db.entities.UpdateInfraRequest; -import org.openecomp.mso.requestsdb.InfraActiveRequests; - -public interface MsoRequestsDbAdapter { - - public void updateInfraRequest(UpdateInfraRequest request) throws MsoRequestsDbException; - - public InfraActiveRequests getInfraRequest(String requestId) throws MsoRequestsDbException; - - public boolean getSiteStatus(String siteName); - -} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/MsoRequestsDbAdapterClient.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/MsoRequestsDbAdapterClient.java deleted file mode 100644 index 2443169151..0000000000 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/MsoRequestsDbAdapterClient.java +++ /dev/null @@ -1,300 +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.openecomp.mso.client.adapter.requests.db; - -import java.sql.Timestamp; - -import org.hibernate.HibernateException; -import org.hibernate.Query; -import org.hibernate.Session; -import org.openecomp.mso.client.adapter.requests.db.entities.MsoRequestsDbException; -import org.openecomp.mso.client.adapter.requests.db.entities.RequestStatusType; -import org.openecomp.mso.client.adapter.requests.db.entities.UpdateInfraRequest; -import org.openecomp.mso.db.AbstractSessionFactoryManager; -import org.openecomp.mso.logger.MessageEnum; -import org.openecomp.mso.logger.MsoLogger; -import org.openecomp.mso.requestsdb.InfraActiveRequests; -import org.openecomp.mso.requestsdb.RequestsDbSessionFactoryManager; -import org.openecomp.mso.requestsdb.SiteStatus; -import org.openecomp.mso.utils.UUIDChecker; - -public class MsoRequestsDbAdapterClient implements MsoRequestsDbAdapter { - - protected AbstractSessionFactoryManager requestsDbSessionFactoryManager = new RequestsDbSessionFactoryManager(); - - private static MsoLogger LOGGER = MsoLogger.getMsoLogger(MsoLogger.Catalog.RA); - - @Override - public void updateInfraRequest(UpdateInfraRequest request) throws MsoRequestsDbException { - Session session = requestsDbSessionFactoryManager.getSessionFactory().openSession(); - int result = 0; - long startTime = System.currentTimeMillis(); - if (request.getRequestId() != null && request.getLastModifiedBy() != null) { - MsoLogger.setLogContext(request.getRequestId(), null); - try { - session.beginTransaction(); - StringBuilder queryString = new StringBuilder("update InfraActiveRequests set "); - String statusMessage = null; - String responseBody = null; - RequestStatusType requestStatus = null; - String progress = null; - String vnfOutputs = null; - String serviceInstanceId = null; - String networkId = null; - String vnfId = null; - String vfModuleId = null; - String volumeGroupId = null; - String serviceInstanceName = null; - String vfModuleName = null; - String configurationId = null; - String configurationName = null; - if (request.getStatusMessage() != null) { - queryString.append("statusMessage = :statusMessage, "); - statusMessage = request.getStatusMessage(); - } - if (request.getResponseBody() != null) { - queryString.append("responseBody = :responseBody, "); - responseBody = request.getResponseBody(); - } - if (request.getRequestStatus() != null) { - queryString.append("requestStatus = :requestStatus, "); - requestStatus = request.getRequestStatus(); - } - if (request.getProgress() != null) { - queryString.append("progress = :progress, "); - progress = request.getProgress(); - } - if (request.getVnfOutputs() != null) { - queryString.append("vnfOutputs = :vnfOutputs, "); - vnfOutputs = request.getVnfOutputs(); - } - if (request.getServiceInstanceId() != null) { - queryString.append("serviceInstanceId = :serviceInstanceId, "); - serviceInstanceId = request.getServiceInstanceId(); - } - if (request.getNetworkId() != null) { - queryString.append("networkId = :networkId, "); - networkId = request.getNetworkId(); - } - if (request.getVnfId() != null) { - queryString.append("vnfId = :vnfId, "); - vnfId = request.getVnfId(); - } - if (request.getVfModuleId() != null) { - queryString.append("vfModuleId = :vfModuleId, "); - vfModuleId = request.getVfModuleId(); - } - if (request.getVolumeGroupId() != null) { - queryString.append("volumeGroupId = :volumeGroupId, "); - volumeGroupId = request.getVolumeGroupId(); - } - if (request.getServiceInstanceName() != null) { - queryString.append("serviceInstanceName = :serviceInstanceName, "); - serviceInstanceName = request.getServiceInstanceName(); - } - if (request.getVfModuleName() != null) { - queryString.append("vfModuleName = :vfModuleName, "); - vfModuleName = request.getVfModuleName(); - } - if (request.getConfigurationId() != null) { - queryString.append("configurationId = :configurationId, "); - configurationId = request.getConfigurationId(); - } - if (request.getConfigurationName() != null) { - queryString.append("configurationName = :configurationName, "); - configurationName = request.getConfigurationName(); - } - if (request.getRequestStatus() == RequestStatusType.COMPLETE - || request.getRequestStatus() == RequestStatusType.FAILED) { - queryString.append("endTime = :endTime, "); - } else { - queryString.append("modifyTime = :modifyTime, "); - } - queryString.append("lastModifiedBy = :lastModifiedBy where requestId = :requestId OR clientRequestId = :requestId"); - - LOGGER.debug("Executing update: " + queryString.toString()); - - Query query = session.createQuery(queryString.toString()); - query.setParameter("requestId", request.getRequestId()); - if (statusMessage != null) { - query.setParameter("statusMessage", statusMessage); - LOGGER.debug("StatusMessage in updateInfraRequest is set to: " + statusMessage); - } - if (responseBody != null) { - query.setParameter("responseBody", responseBody); - LOGGER.debug("ResponseBody in updateInfraRequest is set to: " + responseBody); - } - if (requestStatus != null) { - query.setParameter("requestStatus", requestStatus.toString()); - LOGGER.debug("RequestStatus in updateInfraRequest is set to: " + requestStatus.toString()); - } - - if (progress != null) { - query.setParameter("progress", Long.parseLong(progress)); - LOGGER.debug("Progress in updateInfraRequest is set to: " + progress); - } - if (vnfOutputs != null) { - query.setParameter("vnfOutputs", vnfOutputs); - LOGGER.debug("VnfOutputs in updateInfraRequest is set to: " + vnfOutputs); - } - if (serviceInstanceId != null) { - query.setParameter("serviceInstanceId", serviceInstanceId); - LOGGER.debug("ServiceInstanceId in updateInfraRequest is set to: " + serviceInstanceId); - } - if (networkId != null) { - query.setParameter("networkId", networkId); - LOGGER.debug("NetworkId in updateInfraRequest is set to: " + networkId); - } - if (vnfId != null) { - query.setParameter("vnfId", vnfId); - LOGGER.debug("VnfId in updateInfraRequest is set to: " + vnfId); - } - if (vfModuleId != null) { - query.setParameter("vfModuleId", vfModuleId); - LOGGER.debug("vfModuleId in updateInfraRequest is set to: " + vfModuleId); - } - if (volumeGroupId != null) { - query.setParameter("volumeGroupId", volumeGroupId); - LOGGER.debug("VolumeGroupId in updateInfraRequest is set to: " + volumeGroupId); - } - if (serviceInstanceName != null) { - query.setParameter("serviceInstanceName", serviceInstanceName); - LOGGER.debug("ServiceInstanceName in updateInfraRequest is set to: " + serviceInstanceName); - } - if (configurationId != null) { - query.setParameter("configurationId", configurationId); - LOGGER.debug("configurationId in updateInfraRequest is set to: " + configurationId); - } - if (configurationName != null) { - query.setParameter("configurationName", configurationName); - LOGGER.debug("configurationName in updateInfraRequest is set to: " + configurationName); - } - if (vfModuleName != null) { - query.setParameter("vfModuleName", vfModuleName); - LOGGER.debug("vfModuleName in updateInfraRequest is set to: " + vfModuleName); - } - Timestamp nowTimeStamp = new Timestamp(System.currentTimeMillis()); - if (request.getRequestStatus() == RequestStatusType.COMPLETE - || request.getRequestStatus() == RequestStatusType.FAILED) { - query.setParameter("endTime", nowTimeStamp); - LOGGER.debug("EndTime in updateInfraRequest is set to: " + nowTimeStamp); - } else { - query.setParameter("modifyTime", nowTimeStamp); - LOGGER.debug("ModifyTime in updateInfraRequest is set to: " + nowTimeStamp); - } - query.setParameter("lastModifiedBy", request.getLastModifiedBy()); - LOGGER.debug("LastModifiedBy in updateInfraRequest is set to: " + request.getLastModifiedBy()); - result = query.executeUpdate(); - checkIfExists(result, request.getRequestId(), startTime); - session.getTransaction().commit(); - } catch (HibernateException e) { - String error = "Unable to update MSO Requests DB: " + e.getMessage(); - LOGGER.error(MessageEnum.RA_CANT_UPDATE_REQUEST, "infra request parameters", request.getRequestId(), "", - "", MsoLogger.ErrorCode.BusinessProcesssError, "HibernateException - " + error, e); - LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, - error); - throw new MsoRequestsDbException(error, e); - } finally { - if (session != null && session.isOpen()) { - session.close(); - } - } - LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful"); - } else { - LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.BadRequest, - "Required fields: requestId and lastModifiedBy"); - } - } - - private void checkIfExists(int result, String requestId, long startTime) throws MsoRequestsDbException { - if (result == 0) { - String error = "Request ID does not exist in MSO Requests DB: " + requestId; - LOGGER.error(MessageEnum.RA_DB_REQUEST_NOT_EXIST, requestId, "", "", MsoLogger.ErrorCode.DataError, error); - throw new MsoRequestsDbException(error); - } - } - - @Override - public InfraActiveRequests getInfraRequest(String requestId) throws MsoRequestsDbException { - long startTime = System.currentTimeMillis(); - MsoLogger.setLogContext(requestId, null); - Session session = requestsDbSessionFactoryManager.getSessionFactory().openSession(); - - LOGGER.debug("Call to MSO Infra RequestsDb adapter get method with request Id: " + requestId); - - InfraActiveRequests request = null; - try { - session.beginTransaction(); - Query query = session.createQuery( - "FROM InfraActiveRequests where requestId = :requestId OR clientRequestId = :requestId"); - query.setParameter("requestId", requestId); - request = (InfraActiveRequests) query.uniqueResult(); - } catch (HibernateException e) { - String error = "Unable to retrieve MSO Infra Requests DB for Request ID " + requestId; - LOGGER.error(MessageEnum.RA_DB_REQUEST_NOT_EXIST, "Get Infra request", requestId, "", "", - MsoLogger.ErrorCode.BusinessProcesssError, "HibernateException - " + error, e); - LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.ERROR, MsoLogger.ResponseCode.DBAccessError, error); - throw new MsoRequestsDbException(error, e); - } finally { - if (session != null && session.isOpen()) { - session.close(); - } - } - LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful"); - return request; - } - - /** - * Get SiteStatus by SiteName. - * - * @param siteName - * The unique name of the site - * @return Status of that site - */ - public boolean getSiteStatus(String siteName) { - UUIDChecker.generateUUID(LOGGER); - Session session = requestsDbSessionFactoryManager.getSessionFactory().openSession(); - - long startTime = System.currentTimeMillis(); - SiteStatus siteStatus = null; - LOGGER.debug("Request database - get Site Status with Site name:" + siteName); - try { - String hql = "FROM SiteStatus WHERE siteName = :site_name"; - Query query = session.createQuery(hql); - query.setParameter("site_name", siteName); - - siteStatus = (SiteStatus) query.uniqueResult(); - } finally { - if (session != null && session.isOpen()) { - session.close(); - } - } - if (siteStatus == null) { - // if not exist in DB, it means the site is not disabled, thus - // return true - LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful"); - return true; - } else { - LOGGER.recordAuditEvent(startTime, MsoLogger.StatusCode.COMPLETE, MsoLogger.ResponseCode.Suc, "Successful"); - return siteStatus.getStatus(); - } - } -} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/MsoRequestsDbException.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/MsoRequestsDbException.java deleted file mode 100644 index a495d0eac1..0000000000 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/MsoRequestsDbException.java +++ /dev/null @@ -1,62 +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.openecomp.mso.client.adapter.requests.db.entities; - - - -import javax.xml.ws.WebFault; - -/** - * This class simply extends Exception (without addition additional functionality) - * to provide an identifier for RequestsDB related exceptions on create, delete, query. - * - * - */ -@WebFault (name="MsoRequestsDbException", faultBean="org.openecomp.mso.adapters.requestsdb.exceptions.MsoRequestsDbExceptionBean", targetNamespace="http://org.openecomp.mso/requestsdb") -public class MsoRequestsDbException extends Exception { - - private static final long serialVersionUID = 1L; - - private MsoRequestsDbExceptionBean faultInfo; - - public MsoRequestsDbException (String msg) { - super(msg); - faultInfo = new MsoRequestsDbExceptionBean (msg); - } - - public MsoRequestsDbException (Throwable e) { - super(e); - faultInfo = new MsoRequestsDbExceptionBean (e.getMessage()); - } - - public MsoRequestsDbException (String msg, Throwable e) { - super (msg, e); - faultInfo = new MsoRequestsDbExceptionBean (msg); - } - - public MsoRequestsDbExceptionBean getFaultInfo() { - return faultInfo; - } - - public void setFaultInfo(MsoRequestsDbExceptionBean faultInfo) { - this.faultInfo = faultInfo; - } -} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/MsoRequestsDbExceptionBean.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/MsoRequestsDbExceptionBean.java deleted file mode 100644 index f566418ade..0000000000 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/MsoRequestsDbExceptionBean.java +++ /dev/null @@ -1,48 +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.openecomp.mso.client.adapter.requests.db.entities; - - -import java.io.Serializable; - -/** - * Jax-WS Fault Bean for MsoRequestsDB Exception - */ -public class MsoRequestsDbExceptionBean implements Serializable { - - private static final long serialVersionUID = 1360000062602372639L; - - private String message; - - public MsoRequestsDbExceptionBean () {} - - public MsoRequestsDbExceptionBean (String message) { - this.message = message; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } -} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/RequestStatusType.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/RequestStatusType.java deleted file mode 100644 index 2fa6f2b6a2..0000000000 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/RequestStatusType.java +++ /dev/null @@ -1,69 +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========================================================= - */ - -// -// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 -// See http://java.sun.com/xml/jaxb -// Any modifications to this file will be lost upon recompilation of the source schema. -// Generated on: 2015.07.24 at 11:49:17 AM EDT -// - - -package org.openecomp.mso.client.adapter.requests.db.entities; - - - -import javax.xml.bind.annotation.XmlEnum; -import javax.xml.bind.annotation.XmlType; - - -/** - *

Java class for request-status-type. - * - *

The following schema fragment specifies the expected content contained within this class. - *

- *

- * <simpleType name="request-status-type">
- *   <restriction base="{http://www.w3.org/2001/XMLSchema}string">
- *     <enumeration value="COMPLETE"/>
- *     <enumeration value="FAILED"/>
- *     <enumeration value="IN_PROGRESS"/>
- *   </restriction>
- * </simpleType>
- * 
- * - */ -@XmlType(name = "request-status-type") -@XmlEnum -public enum RequestStatusType { - - COMPLETE, - FAILED, - IN_PROGRESS; - - public String value() { - return name(); - } - - public static RequestStatusType fromValue(String v) { - return valueOf(v); - } - -} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/ResponseStatus.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/ResponseStatus.java deleted file mode 100644 index cc00fd1ff2..0000000000 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/ResponseStatus.java +++ /dev/null @@ -1,33 +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.openecomp.mso.client.adapter.requests.db.entities; - - - -/* - * Enum for Status values returned by API Handler to Tail-F -*/ -public enum ResponseStatus { - SENDING_FINAL_NOTIFY, - SUCCESS, - FAILED, - TIMEOUT -} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/Status.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/Status.java deleted file mode 100644 index e9750a2b3b..0000000000 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/Status.java +++ /dev/null @@ -1,40 +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.openecomp.mso.client.adapter.requests.db.entities; - - -/* - * Enum for Status values returned by API Handler to Tail-F -*/ -public enum Status { - PENDING, INPROGRESS, COMPLETED, FAILED, TIMEOUT; - - public boolean isFinished () { - switch (this) { - case COMPLETED: - case FAILED: - case TIMEOUT: - return true; - default: - return false; - } - } -} diff --git a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/UpdateInfraRequest.java b/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/UpdateInfraRequest.java deleted file mode 100644 index 15c57253f3..0000000000 --- a/bpmn/MSOCommonBPMN/src/main/java/org/openecomp/mso/client/adapter/requests/db/entities/UpdateInfraRequest.java +++ /dev/null @@ -1,138 +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.openecomp.mso.client.adapter.requests.db.entities; - -public class UpdateInfraRequest { - - private String requestId; - private String lastModifiedBy; - private String statusMessage; - private String responseBody; - private RequestStatusType requestStatus; - private String progress; - private String vnfOutputs; - private String serviceInstanceId; - private String networkId; - private String vnfId; - private String vfModuleId; - private String volumeGroupId; - private String serviceInstanceName; - private String configurationId; - private String configurationName; - private String vfModuleName; - - public String getRequestId() { - return requestId; - } - public void setRequestId(String requestId) { - this.requestId = requestId; - } - public String getLastModifiedBy() { - return lastModifiedBy; - } - public void setLastModifiedBy(String lastModifiedBy) { - this.lastModifiedBy = lastModifiedBy; - } - public String getStatusMessage() { - return statusMessage; - } - public void setStatusMessage(String statusMessage) { - this.statusMessage = statusMessage; - } - public String getResponseBody() { - return responseBody; - } - public void setResponseBody(String responseBody) { - this.responseBody = responseBody; - } - public RequestStatusType getRequestStatus() { - return requestStatus; - } - public void setRequestStatus(RequestStatusType requestStatus) { - this.requestStatus = requestStatus; - } - public String getProgress() { - return progress; - } - public void setProgress(String progress) { - this.progress = progress; - } - public String getVnfOutputs() { - return vnfOutputs; - } - public void setVnfOutputs(String vnfOutputs) { - this.vnfOutputs = vnfOutputs; - } - public String getServiceInstanceId() { - return serviceInstanceId; - } - public void setServiceInstanceId(String serviceInstanceId) { - this.serviceInstanceId = serviceInstanceId; - } - public String getNetworkId() { - return networkId; - } - public void setNetworkId(String networkId) { - this.networkId = networkId; - } - public String getVnfId() { - return vnfId; - } - public void setVnfId(String vnfId) { - this.vnfId = vnfId; - } - public String getVfModuleId() { - return vfModuleId; - } - public void setVfModuleId(String vfModuleId) { - this.vfModuleId = vfModuleId; - } - public String getVolumeGroupId() { - return volumeGroupId; - } - public void setVolumeGroupId(String volumeGroupId) { - this.volumeGroupId = volumeGroupId; - } - public String getServiceInstanceName() { - return serviceInstanceName; - } - public void setServiceInstanceName(String serviceInstanceName) { - this.serviceInstanceName = serviceInstanceName; - } - public String getConfigurationId() { - return configurationId; - } - public void setConfigurationId(String configurationId) { - this.configurationId = configurationId; - } - public String getConfigurationName() { - return configurationName; - } - public void setConfigurationName(String configurationName) { - this.configurationName = configurationName; - } - public String getVfModuleName() { - return vfModuleName; - } - public void setVfModuleName(String vfModuleName) { - this.vfModuleName = vfModuleName; - } -} -- cgit 1.2.3-korg