| .. | .. |
|---|
| 115 | 115 | |
|---|
| 116 | 116 | @Column(name = "license_data") |
|---|
| 117 | 117 | @JsonProperty("license_data") |
|---|
| 118 | + @JsonIgnore |
|---|
| 119 | + // The license data is sent to user as a separate file, It doesn't need to |
|---|
| 120 | + // be included as License attribute on browser |
|---|
| 118 | 121 | private String licenseData; |
|---|
| 119 | 122 | |
|---|
| 120 | 123 | @Column(name = "creation_timestamp") |
|---|
| .. | .. |
|---|
| 136 | 139 | private String comments; |
|---|
| 137 | 140 | |
|---|
| 138 | 141 | @OneToMany(fetch = FetchType.LAZY, mappedBy = "license") |
|---|
| 142 | + @JsonIgnore |
|---|
| 139 | 143 | private List<LicenseHistory> history; |
|---|
| 140 | 144 | |
|---|
| 141 | 145 | public int getId() { |
|---|
| .. | .. |
|---|
| 334 | 338 | public static final int CANCEL = 6; |
|---|
| 335 | 339 | public static final int DELETE = 7; |
|---|
| 336 | 340 | public static final int BLOCK = 8; |
|---|
| 341 | + public static final int UNBLOCK = 9; |
|---|
| 337 | 342 | } |
|---|
| 338 | 343 | |
|---|
| 339 | 344 | public static class Status { |
|---|
| 340 | 345 | |
|---|
| 341 | 346 | private static final Map<Integer, List<LicenseStatus>> transitions = Utils.createMap( // |
|---|
| 342 | 347 | Action.REQUEST, Arrays.asList(LicenseStatus.CREATED, LicenseStatus.REQUESTED), // |
|---|
| 343 | | - Action.ACTIVATION, Arrays.asList(LicenseStatus.REQUESTED, LicenseStatus.PRE_ACTIVE, LicenseStatus.EXPIRED), // |
|---|
| 348 | + Action.ACTIVATION, Arrays.asList(LicenseStatus.CREATED, LicenseStatus.REQUESTED, LicenseStatus.PRE_ACTIVE, LicenseStatus.EXPIRED), // |
|---|
| 344 | 349 | Action.SEND, Arrays.asList(LicenseStatus.ACTIVE, LicenseStatus.PRE_ACTIVE), // |
|---|
| 345 | 350 | Action.DOWNLOAD, Arrays.asList(LicenseStatus.ACTIVE, LicenseStatus.PRE_ACTIVE), // |
|---|
| 346 | 351 | Action.CANCEL, Arrays.asList(LicenseStatus.ACTIVE, LicenseStatus.PRE_ACTIVE, LicenseStatus.REQUESTED, LicenseStatus.EXPIRED), // |
|---|
| 347 | | - Action.DELETE, Arrays.asList(LicenseStatus.CANCELLED, LicenseStatus.CREATED), // |
|---|
| 352 | + Action.DELETE, Arrays.asList(LicenseStatus.CANCELLED, LicenseStatus.CREATED, LicenseStatus.BLOCKED), // |
|---|
| 353 | + Action.UNBLOCK, Arrays.asList(LicenseStatus.BLOCKED), // |
|---|
| 348 | 354 | Action.BLOCK, Arrays.asList(LicenseStatus.CANCELLED) // |
|---|
| 349 | 355 | ); |
|---|
| 350 | 356 | |
|---|