Class RecordingWriters
Object
RecordingWriters
Two writers that record any output-names that are passed as arguments.
The two writers are:
- A
CheckIfAllowed
that selectively outputs certain output-names. - A
AlwaysAllowed
that allows all output-names.
- Author:
- Owen Feehan
-
Constructor Summary
ConstructorsConstructorDescriptionRecordingWriters
(ElementOutputter outputter, Optional<WriterExecuteBeforeEveryOperation> preop, Optional<MultiLevelRecordedOutputs> recordedOutputs) Creates the two writers. -
Method Summary
Modifier and TypeMethodDescriptionmultiplex
(boolean selectSelective) Multiplexes between theselective
andpermissive
writers based on a flag.A writer that allows all output-names, and records the written output-names.If defined, all output-names that are passed as arguments to both writers are recorded here.secondLevel
(String outputNameFirstLevel) A writer that performs a second-level check on which outputs occur, but writes to the top-level directory.A writer that allows only certain selected output-names, and records the written output-names.
-
Constructor Details
-
RecordingWriters
public RecordingWriters(ElementOutputter outputter, Optional<WriterExecuteBeforeEveryOperation> preop, Optional<MultiLevelRecordedOutputs> recordedOutputs) Creates the two writers.- Parameters:
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.
-
-
Method Details
-
multiplex
Multiplexes between theselective
andpermissive
writers based on a flag.- Parameters:
selectSelective
- if true,selective
is returned, otherwisepermissive
.- Returns:
- the chosen writer
-
secondLevel
A writer that performs a second-level check on which outputs occur, but writes to the top-level directory.- Parameters:
outputNameFirstLevel
- the first (top-most) level of an output name, with which writing any second-level outputs is associated.- Returns:
- a newly created writer checking on particular second-level output names.
-
permissive
A writer that allows all output-names, and records the written output-names.- Returns:
- the writer.
-
selective
A writer that allows only certain selected output-names, and records the written output-names.- Returns:
- the writer.
-
recordedOutputs
If defined, all output-names that are passed as arguments to both writers are recorded here.
-