package com.qianwen.license.common;
|
|
import java.io.Serializable;
|
import java.util.Date;
|
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
public class License implements Serializable {
|
/**
|
* 证书subject
|
*/
|
private String subject;
|
|
/**
|
* 私钥别称
|
*/
|
private String privateAlias;
|
|
/**
|
* 私钥密码(需要妥善保管,不能让使用者知道)
|
*/
|
private String keyPass;
|
|
/**
|
* 访问私钥库的密码
|
*/
|
private String storePass;
|
|
/**
|
* 证书生成路径
|
*/
|
private String licensePath;
|
|
/**
|
* 私钥库存储路径
|
*/
|
private String privateKeysStorePath;
|
|
/**
|
* 证书生效时间
|
*/
|
private Date issuedTime = new Date();
|
|
/**
|
* 证书失效时间
|
*/
|
private Date expiryTime;
|
|
/**
|
* 用户类型
|
*/
|
private String consumerType = "user";
|
|
/**
|
* 用户数量
|
*/
|
private Integer consumerAmount = 1;
|
|
/**
|
* 描述信息
|
*/
|
private String description = "";
|
|
private String cn = "qamdc";
|
/**
|
* 组织单位
|
*/
|
private String ou = "qingan";
|
/**
|
* 组织
|
*/
|
private String o = "2chang";
|
/**
|
* 城市
|
*/
|
private String l = "xian";
|
/**
|
* 省份
|
*/
|
private String st = "shanxi";
|
/**
|
* 国家二位代码
|
*/
|
private String c = "CN";
|
//CN=qamdc, OU=qingan, O=qingan, L=BJ, ST=BJ, C=CN
|
|
/**
|
* 额外的服务器硬件校验信息
|
*/
|
private LicenseExtraModel licenseExtraModel;
|
|
public String getSubject() {
|
return subject;
|
}
|
|
public void setSubject(String subject) {
|
this.subject = subject;
|
}
|
|
public String getPrivateAlias() {
|
return privateAlias;
|
}
|
|
public void setPrivateAlias(String privateAlias) {
|
this.privateAlias = privateAlias;
|
}
|
|
public String getKeyPass() {
|
return keyPass;
|
}
|
|
public void setKeyPass(String keyPass) {
|
this.keyPass = keyPass;
|
}
|
|
public String getStorePass() {
|
return storePass;
|
}
|
|
public void setStorePass(String storePass) {
|
this.storePass = storePass;
|
}
|
|
public String getLicensePath() {
|
return licensePath;
|
}
|
|
public void setLicensePath(String licensePath) {
|
this.licensePath = licensePath;
|
}
|
|
public String getPrivateKeysStorePath() {
|
return privateKeysStorePath;
|
}
|
|
public void setPrivateKeysStorePath(String privateKeysStorePath) {
|
this.privateKeysStorePath = privateKeysStorePath;
|
}
|
|
public Date getIssuedTime() {
|
return issuedTime;
|
}
|
|
public void setIssuedTime(Date issuedTime) {
|
this.issuedTime = issuedTime;
|
}
|
|
public Date getExpiryTime() {
|
return expiryTime;
|
}
|
|
public void setExpiryTime(Date expiryTime) {
|
this.expiryTime = expiryTime;
|
}
|
|
public String getConsumerType() {
|
return consumerType;
|
}
|
|
public void setConsumerType(String consumerType) {
|
this.consumerType = consumerType;
|
}
|
|
public Integer getConsumerAmount() {
|
return consumerAmount;
|
}
|
|
public void setConsumerAmount(Integer consumerAmount) {
|
this.consumerAmount = consumerAmount;
|
}
|
|
public String getDescription() {
|
return description;
|
}
|
|
public void setDescription(String description) {
|
this.description = description;
|
}
|
|
public LicenseExtraModel getLicenseExtraModel() {
|
return licenseExtraModel;
|
}
|
|
public void setLicenseExtraModel(LicenseExtraModel licenseExtraModel) {
|
this.licenseExtraModel = licenseExtraModel;
|
}
|
|
public String getCn() {
|
return cn;
|
}
|
|
public void setCn(String cn) {
|
this.cn = cn;
|
}
|
|
public String getOu() {
|
return ou;
|
}
|
|
public void setOu(String ou) {
|
this.ou = ou;
|
}
|
|
public String getO() {
|
return o;
|
}
|
|
public void setO(String o) {
|
this.o = o;
|
}
|
|
public String getL() {
|
return l;
|
}
|
|
public void setL(String l) {
|
this.l = l;
|
}
|
|
public String getSt() {
|
return st;
|
}
|
|
public void setSt(String st) {
|
this.st = st;
|
}
|
|
public String getC() {
|
return c;
|
}
|
|
public void setC(String c) {
|
this.c = c;
|
}
|
|
@Override
|
public String toString() {//ToStringBuilder.reflectionToString(licenseExtraModel)
|
return "License [subject=" + subject + ", privateAlias=" + privateAlias + ", keyPass=" + keyPass
|
+ ", storePass=" + storePass + ", licensePath=" + licensePath + ", privateKeysStorePath="
|
+ privateKeysStorePath + ", issuedTime=" + issuedTime + ", expiryTime=" + expiryTime + ", consumerType="
|
+ consumerType + ", consumerAmount=" + consumerAmount + ", description=" + description
|
+ ", licenseExtraModel=" + licenseExtraModel + "]";
|
}
|
|
|
}
|