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  /**
19   * Interface for factories creating facades to access remote issue management
20   * systems.
21   *
22   * @author <a href="mailto:robert.reiner@smartics.de">Robert Reiner</a>
23   * @version $Revision:591 $
24   */
25  public interface RepositoryFacadeFactory
26  {
27    // ********************************* Fields *********************************
28  
29    // --- constants ------------------------------------------------------------
30  
31    // ****************************** Initializer *******************************
32  
33    // ****************************** Inner Classes *****************************
34  
35    // ********************************* Methods ********************************
36  
37    // --- get&set --------------------------------------------------------------
38  
39    // --- business -------------------------------------------------------------
40  
41    /**
42     * Checks if the factory supports the creation of a facade for the given issue
43     * management ID.
44     *
45     * @param issueManagementId the identifier provided in the Maven POM to
46     *          identify the issue management system.
47     * @return <code>true</code> if the issue management system specified by the
48     *         given <code>issueManagementId</code> is supported by this factory,
49     *         <code>false</code> otherwise.
50     */
51    boolean supports(String issueManagementId);
52  
53    /**
54     * Creates a facade to access an issue management system with the given
55     * identifier.
56     *
57     * @param config the configuration to initialize the facade to access a
58     *          certain issue management system. It specifies in addition to other
59     *          vital information the identifier provided in the Maven POM.
60     * @return the created facade.
61     * @throws IllegalArgumentException if the factory cannot create a facade for
62     *           the issue management system specified by the given Configuration
63     *           <code>config</code>.
64     */
65    RepositoryFacade create(IssueManagementConfig config)
66      throws IllegalArgumentException;
67  
68    // --- object basics --------------------------------------------------------
69  
70  }