public class RecordingWriters extends Object
The two writers are:
CheckIfAllowed
that selectively outputs certain output-names.
AlwaysAllowed
that allows all output-names.
Constructor and Description |
---|
RecordingWriters(ElementOutputter outputter,
Optional<WriterExecuteBeforeEveryOperation> preop,
Optional<MultiLevelRecordedOutputs> recordedOutputs)
Creates the two writers.
|
Modifier and Type | Method and Description |
---|---|
Writer |
multiplex(boolean selectSelective)
Multiplexes between the
selective and permissive writers based on a flag. |
Writer |
permissive()
A writer that allows all output-names, and records the written output-names
|
Optional<MultiLevelRecordedOutputs> |
recordedOutputs()
If defined, all output-names that are passed as arguments to both writers are recorded here.
|
Writer |
secondLevel(String outputNameFirstLevel)
A writer that performs a second-level check on which outputs occur, but writes to the
top-level directory.
|
Writer |
selective()
A writer that allows only certain selected output-names, and records the written output-names
|
public RecordingWriters(ElementOutputter outputter, Optional<WriterExecuteBeforeEveryOperation> preop, Optional<MultiLevelRecordedOutputs> recordedOutputs)
outputter
- the output-manager with which the writers are associated.preop
- an operation executed before creation of every directory, if defined.recordedOutputs
- all output-names that are passed as arguments to both writers are
recorded here.public Writer multiplex(boolean selectSelective)
selective
and permissive
writers based on a flag.selectSelective
- if true, selective
is returned, otherwise permissive
.public Writer secondLevel(String outputNameFirstLevel)
public Writer permissive()
public Writer selective()
public Optional<MultiLevelRecordedOutputs> recordedOutputs()
Copyright © 2010–2023 Owen Feehan, ETH Zurich, University of Zurich, Hoffmann-La Roche. All rights reserved.