KickJava   Java API By Example, From Geeks To Geeks.

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


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 adress label, either sent to
30  * a label printer or printed directly on an envelope.
31  *
32  * @version $Id: IAdressLabelSettings.java,v 1.2 2006/01/26 14:17:58 anatom Exp $
33  */

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

41     public static int ADRESSLABELTYPE_NONE = 0;
42     
43     /**
44      * Constants indicating what type of adress label that
45      * should be printed.
46      */

47     public static int ADRESSLABELTYPE_GENERAL = 1;
48
49
50     /**
51      * @return the type of adress label to print.
52      */

53     public abstract int getAdressLabelType();
54
55     /**
56      * sets the adress label type.
57      */

58     public abstract void setAdressLabelType(int type);
59     
60     /**
61      * @return the filename of the current adress label template.
62      */

63     public abstract String JavaDoc getAdressLabelTemplateFilename();
64
65     /**
66      * Sets the filename of the current adress label template.
67      */

68     public abstract void setAdressLabelTemplateFilename(String JavaDoc filename);
69     
70     /**
71      * Returns the image data of the adress label, should be a SVG image.
72      */

73     public abstract String JavaDoc getAdressLabelData();
74      
75
76     /**
77      * Sets the imagedata of the adress label.
78      */

79     public abstract void setAdressLabelData(String JavaDoc templatedata);
80     
81     /**
82      * @return the number of copies of this PIN Envelope that should be printed.
83      */

84     public abstract int getNumberOfAdressLabelCopies();
85
86     /**
87      * Sets the number of copies of this PIN Envelope that should be printed.
88      */

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

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