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