KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > lifecycle > Lifecycle


1 package org.apache.maven.lifecycle;
2
3 /*
4  * Copyright 2001-2005 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * 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, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */

18
19 import java.util.ArrayList JavaDoc;
20 import java.util.List JavaDoc;
21 import java.util.Map JavaDoc;
22
23 /**
24  * Class Lifecycle.
25  */

26 public class Lifecycle
27 {
28     /**
29      * Field id
30      */

31     private String JavaDoc id;
32
33     /**
34      * Field phases
35      */

36     private List JavaDoc phases;
37
38     /**
39      * default phases.
40      */

41     private Map JavaDoc defaultPhases;
42
43     /**
44      * Method addPhase
45      *
46      * @param phase
47      */

48     public void addPhase( String JavaDoc phase )
49     {
50         getPhases().add( phase );
51     } //-- void addPhase(Phase)
52

53     /**
54      * Method getId
55      */

56     public String JavaDoc getId()
57     {
58         return this.id;
59     } //-- String getId()
60

61     /**
62      * Method getPhases
63      */

64     public List JavaDoc getPhases()
65     {
66         if ( this.phases == null )
67         {
68             this.phases = new ArrayList JavaDoc();
69         }
70
71         return this.phases;
72     } //-- java.util.List getPhases()
73

74     /**
75      * Method setId
76      *
77      * @param id
78      */

79     public void setId( String JavaDoc id )
80     {
81         this.id = id;
82     } //-- void setId(String)
83

84     /**
85      * Method setPhases
86      *
87      * @param phases
88      */

89     public void setPhases( List JavaDoc phases )
90     {
91         this.phases = phases;
92     } //-- void setPhases(java.util.List)
93

94     public Map JavaDoc getDefaultPhases()
95     {
96         return defaultPhases;
97     }
98 }
99
Popular Tags