View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one
3    * or more contributor license agreements.  See the NOTICE file
4    * distributed with this work for additional information
5    * regarding copyright ownership.  The ASF licenses this file
6    * to you under the Apache License, Version 2.0 (the
7    * "License"); you may not use this file except in compliance
8    * with the License.  You may obtain a copy of the License at
9    *
10   *   http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing,
13   * software distributed under the License is distributed on an
14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15   * KIND, either express or implied.  See the License for the
16   * specific language governing permissions and limitations
17   * under the License.
18   */
19  package org.apache.maven.plugins.changes.issues;
20  
21  import java.util.Map;
22  
23  import org.apache.maven.plugin.MojoExecutionException;
24  import org.apache.maven.plugins.changes.IssueType;
25  
26  /**
27   * An interface for issue management systems.
28   * <p>
29   * The plan is to enhance this interface to allow communication with different issue management systems in a consistent
30   * way.
31   *
32   * @version $Id$
33   */
34  public interface IssueManagementSystem {
35  
36      /**
37       * Get a mapping of issue types used in this issue management system to the ones used in a changes.xml file.
38       *
39       * @return The map from keys used in poms and other config files to issue types.
40       */
41      Map<String, IssueType> getIssueTypeMap();
42  
43      /**
44       * Get the name of the issue management system.
45       *
46       * @return The name of the IMS.
47       */
48      String getName();
49  
50      /**
51       * Configure this issue management system.
52       *
53       * @param issueTypes The mapping of issue types used in this issue management system to the ones used in a
54       *            changes.xml file
55       * @throws MojoExecutionException If the configuration fails
56       */
57      void applyConfiguration(Map<String, String> issueTypes) throws MojoExecutionException;
58  }