2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
21 package org.openecomp.mso.apihandlerinfra.serviceinstancebeans;
23 import java.util.ArrayList;
24 import java.util.HashMap;
25 import java.util.List;
28 import org.codehaus.jackson.annotate.JsonIgnore;
29 import org.codehaus.jackson.map.annotate.JsonSerialize;
30 import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion;
32 import org.openecomp.mso.apihandlerinfra.MsoRequest;
34 @JsonSerialize(include=JsonSerialize.Inclusion.NON_DEFAULT)
35 public class RequestParameters {
37 private String subscriptionServiceType;
38 private List<Map<String, String>> userParams = new ArrayList<>();
39 @JsonSerialize(include=Inclusion.ALWAYS)
40 private boolean aLaCarte = false;
42 private boolean isALaCarteSet = false;
43 @JsonSerialize(include=Inclusion.ALWAYS)
44 private boolean autoBuildVfModules = false;
45 @JsonSerialize(include=Inclusion.ALWAYS)
46 private boolean cascadeDelete = false;
49 public String getSubscriptionServiceType() {
50 return subscriptionServiceType;
53 public void setSubscriptionServiceType(String subscriptionServiceType) {
54 this.subscriptionServiceType = subscriptionServiceType;
57 public boolean getALaCarte() {
61 public void setaLaCarte(boolean aLaCarte) {
62 this.aLaCarte = aLaCarte;
63 this.isALaCarteSet = true;
66 //returns true if aLaCarte param came in on request
67 public boolean isALaCarteSet() {
71 public boolean isaLaCarte() {
75 public List<Map<String, String>> getUserParams() {
79 public void setUserParams(List<Map<String, String>> userParams) {
80 this.userParams = userParams;
83 public String getUserParamValue(String name){
85 for(Map<String, String> param:userParams){
86 if(param.get("name").equals(name)){
87 return param.get("value");
94 public boolean getAutoBuildVfModules() {
95 return autoBuildVfModules;
98 public void setAutoBuildVfModules(boolean autoBuildVfModules) {
99 this.autoBuildVfModules = autoBuildVfModules;
102 public boolean getCascadeDelete() {
103 return cascadeDelete;
106 public void setCascadeDelete(boolean cascadeDelete) {
107 this.cascadeDelete = cascadeDelete;
111 public String toString() {
112 return "RequestParameters [subscriptionServiceType="
113 + subscriptionServiceType + ", userParams=" + userParams
114 + ", aLaCarte=" + aLaCarte + ", autoBuildVfModules="
115 + autoBuildVfModules + "]";