KickJava   Java API By Example, From Geeks To Geeks.

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


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 a reciept that may contain policy and
30  * the users hand signature.
31  *
32  * @version $Id: IReceiptSettings.java,v 1.2 2006/01/26 14:17:58 anatom Exp $
33  */

34
35 public interface IReceiptSettings {
36
37
38     /**
39      * Constant indicating that no recepit should be printed.
40      */

41     public static int RECEIPTTYPE_NONE = 0;
42     /**
43      * Constants indicating what type of receipt that should be
44      * should be printed.
45      */

46     public static int RECEIPTTYPE_GENERAL = 1;
47
48
49     /**
50      * @return the type of receipt to print.
51      */

52     public abstract int getReceiptType();
53
54     /**
55      * sets the receipt type.
56      */

57     public abstract void setReceiptType(int type);
58     
59     /**
60      * @return the filename of the current visual layout template.
61      */

62     public abstract String JavaDoc getReceiptTemplateFilename();
63
64     /**
65      * Sets the filename of the current visual layout template.
66      */

67     public abstract void setReceiptTemplateFilename(String JavaDoc filename);
68     
69     /**
70      * Returns the image data of the receipt, should be a SVG image.
71      */

72     public abstract String JavaDoc getReceiptData();
73      
74
75     /**
76      * Sets the imagedata of the receipt.
77      */

78     public abstract void setReceiptData(String JavaDoc templatedata);
79     
80     /**
81      * @return the number of copies of this receipt that should be printed.
82      */

83     public abstract int getNumberOfReceiptCopies();
84
85     /**
86      * Sets the number of copies of this receipt that should be printed.
87      */

88     public abstract void setNumberOfReceiptCopies(int copies);
89     
90
91    /**
92     * Method that parses the template, replaces the userdata
93     * and returning a printable byte array
94     */

95     public abstract Printable JavaDoc printReceipt(UserDataVO userdata,
96                                             String JavaDoc[] pincodes, String JavaDoc[] pukcodes,
97                                             String JavaDoc hardtokensn, String JavaDoc copyoftokensn)
98                                               throws IOException JavaDoc, PrinterException JavaDoc;
99 }
100
101
Popular Tags