From f5f13c4f6b6fe3b4d98e349dfd7db59339803436 Mon Sep 17 00:00:00 2001 From: Michael Lando Date: Sun, 19 Feb 2017 12:35:04 +0200 Subject: push addional code Change-Id: Ia427bb3460cda3a896f8faced2de69eaf3807b74 Signed-off-by: Michael Lando --- .../action-library-rest-types/pom.xml | 37 +++++ .../sdcrests/action/types/ActionResponseDto.java | 149 +++++++++++++++++++++ .../sdcrests/action/types/ActionVersionDto.java | 38 ++++++ .../sdcrests/action/types/ListResponseWrapper.java | 70 ++++++++++ 4 files changed, 294 insertions(+) create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/pom.xml create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ActionResponseDto.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ActionVersionDto.java create mode 100644 openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ListResponseWrapper.java (limited to 'openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types') diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/pom.xml new file mode 100644 index 0000000000..18a52bd940 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/pom.xml @@ -0,0 +1,37 @@ + + + 4.0.0 + + org.openecomp.sdc.onboarding + action-library-rest + 1.0.0-SNAPSHOT + ../ + + + action-library-rest-types + action-library-rest-types + + + + + + org.openecomp.sdc + openecomp-sdc-common-rest + ${project.version} + + + org.openecomp.sdc + openecomp-sdc-action-api + ${project.version} + + + + + + \ No newline at end of file diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ActionResponseDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ActionResponseDto.java new file mode 100644 index 0000000000..ff2a934f83 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ActionResponseDto.java @@ -0,0 +1,149 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * 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.sdcrests.action.types; + + +import java.util.HashMap; +import java.util.List; + +/** + * Defines DTO used for Action Response. + */ +public class ActionResponseDto { + + String actionUuId; + String actionInvariantUuId; + String name; + String displayName; + String version; + String description; + String status; + String timestamp; + String updatedBy; + List vendorList; + List categoryList; + List> supportedModels; + List> supportedComponents; + + public String getActionUuId() { + return actionUuId; + } + + public void setActionUuId(String actionUuId) { + this.actionUuId = actionUuId; + } + + public String getActionInvariantUuId() { + return actionInvariantUuId; + } + + public void setActionInvariantUuId(String actionInvariantUuId) { + this.actionInvariantUuId = actionInvariantUuId; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public String getStatus() { + return status; + } + + public void setStatus(String status) { + this.status = status; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public List getCategoryList() { + return categoryList; + } + + public void setCategoryList(List categoryList) { + this.categoryList = categoryList; + } + + public List getVendorList() { + return vendorList; + } + + public void setVendorList(List vendorList) { + this.vendorList = vendorList; + } + + public List> getSupportedComponents() { + return supportedComponents; + } + + public void setSupportedComponents(List> supportedComponents) { + this.supportedComponents = supportedComponents; + } + + public List> getSupportedModels() { + return supportedModels; + } + + public void setSupportedModels(List> supportedModels) { + this.supportedModels = supportedModels; + } + + public String getTimestamp() { + return timestamp; + } + + public void setTimestamp(String timeStamp) { + this.timestamp = timeStamp; + } + + public String getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(String updatedBy) { + this.updatedBy = updatedBy; + } +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ActionVersionDto.java b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ActionVersionDto.java new file mode 100644 index 0000000000..1b3a5cb445 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ActionVersionDto.java @@ -0,0 +1,38 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * 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.sdcrests.action.types; + +/** + * Defines DTO for capturing input for versioning operations. + */ +public class ActionVersionDto { + + String status; + + public String getStatus() { + return status; + } + + public void setStatus(String workflowActionStatus) { + this.status = workflowActionStatus.trim(); + } + +} diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ListResponseWrapper.java b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ListResponseWrapper.java new file mode 100644 index 0000000000..0ae8504db5 --- /dev/null +++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-types/src/main/java/org/openecomp/sdcrests/action/types/ListResponseWrapper.java @@ -0,0 +1,70 @@ +/*- + * ============LICENSE_START======================================================= + * SDC + * ================================================================================ + * 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.sdcrests.action.types; + +import org.openecomp.sdc.action.types.EcompComponent; + +import java.util.ArrayList; +import java.util.List; + +/** + * Defines DTO used for creating Response with list of {@link ActionResponseDto } + * or list of {@link EcompComponent }. + */ +public class ListResponseWrapper { + + List actionList; + List componentList; + List versions; + + + public ListResponseWrapper() { + this.actionList = new ArrayList<>(); + } + + public List getVersions() { + return versions; + } + + public void setVersions(List versions) { + this.versions = versions; + } + + public List getActionList() { + return actionList; + } + + public void setActionList(List actionList) { + this.actionList = actionList; + } + + public List getComponentList() { + return componentList; + } + + public void setComponentList(List componentList) { + this.componentList = componentList; + } + + public void add(ActionResponseDto e0) { + this.getActionList().add(e0); + } +} -- cgit 1.2.3-korg