Class ModuleInfo

  • All Implemented Interfaces:
    java.io.Serializable

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

      • getId

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

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

        public java.lang.String getDescription()
      • getVendorId

        public int getVendorId()
      • getVendorName

        public java.lang.String getVendorName()
      • getVendorContactInfo

        public java.lang.String getVendorContactInfo()
      • setVendorInfo

        public void setVendorInfo​(int vendorId,
                                  java.lang.String vendorName,
                                  java.lang.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 java.lang.String getLicenseFile()
        The name of an HTML-formatted license file to be found in the module's *.modl file
      • getDocumentationRoot

        public java.lang.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 java.util.Map<java.lang.Integer,​java.lang.String> getHooks()
      • 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​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • 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 java.lang.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​(java.lang.String installPath)
        Sets the location of the module on the local file system. The value should be an absolute path.
      • toString

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

        public java.lang.String toXML()
      • sortDependencyOrder

        public static java.util.List<ModuleInfo> sortDependencyOrder​(java.util.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