au.com.centrumsystems.hudson.plugin.buildpipeline
Class ProjectForm

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

public class ProjectForm
extends Object

Author:
Centrum Systems Representation of a set of projects

Constructor Summary
ProjectForm(hudson.model.AbstractProject<?,?> project)
           
ProjectForm(String name)
           
 
Method Summary
static ProjectForm as(hudson.model.AbstractProject<?,?> p)
          Wraps possibly null AbstractProject into ProjectForm.
 String asJSON()
          Project as JSON
 boolean equals(Object obj)
           
 List<ProjectForm> getDependencies()
           
 Boolean getDisplayTrigger()
          Gets a display value to determine whether a manual jobs 'trigger' button will be shown.
 String getHealth()
           
 int getId()
           
 String getLastSuccessfulBuildNumber()
           
 Map<String,String> getLastSuccessfulBuildParams()
           
 String getName()
           
 String getResult()
           
 String getUrl()
           
 int hashCode()
           
 void setDisplayTrigger(Boolean display)
          Sets a display value to determine whether a manual jobs 'trigger' button will be shown.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectForm

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

ProjectForm

public ProjectForm(hudson.model.AbstractProject<?,?> project)
Parameters:
project - project
Method Detail

as

public static ProjectForm as(hudson.model.AbstractProject<?,?> p)
Wraps possibly null AbstractProject into ProjectForm.

Parameters:
p - project to be wrapped.
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


Copyright © 2004-2014. All Rights Reserved.