Merge "MicroserviceParameter class DB constraints"
[portal.git] / ecomp-portal-BE-common / src / main / java / org / onap / portalapp / portal / domain / MicroserviceData.java
1 /*-
2  * ============LICENSE_START==========================================
3  * ONAP Portal
4  * ===================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ===================================================================
7  *
8  * Unless otherwise specified, all software contained herein is licensed
9  * under the Apache License, Version 2.0 (the "License");
10  * you may not use this software except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *             http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  * Unless otherwise specified, all documentation contained herein is licensed
22  * under the Creative Commons License, Attribution 4.0 Intl. (the "License");
23  * you may not use this documentation except in compliance with the License.
24  * You may obtain a copy of the License at
25  *
26  *             https://creativecommons.org/licenses/by/4.0/
27  *
28  * Unless required by applicable law or agreed to in writing, documentation
29  * distributed under the License is distributed on an "AS IS" BASIS,
30  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
31  * See the License for the specific language governing permissions and
32  * limitations under the License.
33  *
34  * ============LICENSE_END============================================
35  *
36  * 
37  */
38 package org.onap.portalapp.portal.domain;
39
40 import java.util.List;
41
42 import javax.persistence.Column;
43 import javax.persistence.GeneratedValue;
44 import javax.persistence.GenerationType;
45 import javax.persistence.Id;
46
47 import javax.validation.Valid;
48 import org.hibernate.validator.constraints.SafeHtml;
49 import org.onap.portalsdk.core.domain.support.DomainVo;
50
51 public class MicroserviceData extends DomainVo {
52
53         private static final long serialVersionUID = 1L;
54
55         public MicroserviceData() {
56
57         }
58
59         private Long id;
60         @SafeHtml
61         private String name;
62         @SafeHtml
63         private String active;
64         @SafeHtml
65         private String desc;
66
67         private long appId;
68         @SafeHtml
69         private String url;
70         @SafeHtml
71         private String securityType;
72         @SafeHtml
73         private String username;
74         @SafeHtml
75         private String password;
76         @Valid
77         private List<MicroserviceParameter> parameterList;
78
79         public Long getId() {
80                 return id;
81         }
82
83         public void setId(Long id) {
84                 this.id = id;
85         }
86
87         public String getName() {
88                 return name;
89         }
90
91         public void setName(String name) {
92                 this.name = name;
93         }
94
95         public String getActive() {
96                 return active;
97         }
98
99         public void setActive(String active) {
100                 this.active = active;
101         }
102
103         public String getDesc() {
104                 return desc;
105         }
106
107         public void setDesc(String desc) {
108                 this.desc = desc;
109         }
110
111         public long getAppId() {
112                 return appId;
113         }
114
115         public void setAppId(long appId) {
116                 this.appId = appId;
117         }
118
119         public String getUrl() {
120                 return url;
121         }
122
123         public void setUrl(String url) {
124                 this.url = url;
125         }
126
127         public String getSecurityType() {
128                 return securityType;
129         }
130
131         public void setSecurityType(String securityType) {
132                 this.securityType = securityType;
133         }
134
135         public String getUsername() {
136                 return username;
137         }
138
139         public void setUsername(String username) {
140                 this.username = username;
141         }
142
143         public String getPassword() {
144                 return password;
145         }
146
147         public void setPassword(String password) {
148                 this.password = password;
149         }
150
151         public List<MicroserviceParameter> getParameterList() {
152                 return parameterList;
153         }
154
155         public void setParameterList(List<MicroserviceParameter> parameterList) {
156                 this.parameterList = parameterList;
157         }
158
159         @Override
160         public String toString() {
161                 return "MicroserviceData [id=" + id + ", name=" + name + ", desc=" + desc + ", appId=" + appId + ", url=" + url
162                                 + ", securityType=" + securityType + ", username=" + username + ", password=" + password
163                                 + ", parameterList=" + parameterList + "]";
164         }
165
166 }