View Javadoc
1   /*
2    * Licensed under the GPL License. You may not use this file except in compliance with the License.
3    * You may obtain a copy of the License at
4    *
5    *   https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
6    *
7    * THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
8    * WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR
9    * PURPOSE.
10   */
11  package psiprobe.model.certificates;
12  
13  import java.io.Serializable;
14  import java.util.ArrayList;
15  import java.util.Collection;
16  import java.util.Collections;
17  import java.util.List;
18  
19  /**
20   * The Class ConnectorInfo.
21   */
22  public class ConnectorInfo implements Serializable {
23  
24    /** The Constant serialVersionUID. */
25    private static final long serialVersionUID = 5927447793822367835L;
26  
27    /** The name. */
28    private String name;
29  
30    /** The default SslHostConfig name. */
31    private String defaultSslHostConfigName;
32  
33    /** SslHostConfig infos. */
34    private List<SslHostConfigInfo> sslHostConfigInfos;
35  
36    /**
37     * Gets the name.
38     *
39     * @return the name
40     */
41    public String getName() {
42      return name;
43    }
44  
45    /**
46     * Sets the name.
47     *
48     * @param name the new name
49     */
50    public void setName(String name) {
51      this.name = name;
52    }
53  
54    /**
55     * Gets the SslHostConfig infos.
56     *
57     * @return the SslHostConfig infos
58     */
59    public List<SslHostConfigInfo> getSslHostConfigInfos() {
60      return sslHostConfigInfos == null ? Collections.emptyList()
61          : new ArrayList<>(sslHostConfigInfos);
62    }
63  
64    /**
65     * Sets SslHostConfig infos.
66     *
67     * @param sslHostConfigInfos new SslHostConfig infos
68     */
69    public void setSslHostConfigInfos(Collection<SslHostConfigInfo> sslHostConfigInfos) {
70      this.sslHostConfigInfos =
71          sslHostConfigInfos == null ? Collections.emptyList() : new ArrayList<>(sslHostConfigInfos);
72    }
73  
74    /**
75     * Gets the default SslHostConfig name.
76     *
77     * @return the default SslHostConfig name
78     */
79    public String getDefaultSslHostConfigName() {
80      return defaultSslHostConfigName;
81    }
82  
83    /**
84     * Sets the default SslHostConfig name.
85     *
86     * @param defaultSslHostConfigName the new default SslHostConfig name
87     */
88    public void setDefaultSslHostConfigName(String defaultSslHostConfigName) {
89      this.defaultSslHostConfigName = defaultSslHostConfigName;
90    }
91  
92  }