Class LicGen

java.lang.Object
rs.baselib.licensing.LicGen
All Implemented Interfaces:
java.lang.Runnable

public class LicGen
extends java.lang.Object
implements java.lang.Runnable
A universal generator for creating RSA licenses.
Author:
ralph
  • Constructor Summary

    Constructors 
    Constructor Description
    LicGen​(java.lang.String product, long expirationTime, java.lang.String owner)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    long getExpirationTime()
    Returns the expirationTime.
    java.lang.String getLicenseKey()
    Returns the licenseKey.
    static LicGen getLicgen()
    Returns the licgen.
    static Options getOptions()
    Creates the CLI options.
    java.lang.String getOwner()
    Returns the owner.
    java.lang.String getProduct()
    Returns the product.
    static void main​(java.lang.String[] args)
    CLI.
    protected static long parseTime​(java.lang.String s)  
    protected static void printHelp​(Options options)
    Prints the CLI help.
    void run()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LicGen

      public LicGen​(java.lang.String product, long expirationTime, java.lang.String owner)
      Constructor.
      Parameters:
      product - - the name of the product
      expirationTime - - the time of license expiration
      owner - - the owner of the license
  • Method Details

    • getLicenseKey

      public java.lang.String getLicenseKey()
      Returns the licenseKey.
      Returns:
      the licenseKey
    • run

      public void run()
      Specified by:
      run in interface java.lang.Runnable
    • main

      public static void main​(java.lang.String[] args)
      CLI.
      Parameters:
      args - - command line arguments
    • printHelp

      protected static void printHelp​(Options options)
      Prints the CLI help.
      Parameters:
      options - CLI options.
    • getOptions

      public static Options getOptions()
      Creates the CLI options.
      Returns:
      CLI options
    • parseTime

      protected static long parseTime​(java.lang.String s)
    • getLicgen

      public static LicGen getLicgen()
      Returns the licgen.
      Returns:
      the licgen
    • getProduct

      public java.lang.String getProduct()
      Returns the product.
      Returns:
      the product
    • getExpirationTime

      public long getExpirationTime()
      Returns the expirationTime.
      Returns:
      the expirationTime
    • getOwner

      public java.lang.String getOwner()
      Returns the owner.
      Returns:
      the owner