Class ProjectForm
- 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 Summary
Constructors Constructor Description ProjectForm(AbstractProject<?,?> project, PipelineHeaderExtension columnHeaders)
ProjectForm(String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ProjectForm
as(AbstractProject<?,?> p, PipelineHeaderExtension columnHeaders)
Wraps possibly nullAbstractProject
intoProjectForm
.String
asJSON()
Project as JSONboolean
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.
-
-
-
Constructor Detail
-
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 Detail
-
as
public static ProjectForm as(AbstractProject<?,?> p, PipelineHeaderExtension columnHeaders)
Wraps possibly nullAbstractProject
intoProjectForm
.- 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()
-
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
-
getId
public int getId()
-
asJSON
@JavaScriptMethod public String asJSON()
Project as JSON- Returns:
- JSON string
-
-