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.sdc.common.test.config;
23 import org.openecomp.sdc.common.api.BasicConfiguration;
25 import java.util.Date;
26 import java.util.List;
29 import static java.lang.String.format;
31 public class TestConfiguration extends BasicConfiguration {
36 private String beHost;
40 private Integer beHttpPort;
42 * backend http secured port
44 private Integer beSslPort;
48 private String beContext;
50 * backend protocol. http | https
52 private String beProtocol = "http";
54 private Date released;
55 private String version = "1111";
56 private TestConnection connection;
57 private List<String> protocols;
58 private Map<String, String> users;
60 public Date getReleased() {
64 public String getVersion() {
68 public void setReleased(Date released) {
69 this.released = released;
72 public void setVersion(String version) {
73 this.version = version;
76 public TestConnection getConnection() {
80 public void setConnection(TestConnection connection) {
81 this.connection = connection;
84 public List<String> getProtocols() {
88 public void setProtocols(List<String> protocols) {
89 this.protocols = protocols;
92 public Map<String, String> getUsers() {
96 public void setUsers(Map<String, String> users) {
100 public String getBeHost() {
104 public void setBeHost(String beHost) {
105 this.beHost = beHost;
108 public Integer getBeHttpPort() {
112 public void setBeHttpPort(Integer beHttpPort) {
113 this.beHttpPort = beHttpPort;
116 public Integer getBeSslPort() {
120 public void setBeSslPort(Integer beSslPort) {
121 this.beSslPort = beSslPort;
124 public String getBeContext() {
128 public void setBeContext(String beContext) {
129 this.beContext = beContext;
132 public String getBeProtocol() {
136 public void setBeProtocol(String beProtocol) {
137 this.beProtocol = beProtocol;
141 public String toString() {
142 return new StringBuilder().append(format("backend host: %s\n", beHost))
143 .append(format("backend http port: %s\n", beHttpPort))
144 .append(format("backend ssl port: %s\n", beSslPort)).append(format("backend context: %s\n", beContext))
145 .append(format("backend protocol: %s\n", beProtocol)).append(format("Version: %s\n", version))
146 .append(format("Released: %s\n", released)).append(format("Connecting to database: %s\n", connection))
147 .append(format("Supported protocols: %s\n", protocols)).append(format("Users: %s\n", users)).toString();