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.List;
17
18 /**
19 * Certificate Information Class.
20 */
21 public class CertificateInfo implements Serializable {
22
23 /** The Constant serialVersionUID. */
24 private static final long serialVersionUID = 8528148811876736528L;
25
26 /** The key store certs. */
27 private List<Cert> keyStoreCerts;
28
29 /** The certificate key alias. */
30 private String certificateKeyAlias;
31
32 /** The certificate keystore file. */
33 private String certificateKeystoreFile;
34
35 /** The certificate keystore password. */
36 private String certificateKeystorePassword;
37
38 /** The certificate keystore provider. */
39 private String certificateKeystoreProvider;
40
41 /** The certificate keystore type. */
42 private String certificateKeystoreType;
43
44 /**
45 * Gets the key store certs.
46 *
47 * @return the key store certs
48 */
49 public List<Cert> getKeyStoreCerts() {
50 return keyStoreCerts == null ? List.of() : new ArrayList<>(keyStoreCerts);
51 }
52
53 /**
54 * Sets the key store certs.
55 *
56 * @param keyStoreCerts the new key store certs
57 */
58 public void setKeyStoreCerts(Collection<Cert> keyStoreCerts) {
59 this.keyStoreCerts = keyStoreCerts == null ? List.of() : new ArrayList<>(keyStoreCerts);
60 }
61
62 /**
63 * Gets the certificate key alias.
64 *
65 * @return the certificate key alias
66 */
67 public String getKeyAlias() {
68 return certificateKeyAlias;
69 }
70
71 /**
72 * Sets the certificate key alias.
73 *
74 * @param keyAlias the new certificate key alias
75 */
76 public void setKeyAlias(String keyAlias) {
77 this.certificateKeyAlias = keyAlias;
78 }
79
80 /**
81 * Gets the certificate keystore file.
82 *
83 * @return the certificate keystore file
84 */
85 public String getCertificateKeystoreFile() {
86 return certificateKeystoreFile;
87 }
88
89 /**
90 * Sets the certificate keystore file.
91 *
92 * @param keystoreFile the new certificate keystore file
93 */
94 public void setCertificateKeystoreFile(String keystoreFile) {
95 this.certificateKeystoreFile = keystoreFile;
96 }
97
98 /**
99 * Gets the certificate keystore password.
100 *
101 * @return the certificate keystore password
102 */
103 public String getCertificateKeystorePassword() {
104 return certificateKeystorePassword;
105 }
106
107 /**
108 * Sets the certificate keystore password.
109 *
110 * @param keystorePass the new certificate keystore password
111 */
112 public void setCertificateKeystorePassword(String keystorePass) {
113 this.certificateKeystorePassword = keystorePass;
114 }
115
116 /**
117 * Gets the certificate keystore provider.
118 *
119 * @return the certificate keystore provider
120 */
121 public String getCertificateKeystoreProvider() {
122 return certificateKeystoreProvider;
123 }
124
125 /**
126 * Sets the certificate keystore provider.
127 *
128 * @param keystoreProvider the new certificate keystore provider
129 */
130 public void setCertificateKeystoreProvider(String keystoreProvider) {
131 this.certificateKeystoreProvider = keystoreProvider;
132 }
133
134 /**
135 * Gets the certificate keystore type.
136 *
137 * @return the certificate keystore type
138 */
139 public String getCertificateKeystoreType() {
140 return certificateKeystoreType;
141 }
142
143 /**
144 * Sets the certificate keystore type.
145 *
146 * @param keystoreType the new certificate keystore type
147 */
148 public void setCertificateKeystoreType(String keystoreType) {
149 this.certificateKeystoreType = keystoreType;
150 }
151
152 }