Class JobDslBuildStep

All Implemented Interfaces:
BuildStep, CapybaraPortingLayer, Control.Owner, PageArea, Step

public class JobDslBuildStep extends AbstractStep implements BuildStep
Encapsulates the PageArea of the Job DSL plugin.
Author:
Maximilian Oeckler
  • Constructor Details

    • JobDslBuildStep

      public JobDslBuildStep(Job parent, String path)
  • Method Details

    • setScript

      public void setScript(String dslScript)
      Set the DSL script.
      Parameters:
      dslScript - DSL Script, which is groovy code.
    • getScript

      public String getScript()
      Get the DSL script.
      Returns:
      the DSL script.
    • setScriptTargetsOnFilesystem

      public void setScriptTargetsOnFilesystem(String... targets)
      Add a newline separated list of DSL scripts.
      Parameters:
      targets - The DSL scripts, located in the Workspace.
    • getScriptTargetsOnFilesystem

      public String[] getScriptTargetsOnFilesystem()
      Get the DSL scripts, that are located in the workspace.
      Returns:
      an array of DSL scripts.
    • clickUseScriptText

      public void clickUseScriptText()
      Click the radiobutton useScriptText.
    • isUseScriptText

      public boolean isUseScriptText()
      Determines if the provided DSL script should be used.
      Returns:
      TRUE if radiobutton useScriptText is selected
    • clickLookOnFilesystem

      public void clickLookOnFilesystem()
      Click the radiobutton lookOnFilesystem.
    • isLookOnFilesystem

      public boolean isLookOnFilesystem()
      Determines whether to look on filesystem for DSL scripts.
      Returns:
      TRUE if radiobutton lookOnFilesystem is selected
    • setIgnoreMissingFiles

      public void setIgnoreMissingFiles(boolean ignore)
      Decides if missing DSL scripts will be ignored.
      Parameters:
      ignore - build not fail if true
    • isIgnoreMissingFiles

      public boolean isIgnoreMissingFiles()
      Determines if missing DSL scripts will be ignored.
      Returns:
      TRUE if checkbox ignoreMissingFiles is selected
    • isIgnoreMissingFilesShown

      public boolean isIgnoreMissingFilesShown()
      Determines whether checkbox ignoreMissingFiles exists on the current page.
      Returns:
      TRUE if it exists
    • setUseSandbox

      public void setUseSandbox(boolean use)
      Decides if the DSL scripts run in a sandbox with limited abilities.
      Parameters:
      use - Run DSL scripts in a sandbox if true
    • isUseSandbox

      public boolean isUseSandbox()
      Determines if the DSL scripts run in a sandbox with limited abilities.
      Returns:
      TRUE if checkbox sandbox is selected
    • setIgnoreExisting

      public void setIgnoreExisting(boolean ignore)
      Decides if previously generated jobs or views will be ignored.
      Parameters:
      ignore - leave previous jobs and views as is if true
    • isIgnoreExisting

      public boolean isIgnoreExisting()
      Determines if previously generated jobs or views will be ignored.
      Returns:
      TRUE if checkbox ignoreExisting is selected
    • setRemovedJobAction

      public void setRemovedJobAction(JobDslRemovedJobAction action)
      Set what to do when a previously generated job is not referenced anymore.
      Parameters:
      action - The action to select. An Element of the type JobDslRemovedJobAction.
    • getRemovedJobAction

      public JobDslRemovedJobAction getRemovedJobAction()
      Determines what to do when a previously generated job is not referenced anymore.
      Returns:
      The selected action for removed jobs. An Element of the type JobDslRemovedJobAction.
    • setRemovedViewAction

      public void setRemovedViewAction(JobDslRemovedViewAction action)
      Set what to do when a previously generated view is not referenced anymore.
      Parameters:
      action - The action to select. An element of the type JobDslRemovedViewAction.
    • getRemovedViewAction

      public JobDslRemovedViewAction getRemovedViewAction()
      Determines what to do when a previously generated view is not referenced anymore.
      Returns:
      The selected action for removed views. An element of the type JobDslRemovedViewAction.
    • setRemovedConfigFilesAction

      public void setRemovedConfigFilesAction(JobDslRemovedConfigFilesAction action)
      Set what to do when a previously generated config file is not referenced anymore.
      Parameters:
      action - The action to select. An element of the type JobDslRemovedConfigFilesAction.
    • getRemovedConfigFilesAction

      public JobDslRemovedConfigFilesAction getRemovedConfigFilesAction()
      Determines what to do when a previously generated config file is not referenced anymore.
      Returns:
      The selected action for removed config files. An element of the type JobDslRemovedConfigFilesAction.
    • setLookupStrategy

      public void setLookupStrategy(JobDslLookupStrategy strategy)
      Set the context to use for relative job names.
      Parameters:
      strategy - The strategy to select. An element of the type JobDslLookupStrategy.
    • getLookupStrategy

      public JobDslLookupStrategy getLookupStrategy()
      Determines the context to use for relative job names.
      Returns:
      The selected strategy for lookup. An element of the type JobDslLookupStrategy.
    • setAdditionalClasspath

      public void setAdditionalClasspath(String... classpaths)
      Newline separated list of additional classpath entries for the Job DSL scripts. All entries must be relative to the workspace root.
      Parameters:
      classpaths - The additional classpaths.
    • getAdditionalClasspath

      public String[] getAdditionalClasspath()
      Get the additional classpath entries for the Job DSL scripts.
      Returns:
      an array of additional classpaths.
    • setFailOnMissingPlugin

      public void setFailOnMissingPlugin(boolean fail)
      Decides if the build will be marked as failed when a plugin must be installed or updated to support all features used in the DSL scripts.
      Parameters:
      fail - mark build as failed if true
    • isFailOnMissingPlugin

      public boolean isFailOnMissingPlugin()
      Determines if the build will be marked as failed when a plugin must be installed or updated to support all features used in the DSL scripts.
      Returns:
      TRUE if checkbox failOnMissingPlugin is selected
    • setUnstableOnDeprecation

      public void setUnstableOnDeprecation(boolean unstable)
      Decides if the build will be marked as unstable when using deprecated features.
      Parameters:
      unstable - mark build as unstable if true
    • isUnstableOnDeprecation

      public boolean isUnstableOnDeprecation()
      Determines if the build will be marked as unstable when using deprecated features.
      Returns:
      TRUE if checkbox unstableOnDeprecation is selected