| .. | .. |
|---|
| 358 | 358 | try { |
|---|
| 359 | 359 | lic.setRequestData(JsonUtils.toJSON((RequestBean) signedLicense)); |
|---|
| 360 | 360 | if (BlockedRequest.isRequestBlocked(lic.getRequestData(), em)) { |
|---|
| 361 | | - throw new SeCurisServiceException(ErrorCodes.BLOCKED_REQUEST_DATA, "Given request data is blocked and cannot be activate"); |
|---|
| 361 | + throw new SeCurisServiceException(ErrorCodes.BLOCKED_REQUEST_DATA, "Given request data is blocked and cannot be activated"); |
|---|
| 362 | 362 | } |
|---|
| 363 | 363 | lic.setLicenseData(JsonUtils.toJSON(signedLicense)); |
|---|
| 364 | 364 | } catch (SeCurisException e) { |
|---|
| 365 | | - LOG.error("Error generaing license JSON", e); |
|---|
| 365 | + LOG.error("Error generating license JSON", e); |
|---|
| 366 | 366 | throw new SeCurisServiceException(ErrorCodes.INVALID_FORMAT, "Error generating license JSON"); |
|---|
| 367 | 367 | } |
|---|
| 368 | 368 | } else { |
|---|
| .. | .. |
|---|
| 371 | 371 | lic.setCreatedBy(createdBy); |
|---|
| 372 | 372 | lic.setCreationTimestamp(new Date()); |
|---|
| 373 | 373 | lic.setModificationTimestamp(lic.getCreationTimestamp()); |
|---|
| 374 | + LOG.info("LICENSE: {}", lic); |
|---|
| 374 | 375 | em.persist(lic); |
|---|
| 376 | + LOG.info("LICENSE on HISTORY create"); |
|---|
| 375 | 377 | em.persist(licenseHelper.createLicenseHistoryAction(lic, createdBy, LicenseHistory.Actions.CREATE)); |
|---|
| 376 | 378 | if (lic.getStatus() == LicenseStatus.ACTIVE) { |
|---|
| 379 | + LOG.info("LICENSE ACTIVATION on HISTORY create"); |
|---|
| 377 | 380 | em.persist(licenseHelper.createLicenseHistoryAction(lic, createdBy, LicenseHistory.Actions.CREATE, "Activated on creation")); |
|---|
| 378 | 381 | } |
|---|
| 382 | + LOG.info("LICENSE created oK ??"); |
|---|
| 379 | 383 | |
|---|
| 380 | 384 | return Response.ok(lic).build(); |
|---|
| 381 | 385 | } |
|---|