org.cert.cc.jira.atc.config
Class ProjectConfiguration

java.lang.Object
  extended by org.cert.cc.jira.atc.config.ProjectConfiguration
All Implemented Interfaces:
Comparable<ProjectConfiguration>

public final class ProjectConfiguration
extends Object
implements Comparable<ProjectConfiguration>

ProjectConfiguration holds the configuration for a single JIRA project. It is made up of a Set of IssueConfiguration objects.

A special ProjectConfiguration with a name of * is a catch-all for all projects. There should be only one catch-all configuration, but it is not enforced by the code.

ProjectConfiguration is sortable with the catch-all configuration always being last.

© 2010 Carnegie Mellon University

Author:
Steve Scholnick

Constructor Summary
ProjectConfiguration()
          Constructor
 
Method Summary
 void addTypeConfiguration(IssueTypeConfiguration itc)
          Adds the IssueTypeConfiguration
 int compareTo(ProjectConfiguration other)
          
 boolean equals(Object o)
          
 Set<IssueConfiguration> getIssueConfigurations(IssueType issueType, Trigger trigger)
          Returns a Set of IssueConfigurations for an issueTypeName and trigger.
 String getName()
          Returns the name
 int hashCode()
          
 boolean isCatchAll()
          Returns if this is a catch all
 boolean matches(Project project)
          Returns if this ProjectConfiguration is used for the specified project.
 void setName(String name)
          Sets the name
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProjectConfiguration

public ProjectConfiguration()
Constructor

Method Detail

matches

public boolean matches(Project project)
Returns if this ProjectConfiguration is used for the specified project. A catch-all (name equal to *) will match any name.

Parameters:
project - Project to be matched
Returns:
If a match occurred?

equals

public boolean equals(Object o)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

compareTo

public int compareTo(ProjectConfiguration other)

Specified by:
compareTo in interface Comparable<ProjectConfiguration>

isCatchAll

public boolean isCatchAll()
Returns if this is a catch all


addTypeConfiguration

public void addTypeConfiguration(IssueTypeConfiguration itc)
Adds the IssueTypeConfiguration


getIssueConfigurations

public Set<IssueConfiguration> getIssueConfigurations(IssueType issueType,
                                                      Trigger trigger)
Returns a Set of IssueConfigurations for an issueTypeName and trigger. If none are found an empty Set is returned.

Parameters:
issueType - IssueType to be matched
trigger - Kick-Off Trigger
Returns:
Set of IssueConfigurations or an empty Set

getName

public String getName()
Returns the name


setName

public void setName(String name)
Sets the name


toString

public String toString()

Overrides:
toString in class Object


Copyright © 2012 Carnegie Mellon University