1 13 14 package org.ejbca.core.model.hardtoken; 15 16 import java.util.Collection ; 17 import java.util.Date ; 18 19 import org.ejbca.core.model.hardtoken.types.HardToken; 20 import org.ejbca.util.StringTools; 21 22 23 30 31 public class HardTokenData implements java.io.Serializable { 32 33 47 public HardTokenData(String tokensn, String username, Date createtime, Date modifytime, 48 int tokentype, HardToken hardtoken, String copyof, 49 Collection copies){ 50 this.tokensn=tokensn; 51 this.username=StringTools.strip(username); 52 this.createtime=createtime; 53 this.modifytime=modifytime; 54 this.tokentype=tokentype; 55 this.hardtoken=hardtoken; 56 this.copyof=copyof; 57 this.copies=copies; 58 } 59 60 public HardTokenData(){ 61 } 62 63 65 public String getTokenSN(){ return this.tokensn; } 66 public void setTokenSN(String tokensn){ this.tokensn=tokensn; } 67 68 public String getUsername(){ return this.username; } 69 public void setUsername(String username){ this.username=StringTools.strip(username); } 70 71 public Date getCreateTime(){ return this.createtime; } 72 public void setCreateTime(Date createtime){ this.createtime=createtime; } 73 74 public Date getModifyTime(){ return this.modifytime; } 75 public void setModifyTime(Date modifytime){ this.modifytime=modifytime; } 76 77 public int getTokenType(){ return this.tokentype; } 78 public void setTokenType(int tokentype){ this.tokentype=tokentype; } 79 80 public HardToken getHardToken(){ return this.hardtoken; } 81 public void setHardToken(HardToken hardtoken){ this.hardtoken=hardtoken; } 82 83 public boolean isOriginal(){ 84 return copyof==null; 85 } 86 87 public String getCopyOf(){ 88 return copyof; 89 } 90 91 98 public Collection getCopies(){ 99 return copies; 100 } 101 102 private String tokensn; 104 private String username; 105 private Date createtime; 106 private Date modifytime; 107 private int tokentype; 108 private HardToken hardtoken; 109 private String copyof; 110 private Collection copies; 111 } 112 | Popular Tags |