org.apache.maven.plugin.jira
Class AbstractJiraDownloader

java.lang.Object
  extended by org.apache.maven.plugin.jira.AbstractJiraDownloader
Direct Known Subclasses:
AdaptiveJiraDownloader, ClassicJiraDownloader, RestJiraDownloader

public abstract class AbstractJiraDownloader
extends Object

Abstract API, more or less, to retrieving issue information from JIRA. Intended to have subclasses for the old (RSS) and new (REST) ways of doing things.

Version:
$Id: AbstractJiraDownloader.java 1626316 2014-09-19 19:57:39Z mfriedenhagen $
Author:
mfranken@xebia.com, jruiz@exist.com

Field Summary
protected  String component
          The component to show.
protected  int connectionTimeout
           
protected  String filter
          The filter to apply to query to JIRA.
protected  String fixVersionIds
          Ids of fix versions to show, as comma separated string.
protected  String jiraDatePattern
          The pattern used to parse dates from the JIRA xml file.
protected  String jiraPassword
          The password to log into JIRA.
protected  String jiraUser
          The username to log into JIRA.
protected  Log log
          Log for debug output.
protected  int nbEntriesMax
          The maximum number of entries to show.
protected  boolean onlyCurrentVersion
          Filter the JIRA query based on the current version
protected  File output
          Output file for xml document.
protected  String priorityIds
          Ids of priority to show, as comma separated string.
protected  MavenProject project
          The maven project.
protected  String proxyHost
           
protected  String proxyPass
           
protected  int proxyPort
           
protected  String proxyUser
           
protected  int receiveTimout
           
protected  String resolutionIds
          Ids of resolution to show, as comma separated string.
protected  Settings settings
          The maven settings.
protected  String sortColumnNames
          Column names to sort by, as comma separated string.
protected  String statusIds
          Ids of status to show, as comma separated string.
protected  String typeIds
          Ids of types to show, as comma separated string.
protected  boolean useJql
          Use JQL, JIRA query language, instead of URL parameter based queries.
protected static String UTF_8
           
protected  String versionPrefix
          The versionPrefix to apply to the POM version
protected  String webPassword
          The password to log into webserver.
protected  String webUser
          The username to log into webserver.
 
Constructor Summary
AbstractJiraDownloader()
           
 
Method Summary
abstract  void doExecute()
          Execute the query on the JIRA server.
protected  String getFixFor()
          Override this method if you need to get issues for a specific Fix For.
abstract  List<Issue> getIssueList()
           
protected  Log getLog()
           
 File getOutput()
           
protected  void getProxyInfo(String jiraUrl)
           
 String getVersionPrefix()
           
protected  boolean isJiraAuthenticationConfigured()
          Check to see if we think that JIRA authentication is needed.
 boolean isOnlyCurrentVersion()
           
 boolean isUseJql()
           
 void setComponent(String theseComponents)
          Sets the component(s) to apply to query JIRA.
 void setConnectionTimeout(int connectionTimeout)
           
 void setFilter(String thisFilter)
          Sets the filter to apply to query to JIRA.
 void setFixVersionIds(String theseFixVersionIds)
          Sets the fix version id(s) to apply to query JIRA.
 void setJiraDatePattern(String jiraDatePattern)
           
 void setJiraPassword(String thisJiraPassword)
          Sets the password to log into a secured JIRA.
 void setJiraUser(String thisJiraUser)
          Sets the username to log into a secured JIRA.
 void setLog(Log log)
           
 void setMavenProject(Object thisProject)
          Sets the project.
 void setNbEntries(int nbEntries)
          Sets the maximum number of Issues to show.
 void setOnlyCurrentVersion(boolean onlyCurrentVersion)
           
 void setOutput(File thisOutput)
          Set the output file for the log.
 void setPriorityIds(String thisPriorityIds)
          Sets the priorityIds.
 void setReceiveTimout(int receiveTimout)
           
 void setResolutionIds(String thisResolutionIds)
          Sets the resolutionIds.
 void setSettings(Settings settings)
           
 void setSortColumnNames(String thisSortColumnNames)
          Sets the sort column names.
 void setStatusIds(String thisStatusIds)
          Sets the statusIds.
 void setTypeIds(String theseTypeIds)
          Sets the typeIds.
 void setUseJql(boolean useJql)
           
 void setVersionPrefix(String versionPrefix)
           
 void setWebPassword(String thisWebPassword)
          Sets the password for authentication against the webserver.
 void setWebUser(String thisWebUser)
          Sets the username for authentication against the webserver.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UTF_8

protected static final String UTF_8
See Also:
Constant Field Values

log

protected Log log
Log for debug output.


output

protected File output
Output file for xml document.


nbEntriesMax

protected int nbEntriesMax
The maximum number of entries to show.


filter

protected String filter
The filter to apply to query to JIRA.


fixVersionIds

protected String fixVersionIds
Ids of fix versions to show, as comma separated string.


statusIds

protected String statusIds
Ids of status to show, as comma separated string.


resolutionIds

protected String resolutionIds
Ids of resolution to show, as comma separated string.


priorityIds

protected String priorityIds
Ids of priority to show, as comma separated string.


component

protected String component
The component to show.


typeIds

protected String typeIds
Ids of types to show, as comma separated string.


