KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ejbca > core > model > hardtoken > profiles > IPINEnvelopeSettings


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.hardtoken.profiles;
15
16 import java.awt.print.Printable JavaDoc;
17 import java.awt.print.PrinterException JavaDoc;
18 import java.io.IOException JavaDoc;
19
20 import org.ejbca.core.model.ra.UserDataVO;
21
22
23
24
25
26
27 /**
28  * Interface contating methods that need to be implementet in order
29  * to have a hard token profile contain PIN Envelope settings.
30  *
31  * @version $Id: IPINEnvelopeSettings.java,v 1.2 2006/01/26 14:17:58 anatom Exp $
32  */

33
34 public interface IPINEnvelopeSettings {
35
36
37     /**
38      * Constant indicating that no envelope should be printed.
39      */

40     public static int PINENVELOPETYPE_NONE = 0;
41     /**
42      * Constant indicating that a general envelope type should be printed.
43      */

44     public static int PINENVELOPETYPE_GENERALENVELOBE = 1;
45     
46     /**
47      * @return the type of PIN envelope to print.
48      */

49     public abstract int getPINEnvelopeType();
50
51     /**
52      * sets the pin envelope type.
53      */

54     public abstract void setPINEnvelopeType(int pinenvelopetype);
55     
56     /**
57      * @return the filename of the current PIN envelope template.
58      */

59     public abstract String JavaDoc getPINEnvelopeTemplateFilename();
60
61     /**
62      * Sets the filename of the current PIN envelope template.
63      */

64     public abstract void setPINEnvelopeTemplateFilename(String JavaDoc filename);
65     
66     /**
67      * @return the data of the PIN Envelope template.
68      */

69     public abstract String JavaDoc getPINEnvelopeData();
70     
71     /**
72      * Sets the data of the PIN envelope template.
73      */

74     public abstract void setPINEnvelopeData(String JavaDoc data);
75
76     /**
77      * @return the number of copies of this PIN Envelope that should be printed.
78      */

79     public abstract int getNumberOfPINEnvelopeCopies();
80
81     /**
82      * Sets the number of copies of this PIN Envelope that should be printed.
83      */

84     public abstract void setNumberOfPINEnvelopeCopies(int copies);
85
86     /**
87      * @return the validity of the visual layout in days.
88      */

89     public abstract int getVisualValidity();
90
91     /**
92      * Sets the validity of the visual layout in days.
93      */

94     public abstract void setVisualValidity(int validity);
95
96    /**
97     * Method that parses the template, replaces the userdata
98     * and returning a printable byte array
99     */

100     public abstract Printable JavaDoc printPINEnvelope(UserDataVO userdata,
101                                             String JavaDoc[] pincodes, String JavaDoc[] pukcodes,
102                                             String JavaDoc hardtokensn, String JavaDoc copyoftokensn)
103                                               throws IOException JavaDoc, PrinterException JavaDoc;
104 }
105
106
Popular Tags