Record Class LicenseDetailsImpl

java.lang.Object
java.lang.Record
com.inductiveautomation.ignition.common.licensing.LicenseDetailsImpl
All Implemented Interfaces:
LicenseDetails, Serializable

public record LicenseDetailsImpl(String id, int version, List<LicenseRestriction> restrictions) extends Record implements LicenseDetails
See Also:
  • Constructor Details

    • LicenseDetailsImpl

      public LicenseDetailsImpl(int version, List<LicenseRestriction> restrictions)
    • LicenseDetailsImpl

      public LicenseDetailsImpl(String id, int version)
    • LicenseDetailsImpl

      public LicenseDetailsImpl(String id, int version, List<LicenseRestriction> restrictions)
      Creates an instance of a LicenseDetailsImpl record class.
      Parameters:
      id - the value for the id record component
      version - the value for the version record component
      restrictions - the value for the restrictions record component
  • Method Details

    • getModuleId

      public String getModuleId()
      Description copied from interface: LicenseDetails
      Get the module id this license applies to.
      Specified by:
      getModuleId in interface LicenseDetails
      Returns:
      the module id this license applies to.
    • getLicenseDetail

      @Nullable public String getLicenseDetail(String key)
      Description copied from interface: LicenseDetails
      The value of the LicenseRestriction with the given name.
      Specified by:
      getLicenseDetail in interface LicenseDetails
      Returns:
      null if no license restriction with name==key is found.
    • getLicenseDetails

      public List<LicenseRestriction> getLicenseDetails()
      Description copied from interface: LicenseDetails
      Returns all of the license details as a list
      Specified by:
      getLicenseDetails in interface LicenseDetails
    • getVersion

      public int getVersion()
      Description copied from interface: LicenseDetails
      The major version number that this license is good for
      Specified by:
      getVersion in interface LicenseDetails
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public String id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • version

      public int version()
      Returns the value of the version record component.
      Returns:
      the value of the version record component
    • restrictions

      public List<LicenseRestriction> restrictions()
      Returns the value of the restrictions record component.
      Returns:
      the value of the restrictions record component