KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > fr > jayasoft > ivy > ResolveData


1 /*
2  * This file is subject to the license found in LICENCE.TXT in the root directory of the project.
3  *
4  * #SNAPSHOT#
5  */

6 package fr.jayasoft.ivy;
7
8 import java.io.File JavaDoc;
9 import java.util.Date JavaDoc;
10 import java.util.HashMap JavaDoc;
11 import java.util.Map JavaDoc;
12
13 import fr.jayasoft.ivy.report.ConfigurationResolveReport;
14
15 public class ResolveData {
16     private Map JavaDoc _nodes; // shared map of all nodes: Map (ModuleRevisionId -> IvyNode)
17
private Ivy _ivy;
18     private File JavaDoc _cache;
19     private Date JavaDoc _date;
20     private boolean _validate;
21     private boolean _transitive;
22     private ConfigurationResolveReport _report;
23
24     public ResolveData(ResolveData data, boolean validate) {
25         this(data._ivy, data._cache, data._date, data._report, validate, data._nodes);
26     }
27
28     public ResolveData(Ivy ivy, File JavaDoc cache, Date JavaDoc date, ConfigurationResolveReport report, boolean validate) {
29         this(ivy, cache, date, report, validate, new HashMap JavaDoc());
30     }
31
32     public ResolveData(Ivy ivy, File JavaDoc cache, Date JavaDoc date, ConfigurationResolveReport report, boolean validate, Map JavaDoc nodes) {
33         this(ivy, cache, date, report, validate, true, nodes);
34     }
35     public ResolveData(Ivy ivy, File JavaDoc cache, Date JavaDoc date, ConfigurationResolveReport report, boolean validate, boolean transitive, Map JavaDoc nodes) {
36         _ivy = ivy;
37         _cache = cache;
38         _date = date;
39         _report = report;
40         _validate = validate;
41         _transitive = transitive;
42         _nodes = nodes;
43     }
44
45     public File JavaDoc getCache() {
46         return _cache;
47     }
48     
49
50     public Date JavaDoc getDate() {
51         return _date;
52     }
53     
54
55     public Ivy getIvy() {
56         return _ivy;
57     }
58     
59
60     public Map JavaDoc getNodes() {
61         return _nodes;
62     }
63     
64
65     public ConfigurationResolveReport getReport() {
66         return _report;
67     }
68     
69
70     public boolean isValidate() {
71         return _validate;
72     }
73
74     public IvyNode getNode(ModuleRevisionId mrid) {
75         return (IvyNode)_nodes.get(mrid);
76     }
77
78     public void register(IvyNode node) {
79         _nodes.put(node.getId(), node);
80     }
81
82     public void register(ModuleRevisionId id, IvyNode node) {
83         _nodes.put(id, node);
84     }
85
86     public void setReport(ConfigurationResolveReport report) {
87         _report = report;
88     }
89
90     public boolean isTransitive() {
91         return _transitive;
92     }
93     
94
95     
96 }
97
Popular Tags