View Javadoc

1   package org.apache.maven.plugin.javadoc.stubs;
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 org.apache.maven.artifact.handler.ArtifactHandler;
23  import org.apache.maven.artifact.versioning.VersionRange;
24  import org.apache.maven.plugin.testing.stubs.ArtifactStub;
25  
26  /**
27   * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
28   * @version $Id: JavadocPluginArtifactStub.html 867202 2013-06-24 11:56:53Z olamy $
29   */
30  public class JavadocPluginArtifactStub
31      extends ArtifactStub
32  {
33      private String groupId;
34  
35      private String artifactId;
36  
37      private String version;
38  
39      private String packaging;
40  
41      private String baseVersion;
42  
43      private VersionRange versionRange;
44  
45      private ArtifactHandler handler;
46  
47      public JavadocPluginArtifactStub( String groupId, String artifactId, String version, String packaging )
48      {
49          this.groupId = groupId;
50          this.artifactId = artifactId;
51          this.version = version;
52          this.packaging = packaging;
53          versionRange = VersionRange.createFromVersion( version );
54      }
55  
56      /** {@inheritDoc} */
57      public void setGroupId( String groupId )
58      {
59          this.groupId = groupId;
60      }
61  
62      /** {@inheritDoc} */
63      public String getGroupId()
64      {
65          return groupId;
66      }
67  
68      /** {@inheritDoc} */
69      public void setArtifactId( String artifactId )
70      {
71          this.artifactId = artifactId;
72      }
73  
74      /** {@inheritDoc} */
75      public String getArtifactId()
76      {
77          return artifactId;
78      }
79  
80      /** {@inheritDoc} */
81      public void setVersion( String version )
82      {
83          this.version = version;
84      }
85  
86      /** {@inheritDoc} */
87      public String getVersion()
88      {
89          return version;
90      }
91  
92      /**
93       * @param packaging
94       */
95      public void setPackaging( String packaging )
96      {
97          this.packaging = packaging;
98      }
99  
100     /**
101      * @return
102      */
103     public String getPackaging()
104     {
105         return packaging;
106     }
107 
108     /** {@inheritDoc} */
109     public VersionRange getVersionRange()
110     {
111         return versionRange;
112     }
113 
114     /** {@inheritDoc} */
115     public void setVersionRange( VersionRange versionRange )
116     {
117         this.versionRange = versionRange;
118     }
119 
120     /** {@inheritDoc} */
121     public ArtifactHandler getArtifactHandler()
122     {
123         return handler;
124     }
125 
126     /** {@inheritDoc} */
127     public void setArtifactHandler( ArtifactHandler handler )
128     {
129         this.handler = handler;
130     }
131 
132     /** {@inheritDoc} */
133     public String getBaseVersion()
134     {
135         return baseVersion;
136     }
137 
138     /** {@inheritDoc} */
139     public void setBaseVersion( String string )
140     {
141         this.baseVersion = string;
142     }
143 }