com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data
Class GerritProject

java.lang.Object
  extended by com.sonyericsson.hudson.plugins.gerrit.trigger.hudsontrigger.data.GerritProject
All Implemented Interfaces:
hudson.model.Describable<GerritProject>

public class GerritProject
extends Object
implements hudson.model.Describable<GerritProject>

Base settings for one matcher rule of a Gerrit project.

Author:
Robert Sandell <robert.sandell@sonyericsson.com>

Nested Class Summary
static class GerritProject.DescriptorImpl
          Descriptor allowing for communication within the Repeatable.
 
Constructor Summary
GerritProject()
          Default empty constructor.
GerritProject(CompareType compareType, String pattern, List<Branch> branches)
          DataBound Constructor.
 
Method Summary
 List<Branch> getBranches()
          The list of Branch-rules.
 CompareType getCompareType()
          Which algorithm-type to use with the pattern.
 hudson.model.Descriptor<GerritProject> getDescriptor()
           
 String getPattern()
          The pattern for the project-name to match on.
 boolean isInteresting(String project, String branch)
          Compares the project and branch to see if the rules specified is a match.
 void setBranches(List<Branch> branches)
          The list of Branch-rules.
 void setCompareType(CompareType compareType)
          Which algorithm-type to use with the pattern.
 void setPattern(String pattern)
          The pattern for the project-name to match on.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GerritProject

public GerritProject()
Default empty constructor.


GerritProject

@DataBoundConstructor
public GerritProject(CompareType compareType,
                                          String pattern,
                                          List<Branch> branches)
DataBound Constructor.

Parameters:
compareType - the compareType
pattern - the project-name pattern
branches - the branch-rules
Method Detail

getCompareType

public CompareType getCompareType()
Which algorithm-type to use with the pattern.

Returns:
the compareType

setCompareType

public void setCompareType(CompareType compareType)
Which algorithm-type to use with the pattern.

Parameters:
compareType - the compareType

getPattern

public String getPattern()
The pattern for the project-name to match on.

Returns:
the pattern

setPattern

public void setPattern(String pattern)
The pattern for the project-name to match on.

Parameters:
pattern - the pattern

getBranches

public List<Branch> getBranches()
The list of Branch-rules.

Returns:
the branch-rules

setBranches

public void setBranches(List<Branch> branches)
The list of Branch-rules.

Parameters:
branches - the branch-rules

isInteresting

public boolean isInteresting(String project,
                             String branch)
Compares the project and branch to see if the rules specified is a match.

Parameters:
project - the gerrit project
branch - the branch.
Returns:
true is the rules match.

getDescriptor

public hudson.model.Descriptor<GerritProject> getDescriptor()
Specified by:
getDescriptor in interface hudson.model.Describable<GerritProject>


Copyright © 2004-2011. All Rights Reserved.