View Javadoc

1   /*
2    * Copyright 2008-2013 smartics, Kronseder & Reiner GmbH
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package de.smartics.maven.issues;
17  
18  import java.util.List;
19  
20  import org.apache.maven.reporting.MavenReportException;
21  import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
22  import org.eclipse.mylyn.tasks.core.data.TaskData;
23  
24  /**
25   * Simplifies the access to a remote repository. The facade is agnostic
26   * according to the type of repository.
27   *
28   * @author <a href="mailto:robert.reiner@smartics.de">Robert Reiner</a>
29   * @version $Revision:591 $
30   */
31  public interface RepositoryFacade
32  {
33    // ********************************* Fields *********************************
34  
35    // --- constants ------------------------------------------------------------
36  
37    // ****************************** Initializer *******************************
38  
39    // ****************************** Inner Classes *****************************
40  
41    // ********************************* Methods ********************************
42  
43    // --- get&set --------------------------------------------------------------
44  
45    /**
46     * Returns the connector used by this facade.
47     *
48     * @return the connector used by this facade.
49     */
50    AbstractRepositoryConnector getConnector();
51  
52    // --- business -------------------------------------------------------------
53  
54    /**
55     * Runs the query and returns the matching issues.
56     *
57     * @param queryData the query information.
58     * @return the matching tasks.
59     * @throws MavenReportException if a problem is encountered while fetching the
60     *           tasks.
61     * @todo throw another exception...
62     */
63    List<TaskData> queryTasks(QueryData queryData) throws MavenReportException;
64  
65    // --- object basics --------------------------------------------------------
66  
67  }