⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hardtoken.java

📁 一套JAVA的CA证书签发系统.
💻 JAVA
字号:
/************************************************************************* *                                                                       * *  EJBCA: The OpenSource Certificate Authority                          * *                                                                       * *  This software is free software; you can redistribute it and/or       * *  modify it under the terms of the GNU Lesser General Public           * *  License as published by the Free Software Foundation; either         * *  version 2.1 of the License, or any later version.                    * *                                                                       * *  See terms of license at gnu.org.                                     * *                                                                       * *************************************************************************/ package se.anatom.ejbca.hardtoken.hardtokentypes;import java.io.Serializable;import se.anatom.ejbca.util.UpgradeableDataHashMap;/** * HardToken is a base class that all HardToken classes is supposed to inherit.  It function is to * define the data the token is supposed contain. * * @author TomSelleck * @version $Id$ */public abstract class HardToken extends UpgradeableDataHashMap implements Serializable, Cloneable {    // Default Values    public static final float LATEST_VERSION = 0;    public static final String TOKENTYPE = "TOKENTYPE";        public static final String TOKENPROFILE = "TOKENPROFILE";    // Protexted Constants, must be overloaded by all deriving classes.    public String[] FIELDS;    public int[] DATATYPES;    public String[] FIELDTEXTS;    // Public Constants.    /* Constants used to define how the stored data should be represented in the web-gui.*/    public static final int INTEGER = 0;    public static final int LONG = 1;    public static final int STRING = 2;    public static final int BOOLEAN = 3;    public static final int DATE = 4;    public static final int EMPTYROW = 5;    public static final String EMPTYROW_FIELD = "EMTPYROW";        // Public Methods    public Object getField(String field) {        return (Object) data.get(field);    }    		public abstract int getNumberOfFields() ;	public abstract String getFieldText(int index); 	public abstract String getFieldPointer(int index);	public abstract int getFieldDataType(int index);    public void setField(String field, Object value) {        data.put(field, value);    }        public int getTokenProfileId() {    	if(data.get(HardToken.TOKENPROFILE) == null)    		return 0;    	        return ((Integer) data.get(HardToken.TOKENPROFILE)).intValue();    }    	public void setTokenProfileId(int hardtokenprofileid) {	  data.put(HardToken.TOKENPROFILE, new Integer(hardtokenprofileid));	}    /**     * Implemtation of UpgradableDataHashMap function getLatestVersion     *     */    public float getLatestVersion() {        return LATEST_VERSION;    }    /**     * Implemtation of UpgradableDataHashMap function upgrade.     */    public void upgrade() {    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -