From 7d8713e88c7872b195f7e4d02ac4812536ae196b Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Tue, 22 Sep 2015 13:53:51 +0000
Subject: [PATCH] #2756 feature - Added lic activation using activationCode
---
src/main/java/net/curisit/securis/LicenseValidator.java | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/main/java/net/curisit/securis/LicenseValidator.java b/src/main/java/net/curisit/securis/LicenseValidator.java
index c5d7e93..0a31755 100644
--- a/src/main/java/net/curisit/securis/LicenseValidator.java
+++ b/src/main/java/net/curisit/securis/LicenseValidator.java
@@ -61,8 +61,16 @@
public void validateHW(RequestBean reqBean, String licTypeCode, String customerCode, String packCode) throws SeCurisException {
RequestBean currentHW = ReqGenerator.getInstance().createRequest(licTypeCode, customerCode, packCode);
if (!currentHW.match(reqBean)) {
- throw new SeCurisException("Current System info mismatch the License System info:\n Licensed: \n" + JsonUtils.toPrettyJSON(reqBean)
- + "\n Expected: \n" + JsonUtils.toPrettyJSON(currentHW));
+ throw new SeCurisException("Current System info mismatch the License System info:\n Licensed: \n"
+ + JsonUtils.toPrettyJSON(reqBean, RequestBean.class) + "\n Expected: \n" + JsonUtils.toPrettyJSON(currentHW));
+ }
+ }
+
+ public void validateHW(RequestBean reqBean, String appCode, String activationCode) throws SeCurisException {
+ RequestBean currentHW = ReqGenerator.getInstance().createRequest(appCode, activationCode);
+ if (!currentHW.match(reqBean)) {
+ throw new SeCurisException("Current System info mismatch the License System info:\n Licensed: \n"
+ + JsonUtils.toPrettyJSON(reqBean, RequestBean.class) + "\n Expected: \n" + JsonUtils.toPrettyJSON(currentHW));
}
}
--
Gitblit v1.3.2