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   * Root element of the <code>lifecycle.xml</code> file.
23   *
24   * @version $Revision$ $Date$
25   */
26  @SuppressWarnings("all")
27  public class LifecycleConfiguration implements java.io.Serializable {
28  
29      // --------------------------/
30      // - Class/Member Variables -/
31      // --------------------------/
32  
33      /**
34       * Field lifecycles.
35       */
36      private java.util.List<Lifecycle> lifecycles;
37  
38      /**
39       * Field modelEncoding.
40       */
41      private String modelEncoding = "UTF-8";
42  
43      // -----------/
44      // - Methods -/
45      // -----------/
46  
47      /**
48       * Method addLifecycle.
49       *
50       * @param lifecycle a lifecycle object.
51       */
52      public void addLifecycle(Lifecycle lifecycle) {
53          getLifecycles().add(lifecycle);
54      } // -- void addLifecycle( Lifecycle )
55  
56      /**
57       * Method getLifecycles.
58       *
59       * @return List
60       */
61      public java.util.List<Lifecycle> getLifecycles() {
62          if (this.lifecycles == null) {
63              this.lifecycles = new java.util.ArrayList<Lifecycle>();
64          }
65  
66          return this.lifecycles;
67      } // -- java.util.List<Lifecycle> getLifecycles()
68  
69      /**
70       * Get the modelEncoding field.
71       *
72       * @return String
73       */
74      public String getModelEncoding() {
75          return this.modelEncoding;
76      } // -- String getModelEncoding()
77  
78      /**
79       * Method removeLifecycle.
80       *
81       * @param lifecycle a lifecycle object.
82       */
83      public void removeLifecycle(Lifecycle lifecycle) {
84          getLifecycles().remove(lifecycle);
85      } // -- void removeLifecycle( Lifecycle )
86  
87      /**
88       * Set the lifecycles field.
89       *
90       * @param lifecycles a lifecycles object.
91       */
92      public void setLifecycles(java.util.List<Lifecycle> lifecycles) {
93          this.lifecycles = lifecycles;
94      } // -- void setLifecycles( java.util.List )
95  
96      /**
97       * Set the modelEncoding field.
98       *
99       * @param modelEncoding a modelEncoding object.
100      */
101     public void setModelEncoding(String modelEncoding) {
102         this.modelEncoding = modelEncoding;
103     } // -- void setModelEncoding( String )
104 }