1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 package nl.toolforge.karma.core.manifest;
20
21 import nl.toolforge.karma.core.boot.WorkingContext;
22 import nl.toolforge.karma.core.location.LocationException;
23 import nl.toolforge.karma.core.module.Module;
24
25 /***
26 * @author D.A. Smedes
27 * @version $Id: DevelopmentManifest.java,v 1.16 2004/11/10 22:25:10 hippe Exp $
28 */
29 public final class DevelopmentManifest extends AbstractManifest {
30
31 public String getType() {
32 return Manifest.DEVELOPMENT_MANIFEST;
33 }
34
35 public DevelopmentManifest(WorkingContext workingContext, String name) throws ManifestException, LocationException {
36 super(workingContext, name);
37 }
38
39 public DevelopmentManifest(WorkingContext context, ManifestStructure structure) throws LocationException {
40 super(context, structure);
41 }
42
43 /***
44 * <p>Applies the current working context to a module in this release manifest.
45 *
46 * <p>This method also checks if the module is available locally. If so, the module will be matched with the module
47 * on disk to check if they are equal. This is to ensure that a changed manifest-definition is reflected on disk. If
48 * the manifest shows another module (which is in fact determined by its location), the version on disk will be
49 * removed.
50 */
51 protected void applyWorkingContext(WorkingContext context, Module module) {
52
53 if (module.hasVersion()) {
54 setState(module, Module.STATIC);
55 } else {
56 if (isLocal(module)) {
57 setState(module, getState(module));
58 } else {
59 setState(module, Module.DYNAMIC);
60 }
61 }
62 }
63
64 }