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.api.plugin.testing.stubs;
20  
21  import java.util.Collections;
22  import java.util.List;
23  import java.util.Map;
24  
25  import org.apache.maven.api.Artifact;
26  import org.apache.maven.api.Dependency;
27  import org.apache.maven.api.Plugin;
28  import org.apache.maven.api.plugin.descriptor.PluginDescriptor;
29  import org.apache.maven.api.plugin.descriptor.lifecycle.Lifecycle;
30  
31  public class PluginStub implements Plugin {
32  
33      org.apache.maven.api.model.Plugin model;
34      PluginDescriptor descriptor;
35      List<Lifecycle> lifecycles = Collections.emptyList();
36      ClassLoader classLoader;
37      Artifact artifact;
38      List<Dependency> dependencies = Collections.emptyList();
39      Map<String, Dependency> dependenciesMap = Collections.emptyMap();
40  
41      @Override
42      public org.apache.maven.api.model.Plugin getModel() {
43          return model;
44      }
45  
46      public void setModel(org.apache.maven.api.model.Plugin model) {
47          this.model = model;
48      }
49  
50      @Override
51      public PluginDescriptor getDescriptor() {
52          return descriptor;
53      }
54  
55      public void setDescriptor(PluginDescriptor descriptor) {
56          this.descriptor = descriptor;
57      }
58  
59      @Override
60      public List<Lifecycle> getLifecycles() {
61          return lifecycles;
62      }
63  
64      public void setLifecycles(List<Lifecycle> lifecycles) {
65          this.lifecycles = lifecycles;
66      }
67  
68      @Override
69      public ClassLoader getClassLoader() {
70          return classLoader;
71      }
72  
73      public void setClassLoader(ClassLoader classLoader) {
74          this.classLoader = classLoader;
75      }
76  
77      @Override
78      public Artifact getArtifact() {
79          return artifact;
80      }
81  
82      public void setArtifact(Artifact artifact) {
83          this.artifact = artifact;
84      }
85  
86      @Override
87      public List<Dependency> getDependencies() {
88          return dependencies;
89      }
90  
91      public void setDependencies(List<Dependency> dependencies) {
92          this.dependencies = dependencies;
93      }
94  
95      public Map<String, Dependency> getDependenciesMap() {
96          return dependenciesMap;
97      }
98  
99      public void setDependenciesMap(Map<String, Dependency> dependenciesMap) {
100         this.dependenciesMap = dependenciesMap;
101     }
102 }