Package org.eclipse.jetty.start
Class Module
- java.lang.Object
-
- org.eclipse.jetty.start.Module
-
- All Implemented Interfaces:
java.lang.Comparable<Module>
public class Module extends java.lang.Object implements java.lang.Comparable<Module>
Represents a Module metadata, as defined in Jetty.A module consists of:
- A set of jar files, directories and/or jar file patterns to be added to the classpath
- A list of XML configuration files
- Properties set either directly or via a file of properties
- A set of modules names (or capability names) that this module depends on.
- A set of capability names that this module provides (including it's own name).
- Licence details for using the module
${jetty.home}/modules
and${jetty.home}/modules
directories. A module may refer to non-discovered dynamic module in a subdirectory, using a property as part or all of the name. A module may be enabled, either directly by name or transiently via a dependency from another module by name or provided capability.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
clearTransitiveEnable()
int
compareTo(Module m)
boolean
enable(java.lang.String source, boolean transitive)
boolean
equals(java.lang.Object obj)
void
expandDependencies(Props props)
java.util.List<java.lang.String>
getDefaultConfig()
java.util.List<java.lang.String>
getDepends()
java.util.List<java.lang.String>
getDescription()
java.util.Set<java.lang.String>
getEnableSources()
java.util.List<java.lang.String>
getFiles()
java.util.List<java.lang.String>
getIniTemplate()
java.util.List<java.lang.String>
getJPMS()
java.util.List<java.lang.String>
getJvmArgs()
java.util.List<java.lang.String>
getLibs()
java.util.List<java.lang.String>
getLicense()
java.lang.String
getName()
java.util.Set<java.lang.String>
getOptional()
java.lang.String
getPrimaryTag()
java.util.Set<java.lang.String>
getProvides()
java.util.List<java.lang.String>
getTags()
Version
getVersion()
java.util.List<java.lang.String>
getXmls()
boolean
hasDefaultConfig()
boolean
hasFiles(BaseHome baseHome, Props props)
int
hashCode()
boolean
hasIniTemplate()
boolean
hasLicense()
static boolean
isConditionalDependency(java.lang.String depends)
boolean
isDynamic()
Indicates a module that is dynamic in natureboolean
isEnabled()
boolean
isSkipFilesValidation()
boolean
isTransitive()
static java.lang.String
normalizeModuleName(java.lang.String name)
void
process(BaseHome basehome)
void
setSkipFilesValidation(boolean skipFilesValidation)
java.lang.String
toString()
void
writeIniSection(java.io.BufferedWriter writer, Props props)
-
-
-
Constructor Detail
-
Module
public Module(BaseHome basehome, java.nio.file.Path path) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
isConditionalDependency
public static boolean isConditionalDependency(java.lang.String depends)
-
normalizeModuleName
public static java.lang.String normalizeModuleName(java.lang.String name)
-
getName
public java.lang.String getName()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
expandDependencies
public void expandDependencies(Props props)
-
getDefaultConfig
public java.util.List<java.lang.String> getDefaultConfig()
-
getIniTemplate
public java.util.List<java.lang.String> getIniTemplate()
-
getFiles
public java.util.List<java.lang.String> getFiles()
-
isSkipFilesValidation
public boolean isSkipFilesValidation()
-
getJvmArgs
public java.util.List<java.lang.String> getJvmArgs()
-
getLibs
public java.util.List<java.lang.String> getLibs()
-
getLicense
public java.util.List<java.lang.String> getLicense()
-
getXmls
public java.util.List<java.lang.String> getXmls()
-
getJPMS
public java.util.List<java.lang.String> getJPMS()
-
getVersion
public Version getVersion()
-
hasDefaultConfig
public boolean hasDefaultConfig()
-
hasIniTemplate
public boolean hasIniTemplate()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
hasLicense
public boolean hasLicense()
-
isDynamic
public boolean isDynamic()
Indicates a module that is dynamic in nature- Returns:
- a module where the name is not in the top level of the modules directory
-
process
public void process(BaseHome basehome) throws java.io.IOException
- Throws:
java.io.IOException
-
clearTransitiveEnable
public boolean clearTransitiveEnable()
-
setSkipFilesValidation
public void setSkipFilesValidation(boolean skipFilesValidation)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getDepends
public java.util.List<java.lang.String> getDepends()
-
getProvides
public java.util.Set<java.lang.String> getProvides()
-
getOptional
public java.util.Set<java.lang.String> getOptional()
-
getDescription
public java.util.List<java.lang.String> getDescription()
-
getTags
public java.util.List<java.lang.String> getTags()
-
getPrimaryTag
public java.lang.String getPrimaryTag()
-
isEnabled
public boolean isEnabled()
-
getEnableSources
public java.util.Set<java.lang.String> getEnableSources()
-
enable
public boolean enable(java.lang.String source, boolean transitive)
- Parameters:
source
- String describing where the module was enabled fromtransitive
- True if the enable is transitive- Returns:
- true if the module was not previously enabled
-
isTransitive
public boolean isTransitive()
-
writeIniSection
public void writeIniSection(java.io.BufferedWriter writer, Props props)
-
-