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.plugin.lifecycle;
20  
21  /**
22   * A set of goals to execute.
23   *
24   * @version $Revision$ $Date$
25   */
26  @SuppressWarnings("all")
27  public class Execution implements java.io.Serializable {
28  
29      // --------------------------/
30      // - Class/Member Variables -/
31      // --------------------------/
32  
33      /**
34       * Configuration to pass to the goals.
35       */
36      private Object configuration;
37  
38      /**
39       * Field goals.
40       */
41      private java.util.List<String> goals;
42  
43      // -----------/
44      // - Methods -/
45      // -----------/
46  
47      /**
48       * Method addGoal.
49       *
50       * @param string a string object.
51       */
52      public void addGoal(String string) {
53          getGoals().add(string);
54      } // -- void addGoal( String )
55  
56      /**
57       * Get configuration to pass to the goals.
58       *
59       * @return Object
60       */
61      public Object getConfiguration() {
62          return this.configuration;
63      } // -- Object getConfiguration()
64  
65      /**
66       * Method getGoals.
67       *
68       * @return List
69       */
70      public java.util.List<String> getGoals() {
71          if (this.goals == null) {
72              this.goals = new java.util.ArrayList<String>();
73          }
74  
75          return this.goals;
76      } // -- java.util.List<String> getGoals()
77  
78      /**
79       * Method removeGoal.
80       *
81       * @param string a string object.
82       */
83      public void removeGoal(String string) {
84          getGoals().remove(string);
85      } // -- void removeGoal( String )
86  
87      /**
88       * Set configuration to pass to the goals.
89       *
90       * @param configuration a configuration object.
91       */
92      public void setConfiguration(Object configuration) {
93          this.configuration = configuration;
94      } // -- void setConfiguration( Object )
95  
96      /**
97       * Set the goals to execute.
98       *
99       * @param goals a goals object.
100      */
101     public void setGoals(java.util.List<String> goals) {
102         this.goals = goals;
103     } // -- void setGoals( java.util.List )
104 }