KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > core > model > ca > caadmin > extendedcaservices > BaseSigningCAServiceInfo


1 /*************************************************************************
2  * *
3  * EJBCA: The OpenSource Certificate Authority *
4  * *
5  * This software is free software; you can redistribute it and/or *
6  * modify it under the terms of the GNU Lesser General Public *
7  * License as published by the Free Software Foundation; either *
8  * version 2.1 of the License, or any later version. *
9  * *
10  * See terms of license at gnu.org. *
11  * *
12  *************************************************************************/

13  
14 package org.ejbca.core.model.ca.caadmin.extendedcaservices;
15
16 import java.io.Serializable JavaDoc;
17 import java.util.List JavaDoc;
18
19 import org.ejbca.core.model.ca.catoken.CATokenConstants;
20
21
22
23 /**
24  * Base class for CAServiceInfo used by extended services that does signing
25  *
26  *
27  * @version $Id: BaseSigningCAServiceInfo.java,v 1.1 2006/12/27 11:13:55 anatom Exp $
28  */

29 public class BaseSigningCAServiceInfo extends ExtendedCAServiceInfo implements Serializable JavaDoc {
30        
31     private String JavaDoc subjectdn = null;
32     private String JavaDoc subjectaltname = null;
33     private String JavaDoc keyspec = "1024"; // Default key length
34
private String JavaDoc keyalgorithm = CATokenConstants.KEYALGORITHM_RSA; // Default key algo
35
private List JavaDoc certchain = null;
36     
37     private boolean renew = false;
38            
39     /**
40      * Used when creating new service.
41      */

42        
43     public BaseSigningCAServiceInfo(int status,
44                              String JavaDoc subjectdn,
45                              String JavaDoc subjectaltname,
46                              String JavaDoc keyspec,
47                              String JavaDoc keyalgorithm){
48       super(status);
49       this.subjectdn = subjectdn;
50       this.subjectaltname = subjectaltname;
51       this.keyspec = keyspec;
52       this.keyalgorithm = keyalgorithm;
53     }
54     
55     /**
56      * Used when returning information from service
57      */

58        
59     public BaseSigningCAServiceInfo(int status,
60                              String JavaDoc subjectdn,
61                              String JavaDoc subjectaltname,
62                              String JavaDoc keyspec,
63                              String JavaDoc keyalgorithm,
64                              List JavaDoc certpath){
65       super(status);
66       this.subjectdn = subjectdn;
67       this.subjectaltname = subjectaltname;
68       this.keyspec = keyspec;
69       this.keyalgorithm = keyalgorithm;
70       this.certchain = certpath;
71     }
72     
73     /*
74      * Used when updating existing services, only status is used.
75      */

76     public BaseSigningCAServiceInfo(int status, boolean renew){
77       super(status);
78       this.renew = renew;
79     }
80     
81     public String JavaDoc getSubjectDN(){ return this.subjectdn; }
82     public String JavaDoc getSubjectAltName(){ return this.subjectaltname; }
83     public String JavaDoc getKeySpec(){ return this.keyspec; }
84     public String JavaDoc getKeyAlgorithm(){ return this.keyalgorithm; }
85     public boolean getRenewFlag(){ return this.renew; }
86     public List JavaDoc getCertificatePath(){ return this.certchain;}
87     
88     
89
90 }
91
Popular Tags