java.lang.Object
com.inductiveautomation.ignition.common.modules.ModuleInfo
All Implemented Interfaces:
Serializable

public class ModuleInfo extends Object implements Serializable
Contains meta information about a module, such as its id, name description, required versions, hook classes, and jar file information
See Also:
  • Method Details

    • newBuilder

      public static ModuleInfo.Builder newBuilder()
    • getId

      public String getId()
      Returns:
      The id for this module. Must be unique.
    • getName

      public String getName()
      Returns:
      Human-readable name for the module
    • getDescription

      public String getDescription()
    • getVendorId

      public int getVendorId()
    • getVendorName

      public String getVendorName()
    • getVendorContactInfo

      public String getVendorContactInfo()
    • setVendorInfo

      public void setVendorInfo(int vendorId, String vendorName, String vendorContactInfo)
      Setter needs to exist so that the Marketplace can add the vendor info to module.xml when uploading a customer's module.
    • getLicenseFile

      public String getLicenseFile()
      The name of an HTML-formatted license file to be found in the module's *.modl file
    • getDocumentationRoot

      public String getDocumentationRoot()
      The root of the module's documentation, expected to be an HTML file and must be stored under a folder named "doc"
    • getVersion

      public Version getVersion()
    • getRequiredIgnitionVersion

      public Version getRequiredIgnitionVersion()
    • getRequiredFrameworkVersion

      public int getRequiredFrameworkVersion()
    • getHooks

      public Map<Integer,String> getHooks()
    • getJars

      public List<ModuleInfo.JarInfo> getJars()
    • getExports

      public List<ModuleInfo.JarInfo> getExports()
    • getLibsRequired

      public List<ModuleInfo.LibraryInfo> getLibsRequired()
    • getDependencies

      @Nonnull public List<ModuleInfo.ModuleDependency> getDependencies()
    • getDependencies

      @Nonnull public List<ModuleInfo.ModuleDependency> getDependencies(int scope)
    • isFree

      public boolean isFree()
    • isSelfSigned

      public boolean isSelfSigned()
    • setFree

      public void setFree()
      Set to true when modules implement GatewayModuleHook.isFreeModule() to return true
    • isMakerEditionCompatible

      public boolean isMakerEditionCompatible()
    • setMakerEditionCompatible

      public void setMakerEditionCompatible()
    • setSelfSigned

      public void setSelfSigned()
      Setter needs to exist so that the Marketplace can add the selfsigned=true property to a module.xml when a user is signing their own module.
    • isTrialMode

      public boolean isTrialMode()
      Returns true if the module is not marked as a free module AND either the module's license state is not set or the license state is a trial license
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getLicenseState

      public LicenseState getLicenseState()
    • setLicenseState

      public void setLicenseState(LicenseState newState)
    • getCrc

      public long getCrc()
      The module file's crc is calculated when the modl file is loaded in the Gateway.
    • setCrc

      public void setCrc(long crc)
    • getInstallPath

      public String getInstallPath()
      The location of the module on the local file system. The value should be an absolute path. Intentionally left out of XML generation since the install path has no meaning outside the local system.
    • setInstallPath

      public void setInstallPath(String installPath)
      Sets the location of the module on the local file system. The value should be an absolute path.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • toXML

      public String toXML()
    • sortDependencyOrder

      public static List<ModuleInfo> sortDependencyOrder(List<ModuleInfo> list, int scope, boolean reverse) throws DependencyCycleException
      Sorts the list of module infos in correct dependency order. Uses a digraph to sort the modules. Will ignore missing dependencies.
      Throws:
      DependencyCycleException - If a dependency cycle is detected