de.smartics.maven.issues.repository
Class AbstractRepositoryFacade

Package class diagram package AbstractRepositoryFacade
java.lang.Object
  extended by de.smartics.maven.issues.repository.AbstractRepositoryFacade
All Implemented Interfaces:
RepositoryFacade
Direct Known Subclasses:
BugzillaRepositoryFacade

public abstract class AbstractRepositoryFacade
     
     
extends Object
implements RepositoryFacade

Base implementation of the RepositoryFacade interface.

Author:
Robert Reiner

Field Summary
protected  IssueManagementConfig config
          The configuration for the issue management connection.
protected  org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector connector
          The connector to use to connect to the remote issue management system.
protected  org.eclipse.mylyn.tasks.core.TaskRepository repository
          The reference to the repository.
 
Constructor Summary
protected AbstractRepositoryFacade(IssueManagementConfig config, org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector connector)
          Default constructor.
 
Method Summary
protected abstract  org.eclipse.mylyn.tasks.core.IRepositoryQuery constructQuery(QueryData queryData)
          Constructs the query upon the queryData.
protected  org.eclipse.mylyn.tasks.core.sync.ISynchronizationSession createSession()
          Returns a session.
 org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector getConnector()
          Returns the connector used by this facade.
protected abstract  boolean isLogoutProblem(org.eclipse.core.runtime.IStatus status)
          Checks if the status signals a logout problem.
 List<org.eclipse.mylyn.tasks.core.data.TaskData> queryTasks(QueryData queryData)
          Runs the query and returns the matching issues.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

config

protected final IssueManagementConfig config
The configuration for the issue management connection.


connector

protected final org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector connector
The connector to use to connect to the remote issue management system.


repository

protected org.eclipse.mylyn.tasks.core.TaskRepository repository
The reference to the repository.

Constructor Detail

AbstractRepositoryFacade

protected AbstractRepositoryFacade(IssueManagementConfig config,
                                   org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector connector)
Default constructor.

Parameters:
config - the configuration for the issue management connection.
connector - the connector to use to connect to the remote issue management system.
Method Detail

getConnector

public org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector getConnector()
Returns the connector used by this facade.

Specified by:
getConnector in interface RepositoryFacade
Returns:
the connector used by this facade.

queryTasks

public List<org.eclipse.mylyn.tasks.core.data.TaskData> queryTasks(QueryData queryData)
                                                            throws MavenReportException
Runs the query and returns the matching issues.

Specified by:
queryTasks in interface RepositoryFacade
Parameters:
queryData - the query information.
Returns:
the matching tasks.
Throws:
MavenReportException - if a problem is encountered while fetching the tasks.
See Also:
RepositoryFacade.queryTasks(QueryData)

isLogoutProblem

protected abstract boolean isLogoutProblem(org.eclipse.core.runtime.IStatus status)
Checks if the status signals a logout problem. Logout problems may be treated differently depending on the configuration. Subclasses are responsible to check if the status is reporting a logout problem or not.

Parameters:
status - the status returned from the issue management system.
Returns:
true if this is a logout problem, false otherwise. If unsure, subclasses should return false.

createSession

protected org.eclipse.mylyn.tasks.core.sync.ISynchronizationSession createSession()
Returns a session.

Returns:
null since sessions are not necessary to run the query, but may be relevant to subclasses.

constructQuery

protected abstract org.eclipse.mylyn.tasks.core.IRepositoryQuery constructQuery(QueryData queryData)
                                                                         throws MavenReportException
Constructs the query upon the queryData. Since the query is dependent on the issue management system in use, this method is to be implemented by subclasses.

Parameters:
queryData - the issue management independent representation of the query.
Returns:
the query to execute to fetch the specified task data.
Throws:
MavenReportException - if the query data is invalid to create a issue management specific query.


Copyright © 2008-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.