org.nuiton.jredmine.plugin
Class IssuesCollector

java.lang.Object
  extended by org.nuiton.jredmine.plugin.IssuesCollector

public class IssuesCollector
extends Object

A class to collect some issues due to given filters.

Since:
1.0.0
Author:
chemit

Field Summary
protected  List<Integer> categoryIds
          the list of category ids collected
protected  Issue[] issues
          the list of issues collected
protected  org.apache.maven.plugin.logging.Log log
          logger
protected  Integer maxEntries
          to restrict on number of entries to collect
protected  List<Integer> priorityIds
          the list of priority ids collected
protected  List<Integer> statusIds
          the list of status ids collected
protected  List<Integer> trackerIds
          the list of tracker ids collected
protected  boolean verbose
          verbose flag
protected  List<Integer> versionIds
          the list of version ids collected
 
Constructor Summary
IssuesCollector(org.apache.maven.plugin.logging.Log log, boolean verbose)
           
 
Method Summary
protected  boolean canIncludeIssue(Issue i)
          Test if a given issue can be collected.
 void clearFilters()
          clean all internal states.
 void collect(RedmineService service, IssueCollectorConfiguration config)
          Collects the issues given the configuration passed.
 List<Integer> getCategoryIds()
           
 Issue[] getIssues()
           
 Integer getMaxEntries()
           
 List<Integer> getPriorityIds()
           
 List<Integer> getStatusIds()
           
 List<Integer> getTrackerIds()
           
 List<Integer> getVersionIds()
           
protected  void prepareFilters(RedmineService service, IssueCollectorConfiguration config)
          Prepare the collector filters due to the given collector configuration.
protected  List<Integer> toIntegerList(String[] strIds)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected final org.apache.maven.plugin.logging.Log log
logger


verbose

protected final boolean verbose
verbose flag


maxEntries

protected Integer maxEntries
to restrict on number of entries to collect


versionIds

protected List<Integer> versionIds
the list of version ids collected


priorityIds

protected List<Integer> priorityIds
the list of priority ids collected


statusIds

protected List<Integer> statusIds
the list of status ids collected


categoryIds

protected List<Integer> categoryIds
the list of category ids collected


trackerIds

protected List<Integer> trackerIds
the list of tracker ids collected


issues

protected Issue[] issues
the list of issues collected

Constructor Detail

IssuesCollector

public IssuesCollector(org.apache.maven.plugin.logging.Log log,
                       boolean verbose)
Method Detail

collect

public void collect(RedmineService service,
                    IssueCollectorConfiguration config)
             throws RedmineServiceException
Collects the issues given the configuration passed.

Parameters:
service - redmine service to obtain datas
config - the collector configuration
Throws:
RedmineServiceException - if any pb while retreave datas from redmine

getMaxEntries

public Integer getMaxEntries()

getPriorityIds

public List<Integer> getPriorityIds()

getStatusIds

public List<Integer> getStatusIds()

getCategoryIds

public List<Integer> getCategoryIds()

getVersionIds

public List<Integer> getVersionIds()

getTrackerIds

public List<Integer> getTrackerIds()

getIssues

public Issue[] getIssues()

clearFilters

public void clearFilters()
clean all internal states.

Note : this method is invoked at the begin of each collect(org.nuiton.jredmine.RedmineService, org.nuiton.jredmine.plugin.IssueCollectorConfiguration) method.


prepareFilters

protected void prepareFilters(RedmineService service,
                              IssueCollectorConfiguration config)
                       throws RedmineServiceException
Prepare the collector filters due to the given collector configuration.

Parameters:
service - redmine service to obtain datas
config - the collector configuration
Throws:
RedmineServiceException - if any pb whiile retreaving redmine's datas

canIncludeIssue

protected boolean canIncludeIssue(Issue i)
Test if a given issue can be collected.

Parameters:
i - the issue ti test
Returns:
true if the issue can be collected, false otherwise.

toIntegerList

protected List<Integer> toIntegerList(String[] strIds)


Copyright © 2009-2011 CodeLutin. All Rights Reserved.