Class Generator
- java.lang.Object
-
- org.jboss.wildscribe.site.Generator
-
public class Generator extends Object
A utility used to generate a Wildscribe site.- Author:
- James R. Perkins
-
-
Constructor Summary
Constructors Constructor Description Generator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Pathgenerate(Path modelPath, Path target)Generates a site based on themodelPathin the target directory.static Pathgenerate(Path modelPath, Path target, String displayName, String displayVersion)Generates a site based on themodelPathin the target directory.static Pathgenerate(Collection<Path> modelPaths, Path target)Generates a site based on themodelPathsin the target directory.static Pathgenerate(Collection<Path> modelPaths, Path target, String displayName, String displayVersion)Generates a site based on themodelPathsin the target directory.
-
-
-
Method Detail
-
generate
public static Path generate(Path modelPath, Path target) throws IOException
Generates a site based on themodelPathin the target directory.If the
modelPathis a directory it must contain a file namedversion.txt. This file is delimited with:on each line where the first value is the product name, the second value is the version and the third value is the path to the DMR file.Example file contents:
WildFly:18.0.0.Final:./WildFly-18.0.0.Final.dmr WildFly:17.0.0.Final:WildFly-17.0.0.Final.dmr- Parameters:
modelPath- the path to the model file or a directory with averions.txtfiletarget- the target directory to generate the site in- Returns:
- the path to the directory the site was generated in
- Throws:
IOException- if an error occurs generating the site
-
generate
public static Path generate(Path modelPath, Path target, String displayName, String displayVersion) throws IOException
Generates a site based on themodelPathin the target directory.If the
modelPathis a directory it must contain a file namedversion.txt. This file is delimited with:on each line where the first value is the product name, the second value is the version and the third value is the path to the DMR file.Example file contents:
WildFly:18.0.0.Final:./WildFly-18.0.0.Final.dmr WildFly:17.0.0.Final:WildFly-17.0.0.Final.dmrNote the
displayNameanddisplayVersionare only used if themodulePathis not a directory. If the module path is a directory the name and version are resolved from theversion.txtfile.- Parameters:
modelPath- the path to the model file or a directory with averions.txtfiletarget- the target directory to generate the site indisplayName- the name that should be used for the display, ornullto resolve the display namedisplayVersion- the version that should be used for the display, ornullto resolve the display version- Returns:
- the path to the directory the site was generated in
- Throws:
IOException- if an error occurs generating the site
-
generate
public static Path generate(Collection<Path> modelPaths, Path target) throws IOException
Generates a site based on themodelPathsin the target directory.If any of the
modelPathsare directories they must contain a file namedversion.txt. This file is delimited with:on each line where the first value is the product name, the second value is the version and the third value is the path to the DMR file.Example file contents:
WildFly:18.0.0.Final:./WildFly-18.0.0.Final.dmr WildFly:17.0.0.Final:WildFly-17.0.0.Final.dmr- Parameters:
modelPaths- the paths to processtarget- the target directory to generate the site in- Returns:
- the path to the directory the site was generated in
- Throws:
IOException- if an error occurs generating the site
-
generate
public static Path generate(Collection<Path> modelPaths, Path target, String displayName, String displayVersion) throws IOException
Generates a site based on themodelPathsin the target directory.If any of the
modelPathsare directories they must contain a file namedversion.txt. This file is delimited with:on each line where the first value is the product name, the second value is the version and the third value is the path to the DMR file.Example file contents:
WildFly:18.0.0.Final:./WildFly-18.0.0.Final.dmr WildFly:17.0.0.Final:WildFly-17.0.0.Final.dmrNote the
displayNameanddisplayVersionare only used if the module path is not a directory. If the module path is a directory the name and version are resolved from theversion.txtfile.- Parameters:
modelPaths- the paths to processtarget- the target directory to generate the site indisplayName- the name that should be used for the display, ornullto resolve the display namedisplayVersion- the version that should be used for the display, ornullto resolve the display version- Returns:
- the path to the directory the site was generated in
- Throws:
IOException- if an error occurs generating the site
-
-