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 import nl.toolforge.karma.core.vc.cvsimpl.threads.PatchLineThread;
25 import nl.toolforge.karma.core.vc.threads.ParallelRunner;
26
27 /***
28 * A <code>ReleaseManifest</code> is created when the Release Manager collects all stable versions of modules.
29 * Effectively, the latest promoted version of all modules in.
30 *
31 * @author W.H. Schraal
32 * @author D.A. Smedes
33 * @version $Id: ReleaseManifest.java,v 1.20 2004/11/10 23:53:09 asmedes Exp $
34 */
35 public final class ReleaseManifest extends AbstractManifest {
36
37 public ReleaseManifest(WorkingContext context, ManifestStructure structure) throws LocationException {
38 super(context, structure);
39
40
41
42 checkForPatchLines();
43 }
44
45 /***
46 * Checks (in parallel) if modules have a <code>PatchLine</code> associated.
47 */
48 private void checkForPatchLines() {
49 ParallelRunner runner = new ParallelRunner(this, PatchLineThread.class);
50
51 long delay = 100;
52 runner.execute(delay);
53 }
54
55 public String getType() {
56 return Manifest.RELEASE_MANIFEST;
57 }
58
59 /***
60 * <p>Applies the current working context to a module in this release manifest.
61 *
62 * <p>This method also checks if the module is available locally. If so, the module will be matched with the module
63 * on disk to check if they are equal. This is to ensure that a changed manifest-definition is reflected on disk. If
64 * the manifest shows another module (which is in fact determined by its location), the version on disk will be
65 * removed.
66 */
67 protected void applyWorkingContext(WorkingContext context, Module module) {
68
69 module.markDevelopmentLine(false);
70
71 if (!isLocal(module)) {
72
73
74 setState(module, Module.STATIC);
75 }
76 }
77
78 }