hudson.plugins.label
Class LabelColumn

java.lang.Object
  extended by hudson.views.ListViewColumn
      extended by hudson.plugins.label.LabelColumn
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.views.ListViewColumn>

public class LabelColumn
extends hudson.views.ListViewColumn

This ListViewColumn adds a (optional) new column to user defined views that shows the label of the last build of a job.

Author:
nmahle

Nested Class Summary
static class LabelColumn.LabelColumnDescriptor
           
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 
Fields inherited from class hudson.views.ListViewColumn
LIST
 
Constructor Summary
LabelColumn()
           
LabelColumn(String jobName4Label)
           
 
Method Summary
 String defaultLabel(hudson.model.Job job)
          default Method to set the label, which will shown in labelView - column i.e. if jobName is DAILY and lastBuild is number 13 then lastLabel = DAILY-13
 String getJobName4Label()
           
 String getLabel(hudson.model.Job job)
          Method to get the label out of textfield and return it for the column
 String specialLabel(hudson.model.Job job, String prefix)
          special Method to set the label, which will shown in labelView - column i.e. if prefix is "01.02.39-" and lastBuild is number 13 then lastLabel = 01.02.39-13
 String[] splitJobs(String jobName4Label)
          Method to split textfield ";" separated JobNames
 
Methods inherited from class hudson.views.ListViewColumn
all, createDefaultInitialColumnList, getColumnCaption, getDescriptor, shownByDefault
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LabelColumn

@DataBoundConstructor
public LabelColumn(String jobName4Label)

LabelColumn

public LabelColumn()
Method Detail

getJobName4Label

public String getJobName4Label()

getLabel

public String getLabel(hudson.model.Job job)
Method to get the label out of textfield and return it for the column

Parameters:
Job - job
Returns:
String result is the label which will shown in the column

splitJobs

public String[] splitJobs(String jobName4Label)
Method to split textfield ";" separated JobNames

Parameters:
String - jobName4Label textfield list of JobNames in one String
Returns:
String Array jobNames4Label contains JobNames

defaultLabel

public String defaultLabel(hudson.model.Job job)
default Method to set the label, which will shown in labelView - column i.e. if jobName is DAILY and lastBuild is number 13 then lastLabel = DAILY-13

Parameters:
Job - job
Returns:
String lastLabel

specialLabel

public String specialLabel(hudson.model.Job job,
                           String prefix)
special Method to set the label, which will shown in labelView - column i.e. if prefix is "01.02.39-" and lastBuild is number 13 then lastLabel = 01.02.39-13

Parameters:
Job - job
String - prefix which is the prefix label
Returns:
String lastLabel


Copyright © 2004-2011 Hudson. All Rights Reserved.