001/*
002 * (C) Copyright 2011 Nuxeo SA (http://nuxeo.com/) and others.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 *
016 * Contributors:
017 *     Wojciech Sulejman
018 */
019
020package org.nuxeo.ecm.platform.signature.core.pki;
021
022import org.nuxeo.common.xmap.annotation.XNode;
023import org.nuxeo.common.xmap.annotation.XObject;
024
025/**
026 * Provides configuration information for root certificate generation services.
027 * <p>
028 * As the root keystore needs to be configurable by the system administrator, this configuration object allows the
029 * administrator to store the root keystore location and access information as XML elements. This information is used by
030 * the certificate authority services for signing user certificates and for exposing the root certificate object to the
031 * user interface.
032 *
033 * @author <a href="mailto:ws@nuxeo.com">Wojciech Sulejman</a>
034 */
035
036@XObject("configuration")
037public class RootDescriptor {
038
039    @XNode("rootKeystoreFilePath")
040    protected String rootKeystoreFilePath;
041
042    @XNode("rootKeystorePassword")
043    protected String rootKeystorePassword;
044
045    @XNode("rootCertificateAlias")
046    protected String rootCertificateAlias;
047
048    @XNode("rootKeyAlias")
049    protected String rootKeyAlias;
050
051    @XNode("rootKeyPassword")
052    protected String rootKeyPassword;
053
054    public String getRootKeyAlias() {
055        return rootKeyAlias;
056    }
057
058    public void setRootKeyAlias(String rootKeyAlias) {
059        this.rootKeyAlias = rootKeyAlias;
060    }
061
062    public String getRootKeyPassword() {
063        return rootKeyPassword;
064    }
065
066    public void setRootKeyPassword(String rootKeyPassword) {
067        this.rootKeyPassword = rootKeyPassword;
068    }
069
070    public String getRootKeystorePassword() {
071        return rootKeystorePassword;
072    }
073
074    public void setRootKeystorePassword(String rootKeystorePassword) {
075        this.rootKeystorePassword = rootKeystorePassword;
076    }
077
078    public String getRootCertificateAlias() {
079        return rootCertificateAlias;
080    }
081
082    public void setRootCertificateAlias(String rootCertificateAlias) {
083        this.rootCertificateAlias = rootCertificateAlias;
084    }
085
086    public String getRootKeystoreFilePath() {
087        return rootKeystoreFilePath;
088    }
089
090    public void setRootKeystoreFilePath(String rootKeystoreFilePath) {
091        this.rootKeystoreFilePath = rootKeystoreFilePath;
092    }
093
094    private boolean remove;
095
096    @XNode("removeExtension")
097    protected void setRemoveExtension(boolean remove) {
098        this.remove = remove;
099    }
100
101    public boolean getRemoveExtension() {
102        return remove;
103    }
104}