KickJava   Java API By Example, From Geeks To Geeks.

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


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 Visual Layout, either as a label
30  * or used with cardprinter.
31  *
32  * @version $Id: IVisualLayoutSettings.java,v 1.2 2006/01/26 14:17:58 anatom Exp $
33  */

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

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

46     public static int VISUALLAYOUTTYPE_GENERALLABEL = 1;
47     public static int VISUALLAYOUTTYPE_GENERALCARDPRINTER = 2;
48
49     /**
50      * @return the type of visual layout to print.
51      */

52     public abstract int getVisualLayoutType();
53
54     /**
55      * sets the visual layout type.
56      */

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

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

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

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

78     public abstract void setVisualLayoutData(String JavaDoc templatedata);
79     
80
81    /**
82     * Method that parses the template, replaces the userdata
83     * and returning a printable byte array
84     */

85     public abstract Printable JavaDoc printVisualValidity(UserDataVO userdata,
86                                             String JavaDoc[] pincodes, String JavaDoc[] pukcodes,
87                                             String JavaDoc hardtokensn, String JavaDoc copyoftokensn)
88                                               throws IOException JavaDoc, PrinterException JavaDoc;
89 }
90
91
Popular Tags