java.lang.Object
au.com.centrumsystems.hudson.plugin.buildpipeline.ProjectForm

public class ProjectForm extends Object
Author:
Centrum Systems Representation of a set of projects
  • Constructor Details

    • ProjectForm

      public ProjectForm(String name)
      Parameters:
      name - project name
    • ProjectForm

      public ProjectForm(AbstractProject<?,?> project, PipelineHeaderExtension columnHeaders)
      Parameters:
      project - project\
      columnHeaders - the column headers describing how to get build parameters
  • Method Details

    • as

      public static ProjectForm as(AbstractProject<?,?> p, PipelineHeaderExtension columnHeaders)
      Wraps possibly null AbstractProject into ProjectForm.
      Parameters:
      p - project to be wrapped.
      columnHeaders - column headers to grab build parameters from
      Returns:
      possibly null.
    • getName

      public String getName()
    • getHealth

      public String getHealth()
    • getResult

      public String getResult()
    • getUrl

      public String getUrl()
    • getLastSuccessfulBuildNumber

      public String getLastSuccessfulBuildNumber()
    • getLastSuccessfulBuildParams

      public Map<String,String> getLastSuccessfulBuildParams()
    • getDependencies

      public List<ProjectForm> getDependencies()
    • getDisplayTrigger

      public Boolean getDisplayTrigger()
      Gets a display value to determine whether a manual jobs 'trigger' button will be shown. This is used along with isTriggerOnlyLatestJob property allow only the latest version of a job to run. Works by: Initially always defaulted to true. If isTriggerOnlyLatestJob is set to true then as the html code is rendered the first job which should show the trigger button will render and then a call will be made to 'setDisplayTrigger' to change the value to both so all future jobs will not display the trigger. see main.jelly
      Returns:
      boolean whether to display or not
    • setDisplayTrigger

      public void setDisplayTrigger(Boolean display)
      Sets a display value to determine whether a manual jobs 'trigger' button will be shown. This is used along with isTriggerOnlyLatestJob property allow only the latest version of a job to run. Works by: Initially always defaulted to true. If isTriggerOnlyLatestJob is set to true then as the html code is rendered the first job which should show the trigger button will render and then a call will be made to 'setDisplayTrigger' to change the value to both so all future jobs will not display the trigger. see main.jelly
      Parameters:
      display - - boolean to indicate whether the trigger button should be shown
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getId

      public int getId()
    • asJSON

      @JavaScriptMethod public String asJSON()
      Project as JSON
      Returns:
      JSON string