Top Description Inners Fields Constructors Methods
org.jboss.modules

pack-priv Class LayeredModulePathFactory

extends Object
Class Inheritance
Imports
java.io.File, .FileInputStream, .IOException, .InputStream, .InputStreamReader, .Reader, java.nio.charset.StandardCharsets, java.util.ArrayList, .Collections, .List, .Properties

Provides a module path that includes entries for any "layer" and "add-on" directory structures found within the regular items in the provided module path.
Author
Brian Stansberry (c) 2012 Red Hat Inc.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static final String

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
private static LayeredModulePathFactory.LayersConfig
pack-priv static void
loadOverlays(final File
the layer root
layeringRoot
,
final List<File>
the module path
path
)

Load the overlays for each layer.

pack-priv static boolean
public static List<String>
readRefs(final File file)

pack-priv static List<String>
pack-priv static File[]

Returns:

a new module path, including any layers and add-ons, if found
resolveLayeredModulePath
(File...
the filesystem locations that make up the standard module path, each of which is to be checked for the presence of layers and add-ons
modulePath
)

Inspects each element in the given modulePath to see if it includes a layers.conf file and/or a standard directory structure with child directories system/layers and, optionally, system/add-ons.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

OVERLAYSback to summary
private static final String OVERLAYS

Constructor Detail

LayeredModulePathFactoryback to summary
pack-priv LayeredModulePathFactory()

Method Detail

getLayersConfigback to summary
private static LayeredModulePathFactory.LayersConfig getLayersConfig(File repoRoot)
loadOverlaysback to summary
pack-priv static void loadOverlays(final File layeringRoot, final List<File> path)

Load the overlays for each layer.

Parameters
layeringRoot:File

the layer root

path:List<File>

the module path

readLineback to summary
pack-priv static boolean readLine(InputStream is, StringBuffer buffer) throws IOException
readRefsback to summary
public static List<String> readRefs(final File file) throws IOException
readRefsback to summary
pack-priv static List<String> readRefs(final InputStream is) throws IOException
resolveLayeredModulePathback to summary
pack-priv static File[] resolveLayeredModulePath(File... modulePath)

Inspects each element in the given modulePath to see if it includes a layers.conf file and/or a standard directory structure with child directories system/layers and, optionally, system/add-ons. If so, the layers identified in layers.conf are added to the module path

Parameters
modulePath:File[]

the filesystem locations that make up the standard module path, each of which is to be checked for the presence of layers and add-ons

Returns:File[]

a new module path, including any layers and add-ons, if found

org.jboss.modules back to summary

private Class LayeredModulePathFactory.LayersConfig

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String
private final boolean
private static final String
private static final String
private final List<String>
private final String

Constructor Summary

AccessConstructor and Description
private
private

Method Summary

Modifier and TypeMethod and Description
pack-priv String
pack-priv List<String>
pack-priv String
pack-priv boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

addOnsPathback to summary
private final String addOnsPath
configuredback to summary
private final boolean configured
DEFAULT_ADD_ONS_PATHback to summary
private static final String DEFAULT_ADD_ONS_PATH
DEFAULT_LAYERS_PATHback to summary
private static final String DEFAULT_LAYERS_PATH
layersback to summary
private final List<String> layers
layersPathback to summary
private final String layersPath

Constructor Detail

LayersConfigback to summary
private LayersConfig()
LayersConfigback to summary
private LayersConfig(Properties properties)

Method Detail

getAddOnsPathback to summary
pack-priv String getAddOnsPath()
getLayersback to summary
pack-priv List<String> getLayers()
getLayersPathback to summary
pack-priv String getLayersPath()
isConfiguredback to summary
pack-priv boolean isConfigured()