View Javadoc
1   package org.apache.maven.shared.release.transform.jdom2;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.util.List;
23  import java.util.Map;
24  
25  import org.apache.maven.model.ReportPlugin;
26  import org.apache.maven.model.ReportSet;
27  import org.apache.maven.shared.release.transform.MavenCoordinate;
28  import org.jdom2.Element;
29  
30  /**
31   * JDOM2 implementation of poms reports PLUGIN element
32   *
33   * @author Robert Scholte
34   * @since 3.0
35   */
36  public class JDomReportPlugin
37      extends ReportPlugin implements MavenCoordinate
38  {
39      private final MavenCoordinate coordinate;
40  
41      /**
42       * <p>Constructor for JDomReportPlugin.</p>
43       *
44       * @param reportPlugin a {@link org.jdom2.Element} object
45       */
46      public JDomReportPlugin( Element reportPlugin )
47      {
48          this.coordinate = new JDomMavenCoordinate( reportPlugin );
49      }
50  
51      @Override
52      public void addReportSet( ReportSet reportSet )
53      {
54          throw new UnsupportedOperationException();
55      }
56  
57      @Override
58      public String getArtifactId()
59      {
60          return coordinate.getArtifactId();
61      }
62  
63      @Override
64      public Object getConfiguration()
65      {
66          throw new UnsupportedOperationException();
67      }
68  
69      @Override
70      public String getGroupId()
71      {
72          return coordinate.getGroupId();
73      }
74  
75      @Override
76      public String getInherited()
77      {
78          throw new UnsupportedOperationException();
79      }
80  
81      @Override
82      public List<ReportSet> getReportSets()
83      {
84          throw new UnsupportedOperationException();
85      }
86  
87      @Override
88      public String getVersion()
89      {
90          return coordinate.getVersion();
91      }
92  
93      @Override
94      public void removeReportSet( ReportSet reportSet )
95      {
96          throw new UnsupportedOperationException();
97      }
98  
99      @Override
100     public void setArtifactId( String artifactId )
101     {
102         throw new UnsupportedOperationException();
103     }
104 
105     @Override
106     public void setConfiguration( Object configuration )
107     {
108         throw new UnsupportedOperationException();
109     }
110 
111     @Override
112     public void setGroupId( String groupId )
113     {
114         throw new UnsupportedOperationException();
115     }
116 
117     @Override
118     public void setInherited( String inherited )
119     {
120         throw new UnsupportedOperationException();
121     }
122 
123     @Override
124     public void setReportSets( List<ReportSet> reportSets )
125     {
126         throw new UnsupportedOperationException();
127     }
128 
129     @Override
130     public void setVersion( String version )
131     {
132         coordinate.setVersion( version );
133     }
134 
135     @Override
136     public void flushReportSetMap()
137     {
138         throw new UnsupportedOperationException();
139     }
140 
141     @Override
142     public Map<String, ReportSet> getReportSetsAsMap()
143     {
144         throw new UnsupportedOperationException();
145     }
146 
147     @Override
148     public String getKey()
149     {
150         throw new UnsupportedOperationException();
151     }
152 
153     @Override
154     public void unsetInheritanceApplied()
155     {
156         throw new UnsupportedOperationException();
157     }
158 
159     @Override
160     public boolean isInheritanceApplied()
161     {
162         throw new UnsupportedOperationException();
163     }
164 
165     @Override
166     public String getName()
167     {
168         return "plugin";
169     }
170 }