T
- shared-statepublic abstract class CopyFilesNaming<T> extends AnchorBean<CopyFilesNaming<T>>
Constructor and Description |
---|
CopyFilesNaming() |
Modifier and Type | Method and Description |
---|---|
abstract T |
beforeCopying(Path destinationDirectory,
List<FileWithDirectoryInput> inputs)
To be called once before any calls to
destinationPath(File,
DirectoryWithPrefix, int, CopyContext) . |
Optional<Path> |
destinationPath(File file,
DirectoryWithPrefix outputTarget,
int index,
CopyContext<T> context)
Returns the output path (destination to to be copied to) for a given single file.
|
abstract Optional<Path> |
destinationPathRelative(File file,
DirectoryWithPrefix outputTarget,
int index,
CopyContext<T> context)
Calculates the relative-output path (to be appended to destDir)
|
checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString
public abstract T beforeCopying(Path destinationDirectory, List<FileWithDirectoryInput> inputs) throws OperationFailedException
destinationPath(File,
DirectoryWithPrefix, int, CopyContext)
.destinationDirectory
- the directory to which files are copied.inputs
- the total number of files to copy.OperationFailedException
public Optional<Path> destinationPath(File file, DirectoryWithPrefix outputTarget, int index, CopyContext<T> context) throws OutputWriteFailedException
file
- file to be copiedoutputTarget
- the directory and prefix associated with the file for outputtingindex
- an increasing sequence of numbers for each file beginning at 0context
- the context for the copyingOutputWriteFailedException
public abstract Optional<Path> destinationPathRelative(File file, DirectoryWithPrefix outputTarget, int index, CopyContext<T> context) throws OutputWriteFailedException
file
- file to be copiedoutputTarget
- the directory and prefix associated with the file for outputtingindex
- an increasing sequence of numbers for each file beginning at 0context
- the context for the copyingOutputWriteFailedException
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.