01: /*************************************************************************
02: * *
03: * EJBCA: The OpenSource Certificate Authority *
04: * *
05: * This software is free software; you can redistribute it and/or *
06: * modify it under the terms of the GNU Lesser General Public *
07: * License as published by the Free Software Foundation; either *
08: * version 2.1 of the License, or any later version. *
09: * *
10: * See terms of license at gnu.org. *
11: * *
12: *************************************************************************/package org.ejbca.ui.cli.hardtoken.importer;
13:
14: import java.io.IOException;
15: import java.util.Properties;
16:
17: import org.ejbca.core.model.hardtoken.HardTokenData;
18:
19: /**
20: * Interface used to customize the hard token data import, from an existing
21: * datasource or file
22: *
23: *
24: * @author Philip Vendil 2007 apr 23
25: *
26: * @version $Id: IHardTokenImporter.java,v 1.1 2007/04/24 13:03:21 herrvendil Exp $
27: */
28:
29: public interface IHardTokenImporter {
30:
31: /**
32: * Method reponsible for the initialization of the importer.
33: * Is called once before the import of hard token datas is done.
34: *
35: * @param props properties defiened for the importer
36: * @throws IOException
37: */
38: void startImport(Properties props) throws IOException;
39:
40: /**
41: * Method reading one hard token from a source of data , and i supposed to return
42: * A HardTokenData from it. That will be added to the database.
43: *
44: * @param source can be any ty
45: * @param null, if this is the last entry in the database.
46: *
47: */
48: HardTokenData readHardTokenData() throws IOException;
49:
50: /**
51: * Method reponsible for finalizing the importer.
52: *
53: */
54: void endImport() throws IOException;
55:
56: }
|