sortColumnNames

protected String sortColumnNames
Column names to sort by, as comma separated string.


jiraUser

protected String jiraUser
The username to log into JIRA.


jiraPassword

protected String jiraPassword
The password to log into JIRA.


webUser

protected String webUser
The username to log into webserver.


webPassword

protected String webPassword
The password to log into webserver.


project

protected MavenProject project
The maven project.


settings

protected Settings settings
The maven settings.


useJql

protected boolean useJql
Use JQL, JIRA query language, instead of URL parameter based queries. Note that this is down here to make it easier for the mojo to deal with both new and old flavors.


onlyCurrentVersion

protected boolean onlyCurrentVersion
Filter the JIRA query based on the current version


versionPrefix

protected String versionPrefix
The versionPrefix to apply to the POM version


jiraDatePattern

protected String jiraDatePattern
The pattern used to parse dates from the JIRA xml file.


proxyHost

protected String proxyHost

proxyPort

protected int proxyPort

proxyUser

protected String proxyUser

proxyPass

protected String proxyPass

connectionTimeout

protected int connectionTimeout

receiveTimout

protected int receiveTimout
Constructor Detail

AbstractJiraDownloader

public AbstractJiraDownloader()
Method Detail

doExecute

public abstract void doExecute()
                        throws Exception
Execute the query on the JIRA server.

Throws:
Exception - on error

isJiraAuthenticationConfigured

protected boolean isJiraAuthenticationConfigured()
Check to see if we think that JIRA authentication is needed.

Returns:
true if jiraUser and jiraPassword are set, otherwise false

getProxyInfo

protected void getProxyInfo(String jiraUrl)

getFixFor

protected String getFixFor()
Override this method if you need to get issues for a specific Fix For.

Returns:
A Fix For id or null if you don't have that need

getIssueList

public abstract List<Issue> getIssueList()
                                  throws MojoExecutionException
Throws:
MojoExecutionException

setJiraDatePattern

public void setJiraDatePattern(String jiraDatePattern)

setOutput

public void setOutput(File thisOutput)
Set the output file for the log.

Parameters:
thisOutput - the output file

getOutput

public File getOutput()

setMavenProject

public void setMavenProject(Object thisProject)
Sets the project.

Parameters:
thisProject - The project to set

setNbEntries

public void setNbEntries(int nbEntries)
Sets the maximum number of Issues to show.

Parameters:
nbEntries - The maximum number of Issues

setStatusIds

public void setStatusIds(String thisStatusIds)
Sets the statusIds.

Parameters:
thisStatusIds - The id(s) of the status to show, as comma separated string

setPriorityIds

public void setPriorityIds(String thisPriorityIds)
Sets the priorityIds.

Parameters:
thisPriorityIds - The id(s) of the priority to show, as comma separated string

setResolutionIds

public void setResolutionIds(String thisResolutionIds)
Sets the resolutionIds.

Parameters:
thisResolutionIds - The id(s) of the resolution to show, as comma separated string

setSortColumnNames

public void setSortColumnNames(String thisSortColumnNames)
Sets the sort column names.

Parameters:
thisSortColumnNames - The column names to sort by

setWebPassword

public void setWebPassword(String thisWebPassword)
Sets the password for authentication against the webserver.

Parameters:
thisWebPassword - The password of the webserver

setWebUser

public void setWebUser(String thisWebUser)
Sets the username for authentication against the webserver.

Parameters:
thisWebUser - The username of the webserver

setJiraPassword

public void setJiraPassword(String thisJiraPassword)
Sets the password to log into a secured JIRA.

Parameters:
thisJiraPassword - The password for JIRA

setJiraUser

public void setJiraUser(String thisJiraUser)
Sets the username to log into a secured JIRA.

Parameters:
thisJiraUser - The username for JIRA

setFilter

public void setFilter(String thisFilter)
Sets the filter to apply to query to JIRA.

Parameters:
thisFilter - The filter to query JIRA

setComponent

public void setComponent(String theseComponents)
Sets the component(s) to apply to query JIRA.

Parameters:
theseComponents - The id(s) of components to show, as comma separated string

setFixVersionIds

public void setFixVersionIds(String theseFixVersionIds)
Sets the fix version id(s) to apply to query JIRA.

Parameters:
theseFixVersionIds - The id(s) of fix versions to show, as comma separated string

setTypeIds

public void setTypeIds(String theseTypeIds)
Sets the typeIds.

Parameters:
theseTypeIds - The id(s) of the types to show, as comma separated string

setLog

public void setLog(Log log)

getLog

protected Log getLog()

setSettings

public void setSettings(Settings settings)

isUseJql

public boolean isUseJql()

setUseJql

public void setUseJql(boolean useJql)

isOnlyCurrentVersion

public boolean isOnlyCurrentVersion()

setOnlyCurrentVersion

public void setOnlyCurrentVersion(boolean onlyCurrentVersion)

getVersionPrefix

public String getVersionPrefix()

setVersionPrefix

public void setVersionPrefix(String versionPrefix)

setConnectionTimeout

public void setConnectionTimeout(int connectionTimeout)

setReceiveTimout

public void setReceiveTimout(int receiveTimout)


Copyright © 2002–2014 The Apache Software Foundation. All rights reserved.