KickJava   Java API By Example, From Geeks To Geeks.

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


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 org.ejbca.core.model.UpgradeableDataHashMap;
17 import org.ejbca.core.model.ca.caadmin.CA;
18
19
20 /**
21  * ExtendedCAService base class.
22  *
23  * @version $Id: ExtendedCAService.java,v 1.1 2006/01/17 20:30:56 anatom Exp $
24  */

25 public abstract class ExtendedCAService extends UpgradeableDataHashMap implements java.io.Serializable JavaDoc{
26     
27     public static final String JavaDoc EXTENDEDCASERVICETYPE = "extendedcaservicetype";
28
29     public final String JavaDoc SERVICENAME = "";
30         
31     public static final String JavaDoc STATUS = "status";
32     
33     protected void setStatus(int status){ this.data.put(STATUS, new Integer JavaDoc(status)); }
34     
35     protected int getStatus(){ return ((Integer JavaDoc) data.get(STATUS)).intValue(); }
36     
37     /**
38      * Initializes the ExtendedCAService
39      *
40      * @param info contains information used to activate the service.
41      */

42     public abstract void init(CA ca) throws Exception JavaDoc;
43     
44     
45     /**
46      * Update the ExtendedCAService data
47      *
48      * @param info contains information used to activate the service.
49      */

50     public abstract void update(ExtendedCAServiceInfo info, CA ca) throws Exception JavaDoc;
51             
52
53     /**
54      * Method used to retrieve information about the service.
55      */

56
57     public abstract ExtendedCAServiceInfo getExtendedCAServiceInfo();
58
59     /**
60      * Method used to perform the service.
61      */

62     public abstract ExtendedCAServiceResponse extendedService(ExtendedCAServiceRequest request)
63       throws ExtendedCAServiceRequestException, IllegalExtendedCAServiceRequestException, ExtendedCAServiceNotActiveException;
64
65     
66 }
67
Popular Tags