KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > maven > plugin > registry > RuntimeInfo


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

20
21 public class RuntimeInfo
22 {
23
24     private File JavaDoc file;
25
26     private String JavaDoc autoUpdateSourceLevel;
27
28     private String JavaDoc updateIntervalSourceLevel;
29
30     private final PluginRegistry registry;
31
32     public RuntimeInfo( PluginRegistry registry )
33     {
34         this.registry = registry;
35     }
36
37     public String JavaDoc getAutoUpdateSourceLevel()
38     {
39         if ( autoUpdateSourceLevel == null )
40         {
41             return registry.getSourceLevel();
42         }
43         else
44         {
45             return autoUpdateSourceLevel;
46         }
47     }
48
49     public void setAutoUpdateSourceLevel( String JavaDoc autoUpdateSourceLevel )
50     {
51         this.autoUpdateSourceLevel = autoUpdateSourceLevel;
52     }
53
54     public File JavaDoc getFile()
55     {
56         return file;
57     }
58
59     public void setFile( File JavaDoc file )
60     {
61         this.file = file;
62     }
63
64     public String JavaDoc getUpdateIntervalSourceLevel()
65     {
66         if ( updateIntervalSourceLevel == null )
67         {
68             return registry.getSourceLevel();
69         }
70         else
71         {
72             return updateIntervalSourceLevel;
73         }
74     }
75
76     public void setUpdateIntervalSourceLevel( String JavaDoc updateIntervalSourceLevel )
77     {
78         this.updateIntervalSourceLevel = updateIntervalSourceLevel;
79     }
80
81 }
82
Popular Tags