Class ModuleInfo
- java.lang.Object
-
- com.inductiveautomation.ignition.common.modules.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ModuleInfo.Builder
static class
ModuleInfo.JarInfo
Contains meta information about a module's jar file, such as its scope and native lib parameters, and path within the module package.static class
ModuleInfo.LibraryInfo
static class
ModuleInfo.ModuleDependency
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
long
getCrc()
The module file's crc is calculated when the modl file is loaded in the Gateway.java.util.List<ModuleInfo.ModuleDependency>
getDependencies()
java.util.List<ModuleInfo.ModuleDependency>
getDependencies(int scope)
java.lang.String
getDescription()
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"java.util.List<ModuleInfo.JarInfo>
getExports()
java.util.Map<java.lang.Integer,java.lang.String>
getHooks()
java.lang.String
getId()
java.lang.String
getInstallPath()
The location of the module on the local file system.java.util.List<ModuleInfo.JarInfo>
getJars()
java.util.List<ModuleInfo.LibraryInfo>
getLibsRequired()
java.lang.String
getLicenseFile()
The name of an HTML-formatted license file to be found in the module's *.modl fileLicenseState
getLicenseState()
java.lang.String
getName()
int
getRequiredFrameworkVersion()
Version
getRequiredIgnitionVersion()
java.lang.String
getVendorContactInfo()
int
getVendorId()
java.lang.String
getVendorName()
Version
getVersion()
int
hashCode()
boolean
isFree()
boolean
isMakerEditionCompatible()
boolean
isSelfSigned()
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 licensestatic ModuleInfo.Builder
newBuilder()
void
setCrc(long crc)
void
setFree()
Set to true when modules implement GatewayModuleHook.isFreeModule() to return truevoid
setInstallPath(java.lang.String installPath)
Sets the location of the module on the local file system.void
setLicenseState(LicenseState newState)
void
setMakerEditionCompatible()
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.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.static java.util.List<ModuleInfo>
sortDependencyOrder(java.util.List<ModuleInfo> list, int scope, boolean reverse)
Sorts the list of module infos in correct dependency order.java.lang.String
toString()
java.lang.String
toXML()
-
-
-
Method Detail
-
newBuilder
public static ModuleInfo.Builder newBuilder()
-
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()
-
getJars
public java.util.List<ModuleInfo.JarInfo> getJars()
-
getExports
public java.util.List<ModuleInfo.JarInfo> getExports()
-
getLibsRequired
public java.util.List<ModuleInfo.LibraryInfo> getLibsRequired()
-
getDependencies
@Nonnull public java.util.List<ModuleInfo.ModuleDependency> getDependencies()
-
getDependencies
@Nonnull public java.util.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(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.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 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 classjava.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
-
-