|
28 | 28 | import com.labs64.netlicensing.domain.entity.Product; |
29 | 29 | import com.labs64.netlicensing.domain.entity.ProductModule; |
30 | 30 | import com.labs64.netlicensing.domain.entity.Token; |
| 31 | +import com.labs64.netlicensing.domain.entity.Transaction; |
31 | 32 | import com.labs64.netlicensing.domain.entity.impl.LicenseImpl; |
32 | 33 | import com.labs64.netlicensing.domain.entity.impl.LicenseTemplateImpl; |
33 | 34 | import com.labs64.netlicensing.domain.entity.impl.LicenseeImpl; |
|
51 | 52 | import com.labs64.netlicensing.service.ProductModuleService; |
52 | 53 | import com.labs64.netlicensing.service.ProductService; |
53 | 54 | import com.labs64.netlicensing.service.TokenService; |
| 55 | +import com.labs64.netlicensing.service.TransactionService; |
54 | 56 | import com.labs64.netlicensing.service.UtilityService; |
55 | 57 |
|
56 | 58 | public class NetLicensingClientDemo { |
57 | 59 |
|
58 | | - /** Exit codes */ |
| 60 | + /** |
| 61 | + * Exit codes |
| 62 | + */ |
59 | 63 | private final static int CODE_OK = 0; |
60 | 64 | private final static int CODE_ERROR = 1; |
61 | 65 |
|
62 | 66 | private final static String DEMO_NUMBER_PREFIX = "DEMO-"; |
63 | 67 |
|
64 | | - private static String randomLicenseeSecret = UUID.randomUUID().toString(); |
| 68 | + private static final String randomLicenseeSecret = UUID.randomUUID().toString(); |
65 | 69 |
|
66 | 70 | public static void main(final String[] args) { |
67 | 71 |
|
@@ -364,6 +368,15 @@ public static void main(final String[] args) { |
364 | 368 | out.writePage("Got the following licenses after transfer:", licenses); |
365 | 369 | // endregion |
366 | 370 |
|
| 371 | + // region ********* Transactions |
| 372 | + Page<Transaction> transactions = TransactionService.list(context, |
| 373 | + Constants.Transaction.SOURCE_SHOP_ONLY + "=" + Boolean.TRUE.toString()); |
| 374 | + out.writePage("Got the following transactions shop only:", transactions); |
| 375 | + |
| 376 | + transactions = TransactionService.list(context, null); |
| 377 | + out.writePage("Got the following transactions after transfer:", transactions); |
| 378 | + // endregion |
| 379 | + |
367 | 380 | out.writeMessage("All done."); |
368 | 381 |
|
369 | 382 | } catch (final NetLicensingException e) { |
|
0 commit comments