KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > core > model > ra > SCEPRAExtendedInformation


1 package org.ejbca.core.model.ra;
2
3
4 /**
5  * Class used to store RA specific information about the user, such as public key.
6  *
7  * Should be used standalone and not extend any other type of ExtendedInformation.
8  *
9  * @author Philip Vendil
10  * $id$
11  */

12 public class SCEPRAExtendedInformation extends ExtendedInformation {
13         
14     public static final float LATEST_VERSION = 0;
15     
16     private static final String JavaDoc SCEPREQUEST = "sceprequest";
17     private static final String JavaDoc USER = "user";
18
19     /**
20      * Constructor that only should be used for serialization/deserialization.
21      *
22      */

23     public SCEPRAExtendedInformation(){
24         super();
25         setType(TYPE_SCEPRA);
26     }
27     
28     /**
29      * Default Construtor
30      */

31     public SCEPRAExtendedInformation(String JavaDoc sceprequest, String JavaDoc user) {
32         super();
33         setType(TYPE_SCEPRA);
34         data.put(SCEPREQUEST, sceprequest);
35         data.put(USER,user);
36     }
37     
38     /**
39      * @return Returns the request.
40      */

41     public String JavaDoc getSCEPRequest() {
42         return (String JavaDoc) data.get(SCEPREQUEST);
43     }
44     
45     /**
46      * @return Returns the user.
47      */

48     public String JavaDoc getUser() {
49         return (String JavaDoc) data.get(USER);
50     }
51     
52     /**
53      * @see se.anatom.ejbca.ra.ExtendedInformation#getLatestVersion()
54      */

55     public float getLatestVersion() {
56         return LATEST_VERSION;
57     }
58     /* *
59      * @see se.anatom.ejbca.ra.ExtendedInformation#upgrade()
60      */

61     public void upgrade() {
62         if(Float.compare(LATEST_VERSION, getVersion()) != 0) {
63             
64             data.put(VERSION, new Float JavaDoc(LATEST_VERSION));
65         }
66     }
67     
68 }
69
Popular Tags