package com.qxueyou.scc.base.service.impl;
|
|
import java.util.Date;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
|
import com.license4j.License;
|
import com.license4j.ValidationStatus;
|
import com.qxueyou.scc.base.service.ILicenseService;
|
|
@Service
|
public class LicenseService implements ILicenseService{
|
|
private License license;
|
|
// @Autowired
|
// LicenseChecker checker;
|
|
@Override
|
public boolean isValid() {
|
return true;
|
/**
|
* 临时屏蔽
|
*/
|
// if(isLicenseNull()) {
|
// return false;
|
// }
|
// return license.getValidationStatus().equals(ValidationStatus.LICENSE_VALID);
|
}
|
|
private boolean isLicenseNull() {
|
return false;
|
/**
|
* 临时屏蔽
|
*/
|
// if(license==null && (license=checker.getLicense())==null) {
|
// return true;
|
// }
|
// return false;
|
}
|
|
@Override
|
public String getCustomerName() {
|
/**
|
* 临时屏蔽
|
*/
|
return "开发公司";
|
// if(isLicenseNull()) {
|
// return null;
|
// }
|
// return license.getLicenseText().getUserCompany();
|
}
|
|
@Override
|
public String getProductName() {
|
/**
|
* 临时屏蔽
|
*/
|
return "开发产品";
|
// if(isLicenseNull()) {
|
// return null;
|
// }
|
// return license.getLicenseText().getLicenseProductName();
|
}
|
|
@Override
|
public Date getExpiredDate() {
|
return new Date();
|
// if(isLicenseNull()) {
|
// return null;
|
// }
|
// return license.getLicenseText().getLicenseExpireDate();
|
}
|
}
|