summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/certsrv/ra/IRegistrationAuthority.java
blob: 9eb438c4f127620d66350bef79f866ba6908a9eb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
// --- BEGIN COPYRIGHT BLOCK ---
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// (C) 2007 Red Hat, Inc.
// All rights reserved.
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ra;


import java.io.*;
import java.net.*;
import java.util.*;
import java.math.*;
import java.security.*;
import java.security.cert.*;
import netscape.security.x509.*;
import netscape.security.util.*;

import com.netscape.certsrv.base.*;
import com.netscape.certsrv.policy.*;
import com.netscape.certsrv.publish.*;
import com.netscape.certsrv.request.*;


/**
 * An interface represents a Registration Authority that is
 * responsible for certificate enrollment operations.
 * <P>
 *
 * @version $Revision$, $Date$
 */
public interface IRegistrationAuthority extends ISubsystem {
    public static final String ID = "ra";

    public static final String PROP_POLICY = "Policy";
    public static final String PROP_REGISTRATION = "Registration";
    public static final String PROP_GATEWAY = "gateway";
    public static final String PROP_NICKNAME = "certNickname";
    //public final static String PROP_PUBLISH_SUBSTORE = "publish";
    //public final static String PROP_LDAP_PUBLISH_SUBSTORE = "ldappublish";
    public final static String PROP_CONNECTOR = "connector";
    public final static String PROP_NEW_NICKNAME = "newNickname";

    // for the notification listeners
    public final static String PROP_NOTIFY_SUBSTORE = "notification";
    public final static String PROP_CERT_ISSUED_SUBSTORE = "certIssued";
    public final static String PROP_CERT_REVOKED_SUBSTORE = "certRevoked";
    public final static String PROP_REQ_IN_Q_SUBSTORE = "requestInQ";

    /**
     * Retrieves the request queue of this registration authority.
     *
     * @return RA's request queue
     */
    public IRequestQueue getRequestQueue();

    /**
     * Retrieves the publishing processor of this registration authority.
     *
     * @return RA's publishing processor
     */
    public IPublisherProcessor getPublisherProcessor();

    /**
     * Retrieves the policy processor of this registration authority.
     *
     * @return RA's policy processor
     */
    public IPolicyProcessor getPolicyProcessor();

    /**
     * Retrieves the RA certificate.
     *
     * @return the RA certificate
     */
    public org.mozilla.jss.crypto.X509Certificate getRACert();

    /**
     * Retrieves the request in queue listener.
     *
     * @return the request in queue listener
     */
    public IRequestListener getRequestInQListener();

    /**
     * Retrieves the request listener for issued certificates.
     *
     * @return the request listener for issued certificates
     */
    public IRequestListener getCertIssuedListener();

    /**
     * Retrieves the request listener for revoked certificates.
     *
     * @return the request listener for revoked certificates
     */
    public IRequestListener getCertRevokedListener();

    /**
     * Returns the nickname of the RA certificate.
     *
     * @return the nickname of the RA certificate
     */
    public String getNickname();

    /**
     * Retrieves the nickname of the RA certificate from configuration store.
     *
     * @return the nickname of the RA certificate
     * @exception EBaseException failed to get nickname
     */
    public String getNewNickName() throws EBaseException;

    /**
     * Sets the new nickname of the RA certifiate.
     *
     * @param name new nickname
     */
    public void setNewNickName(String name);

    /**
     * Sets the nickname of the RA certifiate.
     *
     * @param str nickname
     */
    public void setNickname(String str);

    /**
     * Retrieves the default validity period.
     *
     * @return the default validity length in days
     */
    public long getDefaultValidity();

    /**
     * Retrieves the issuer name of this registration authority.
     *
     * @return the issuer name of this registration authority
     */
    public X500Name getX500Name();

    /**
     * Retrieves the RA service object that is responsible for
     * processing requests.
     *
     * @return RA service object
     */
    public IRAService getRAService(); 

    /**
     * Retrieves the request listener by name.
     *
     * @param name request listener name
     * @return the request listener
     */
    public IRequestListener getRequestListener(String name); 

    /**
     * Retrieves all request listeners.
     *
     * @return name enumeration of all request listeners
     */
    public Enumeration getRequestListenerNames();
}