2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2020 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.onap.dmaap.dbcapi.server;
23 import org.onap.dmaap.dbcapi.logging.BaseLoggingClass;
25 public abstract class CertificateManager extends BaseLoggingClass{
30 private String password;
32 private String getType() {
35 private void setType(String certificateType) {
36 this.type = certificateType;
38 private String getFile() {
41 private void setFile(String keyStoreFile) {
42 this.file = keyStoreFile;
44 private void setPassword( String pwd ) {
47 private String getPassword() {
52 private cmAttribute keyStore;
53 private cmAttribute trustStore;
54 protected boolean ready;
56 CertificateManager() {
57 keyStore = new cmAttribute();
58 trustStore = new cmAttribute();
62 public boolean isReady() {
66 public String getKeyStoreType() {
67 return keyStore.getType();
69 public void setKeyStoreType(String certificateType) {
70 this.keyStore.setType( certificateType) ;
72 public String getKeyStoreFile() {
73 return keyStore.getFile();
75 public void setKeyStoreFile(String keyStoreFile) {
76 this.keyStore.setFile(keyStoreFile);
79 public String getKeyStorePassword() {
80 return keyStore.getPassword();
82 public void setKeyStorePassword(String keyStorePassword) {
83 this.keyStore.setPassword(keyStorePassword);
85 public String getTrustStoreType() {
86 return trustStore.getType();
88 public void setTrustStoreType( String type ) {
89 this.trustStore.setType(type);
91 public String getTrustStoreFile() {
92 return trustStore.getFile();
94 public void setTrustStoreFile(String trustStoreFile) {
95 this.trustStore.setFile(trustStoreFile);
97 public String getTrustStorePassword() {
98 return trustStore.getPassword();
100 public void setTrustStorePassword(String trustStorePassword) {
101 this.trustStore.setPassword(trustStorePassword);