View Javadoc

1   /*
2   Karma core - Core of the Karma application
3   Copyright (C) 2004  Toolforge <www.toolforge.nl>
4   
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9   
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  Lesser General Public License for more details.
14  
15  You should have received a copy of the GNU Lesser General Public
16  License along with this library; if not, write to the Free Software
17  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18  */
19  package nl.toolforge.karma.core.manifest;
20  
21  import nl.toolforge.karma.core.module.Module;
22  
23  import java.io.File;
24  import java.util.Collection;
25  import java.util.Map;
26  
27  /***
28   * @author D.A. Smedes
29   * @version $Id: Manifest.java,v 1.28 2004/11/10 23:53:09 asmedes Exp $
30   */
31  public interface Manifest {
32  
33    public static final String DEVELOPMENT_MANIFEST = "development";
34    public static final String RELEASE_MANIFEST = "release";
35  
36    public static final String HISTORY_KEY = "manifest.history.last";
37  
38    /***
39     * @see AbstractManifest for the time being
40     *
41     * @return
42     */
43    public String getName();
44  
45    /***
46     * @see AbstractManifest for the time being
47     *
48     * @return
49     */
50    public String getVersion();
51  
52    /***
53     * @see AbstractManifest for the time being
54     *
55     * @return
56     */
57    public Map getAllModules();
58  
59    /***
60     * The base location of the manifest within the current working context. This location is used extensively by Karma
61     * as the base directory to checkout projects and build modules.
62     *
63     * @return A <code>File</code> reference to the manifest base directory.
64     */
65    public File getBaseDirectory();
66  
67    /***
68     * The <code>build</code> default child directory of the {@link #getBaseDirectory}. This location stores a
69     * manifests' build output.
70     *
71     * @return The <code>build</code> default child directory of the {@link #getBaseDirectory}.
72     */
73    public File getBuildBaseDirectory();
74  
75    /***
76     * The <code>reports</code> default child directory of the {@link #getBaseDirectory}. This location stores
77     * the output of commands that generate reports.
78     *
79     * @return The <code>reports</code> default child directory of the {@link #getBaseDirectory}.
80     */
81    public File getReportsBaseDirectory();
82  
83    /***
84     * The <code>modules</code> default child directory of the {@link #getBaseDirectory}. This location stores a
85     * manifests' modules.
86     *
87     * @return The <code>modules</code> default child directory of the {@link #getBaseDirectory}.
88     */
89    public File getModuleBaseDirectory();
90  
91    /***
92     * The base location of a temp directory the manifest within the current working context. This location is used
93     * extensively by Karma as a temporary location and should not be removed for as long as the manifest has a presence
94     * on disk.
95     *
96     * @return A <code>File</code> reference to the <code>{@link #getBaseDirectory()} + "/tmp"</code>
97     */
98    public File getTempDirectory();
99  
100   public void setState(Module module, Module.State state);
101 
102   public boolean isLocal(Module module);
103 
104   public Module.State getState(Module module);
105 
106 
107   /***
108    * @see AbstractManifest for the time being
109    *
110    * @return
111    */
112 //  public String resolveArchiveName(Module module) throws ManifestException;
113 
114   /***
115    * @see AbstractManifest for the time being
116    *
117    * @return
118    */
119   public Module getModule(String moduleName) throws ManifestException;
120 
121   /***
122    * @see AbstractManifest for the time being
123    *
124    * @return
125    */
126   public Collection getModuleInterdependencies(Module module) throws ManifestException;
127 
128   /***
129    * @see AbstractManifest for the time being
130    *
131    * @return
132    */
133   public Map getInterdependencies() throws ManifestException;
134 
135 
136   /***
137    * Returns a collection containing all of a manifests' included manifests.
138    *
139    * @return Collection with Manifest instances.
140    */
141   public Collection getIncludes();
142 
143   public String getType();
144 }