Class Controller


  • public class Controller
    extends Object
    Reads the configuration and generates the output accordingly.
    • Field Detail

      • LAST_SOURCE_CHANGE_CACHE_FILE

        public static final String LAST_SOURCE_CHANGE_CACHE_FILE
        The file in the work directory where last source changes are stored.
        See Also:
        Constant Field Values
      • NO_CHECKSUM_CONTENT

        public static final String NO_CHECKSUM_CONTENT
        The content of checksum files if no checksum can be computed.
        See Also:
        Constant Field Values
    • Constructor Detail

      • Controller

        public Controller()
    • Method Detail

      • checkLogging

        protected void checkLogging()
        Initializes the Logging.
      • processGenerationUnit

        protected void processGenerationUnit​(ControllerState controllerState,
                                             UnitConfiguration unitConfiguration)
                                      throws GeneratorException
        Processes a unit of generation.
        Parameters:
        controllerState - the controller state, not null.
        unitConfiguration - the configuration of the generation unit to process, not null.
        Throws:
        GeneratorException - if a generation error occurs.
      • createOutputFilename

        protected void createOutputFilename​(Output output,
                                            ControllerState controllerState)
                                     throws GeneratorException
        Creates the output file name and sets it in the output. The filename is calculated either by the filenameConfigurator in output or is given explicitly (in the latter case nothing needs to be done).
        Parameters:
        controllerState - the controller state, not null.
        output - The output to process, not null.
        Throws:
        ConfigurationException - if an incorrect configuration is encountered, e.g. if neither filename nor filenameOutlet is set in output.
        GeneratorException - if an error occurs during generation of the output filename.