public static class LayerConfiguration.Builder extends Object
LayerConfiguration.| Modifier and Type | Method and Description |
|---|---|
LayerConfiguration.Builder |
addEntry(LayerEntry entry)
Adds an entry to the layer.
|
LayerConfiguration.Builder |
addEntry(Path sourceFile,
AbsoluteUnixPath pathInContainer)
Adds an entry to the layer.
|
LayerConfiguration.Builder |
addEntry(Path sourceFile,
AbsoluteUnixPath pathInContainer,
FilePermissions permissions)
Adds an entry to the layer with the given permissions.
|
LayerConfiguration.Builder |
addEntry(Path sourceFile,
AbsoluteUnixPath pathInContainer,
FilePermissions permissions,
Instant modificationTime)
Adds an entry to the layer with the given permissions and file modification time.
|
LayerConfiguration.Builder |
addEntry(Path sourceFile,
AbsoluteUnixPath pathInContainer,
Instant modificationTime)
Adds an entry to the layer with the given file modification time.
|
LayerConfiguration.Builder |
addEntryRecursive(Path sourceFile,
AbsoluteUnixPath pathInContainer)
Adds an entry to the layer.
|
LayerConfiguration.Builder |
addEntryRecursive(Path sourceFile,
AbsoluteUnixPath pathInContainer,
BiFunction<Path,AbsoluteUnixPath,FilePermissions> filePermissionProvider)
Adds an entry to the layer.
|
LayerConfiguration.Builder |
addEntryRecursive(Path sourceFile,
AbsoluteUnixPath pathInContainer,
BiFunction<Path,AbsoluteUnixPath,FilePermissions> filePermissionProvider,
BiFunction<Path,AbsoluteUnixPath,Instant> modificationTimeProvider)
Adds an entry to the layer.
|
LayerConfiguration |
build()
Returns the built
LayerConfiguration. |
LayerConfiguration.Builder |
setName(String name)
Sets a name for this layer.
|
public LayerConfiguration.Builder setName(String name)
name - the namepublic LayerConfiguration.Builder addEntry(LayerEntry entry)
entry - the layer entry to addpublic LayerConfiguration.Builder addEntry(Path sourceFile, AbsoluteUnixPath pathInContainer)
For example, addEntry(Paths.get("myfile"),
AbsoluteUnixPath.get("/path/in/container")) adds a file myfile to the container file
system at /path/in/container.
For example, addEntry(Paths.get("mydirectory"),
AbsoluteUnixPath.get("/path/in/container")) adds a directory mydirectory/ to the
container file system at /path/in/container/. This does not add the contents
of mydirectory.
sourceFile - the source file to add to the layerpathInContainer - the path in the container file system corresponding to the sourceFilepublic LayerConfiguration.Builder addEntry(Path sourceFile, AbsoluteUnixPath pathInContainer, FilePermissions permissions)
addEntry(Path,
AbsoluteUnixPath) for more information.sourceFile - the source file to add to the layerpathInContainer - the path in the container file system corresponding to the sourceFilepermissions - the file permissions on the containeraddEntry(Path, AbsoluteUnixPath),
FilePermissions.DEFAULT_FILE_PERMISSIONS,
FilePermissions.DEFAULT_FOLDER_PERMISSIONSpublic LayerConfiguration.Builder addEntry(Path sourceFile, AbsoluteUnixPath pathInContainer, Instant modificationTime)
addEntry(Path,
AbsoluteUnixPath) for more information.sourceFile - the source file to add to the layerpathInContainer - the path in the container file system corresponding to the sourceFilemodificationTime - the file modification timeaddEntry(Path, AbsoluteUnixPath)public LayerConfiguration.Builder addEntry(Path sourceFile, AbsoluteUnixPath pathInContainer, FilePermissions permissions, Instant modificationTime)
addEntry(Path, AbsoluteUnixPath) for more information.sourceFile - the source file to add to the layerpathInContainer - the path in the container file system corresponding to the sourceFilepermissions - the file permissions on the containermodificationTime - the file modification timeaddEntry(Path, AbsoluteUnixPath),
FilePermissions.DEFAULT_FILE_PERMISSIONS,
FilePermissions.DEFAULT_FOLDER_PERMISSIONSpublic LayerConfiguration.Builder addEntryRecursive(Path sourceFile, AbsoluteUnixPath pathInContainer) throws IOException
For example, addEntryRecursive(Paths.get("mydirectory",
AbsoluteUnixPath.get("/path/in/container")) adds mydirectory to the container file
system at /path/in/container such that mydirectory/subfile is found at /path/in/container/subfile.
sourceFile - the source file to add to the layer recursivelypathInContainer - the path in the container file system corresponding to the sourceFileIOException - if an exception occurred when recursively listing the directorypublic LayerConfiguration.Builder addEntryRecursive(Path sourceFile, AbsoluteUnixPath pathInContainer, BiFunction<Path,AbsoluteUnixPath,FilePermissions> filePermissionProvider) throws IOException
sourceFile - the source file to add to the layer recursivelypathInContainer - the path in the container file system corresponding to the sourceFilefilePermissionProvider - a provider that takes a source path and destination path on the
container and returns the file permissions that should be set for that pathIOException - if an exception occurred when recursively listing the directorypublic LayerConfiguration.Builder addEntryRecursive(Path sourceFile, AbsoluteUnixPath pathInContainer, BiFunction<Path,AbsoluteUnixPath,FilePermissions> filePermissionProvider, BiFunction<Path,AbsoluteUnixPath,Instant> modificationTimeProvider) throws IOException
sourceFile - the source file to add to the layer recursivelypathInContainer - the path in the container file system corresponding to the sourceFilefilePermissionProvider - a provider that takes a source path and destination path on the
container and returns the file permissions that should be set for that pathmodificationTimeProvider - a provider that takes a source path and destination path on
the container and returns the file modification time that should be set for that pathIOException - if an exception occurred when recursively listing the directorypublic LayerConfiguration build()
LayerConfiguration.LayerConfigurationCopyright © 2019. All rights reserved.