CSJCurrent en:License Information: Unterschied zwischen den Versionen
Aus Cryptshare Documentation
(Imported from text file) |
Keine Bearbeitungszusammenfassung |
||
| Zeile 1: | Zeile 1: | ||
The licence information of the current Cryptshare Server installation and the Add-On Product's own licence information can be queried from the server using the '''Client''''s '''requestLicenseInfo()''' method. The method returns a '''LicenseInfo''' object containing the licence status of the Cryptshare Server and the Add-On Product, as well as the respective licence and subscription expiration dates in the LocalDate format. | |||
The | |||
'''Example: Requesting the License Information''' | '''Example: Requesting the License Information''' | ||
Aktuelle Version vom 26. November 2021, 12:11 Uhr
The licence information of the current Cryptshare Server installation and the Add-On Product's own licence information can be queried from the server using the Client's requestLicenseInfo() method. The method returns a LicenseInfo object containing the licence status of the Cryptshare Server and the Add-On Product, as well as the respective licence and subscription expiration dates in the LocalDate format.
Example: Requesting the License Information
// First create the Client instance
// Create a WebServiceUri for your Cryptshare Server
WebServiceUri serviceUri = new WebServiceUri("https://cryptshare.server.com");
// Create a CryptshareConnection instance for your WebServiceUri
CryptshareConnection connection = new CryptshareConnection(serviceUri);
// Create the Client instance with the sender's email address,
// the CryptshareConnection, and the path to the verification store.
Client client = new Client("sender_email@server.com", connection, Paths.get("C:\\\\temp"));
// Request the License Information
LicenseInfo licenseInfo = client.requestLicenseInfo();
System.out.println("Server license expiration date: " +
licenseInfo.getServerLicenseExpirationDate());
System.out.println("Server subscription expiration date: " +
licenseInfo.getServerSubscriptionExpirationDate());
System.out.println("Is server license valid? " + licenseInfo.isServerLicenseValid());
System.out.println("Product license expiration date: " +
licenseInfo.getProductLicenseExpirationDate());
System.out.println("Product subscription expiration date: " +
licenseInfo.getProductSubscriptionExpirationDate());
System.out.println("Is product license valid? " + licenseInfo.isProductLicenseValid());