All Downloads are FREE. Search and download functionalities are using the official Maven repository.

change-sysadmin-scala_3.0.1.4.source-code.stepRun-untemplate.scala Maven / Gradle / Ivy

The newest version!
// DO NOT HAND EDIT -- Autogenerated from 'stepRun.untemplate' at 2024-03-27T00:43:21.058266Z
package com.mchange.sysadmin.taskrunner

import java.io.{Writer,StringWriter}
import scala.collection.*



val Untemplate_stepRun = new untemplate.Untemplate[StepRunMaybeIndexed,Nothing]:
  val UntemplateFunction                    : untemplate.Untemplate[StepRunMaybeIndexed,Nothing] = this
  val UntemplateName                        : String = "stepRun"
  val UntemplatePackage                     : String = "com.mchange.sysadmin.taskrunner"
  val UntemplateInputName                   : String = "srmi"
  val UntemplateInputTypeDeclared           : String = "StepRunMaybeIndexed"
  val UntemplateInputTypeCanonical          : Option[String] = untemplate.Macro.nonEmptyStringOption( untemplate.Macro.recursiveCanonicalName[StepRunMaybeIndexed] )
  val UntemplateInputDefaultArgument        : Option[StepRunMaybeIndexed] = (None : Option[StepRunMaybeIndexed])
  val UntemplateOutputMetadataTypeDeclared  : String = "Nothing"
  val UntemplateOutputMetadataTypeCanonical : Option[String] = untemplate.Macro.nonEmptyStringOption( untemplate.Macro.recursiveCanonicalName[Nothing] )
  val UntemplateHeaderNote                  : String = ""

  val UntemplateAttributes : immutable.Map[String,Any] = immutable.Map.empty


  def apply(srmi : StepRunMaybeIndexed) : untemplate.Result[Nothing] =
    val writer             : StringWriter = new StringWriter(6400)
    val attrs              : immutable.Map[String,Any] = UntemplateAttributes
    var mbMetadata         : Option[Nothing] = None
    var outputTransformer  : Function1[untemplate.Result[Nothing],untemplate.Result[Nothing]] = identity

    val StepRunMaybeIndexed( stepRun, mbIndex ) = srmi


      val block0 = new Function0[String]:
        def apply() : String =
          "\n
\n
" + (mbIndex.fold("")(i => s"${i}. ")) + "" + ( stepRun.step.name.htmlSafeText ) + "
\n
\n " + ( mbActionDescription( stepRun.step ) ) + "\n
Succeeded? " + (yn(stepRun.success)) + "
\n" writer.write(block0()) stepRun.step.essential.foreach { ess => // essential is overridden val block1 = new Function0[String]: def apply() : String = "
Essential? " + ( yn(ess) ) + "
\n" writer.write(block1()) } val block2 = new Function0[String]: def apply() : String = " " + ( stepRunBody( stepRun ) ) + "\n
\n
\n" writer.write(block2()) outputTransformer( untemplate.Result( mbMetadata, writer.toString ) ) end apply end Untemplate_stepRun def stepRun(srmi : StepRunMaybeIndexed) : untemplate.Result[Nothing] = Untemplate_stepRun( srmi )




© 2015 - 2025 Weber Informatics LLC | Privacy Policy