KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > core > model > ImportModel


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.update.core.model;
12
13 /**
14  * Plug-in dependency model object.
15  * <p>
16  * This class may be instantiated or subclassed by clients. However, in most
17  * cases clients should instead instantiate or subclass the provided
18  * concrete implementation of this model.
19  * </p>
20  * <p>
21  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
22  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
23  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
24  * (repeatedly) as the API evolves.
25  * </p>
26  * @see org.eclipse.update.core.Import
27  * @since 2.0
28  */

29 public class ImportModel extends ModelObject {
30
31     private String JavaDoc id;
32     private String JavaDoc version;
33     private String JavaDoc matchingIdRuleName;
34     private String JavaDoc matchingRuleName;
35     private boolean featureImport;
36     private boolean patch;
37     private String JavaDoc osArch;
38     private String JavaDoc ws;
39     private String JavaDoc os;
40     private String JavaDoc nl;
41
42     /**
43      * Creates a uninitialized plug-in dependency model object.
44      *
45      * @since 2.0
46      */

47     public ImportModel() {
48         super();
49     }
50
51     /**
52      * Returns the dependent plug-in identifier.
53      *
54      * @deprecated use getIdentifier() instead
55      * @return plug-in identifier, or <code>null</code>.
56      * @since 2.0
57      */

58     public String JavaDoc getPluginIdentifier() {
59         return id;
60     }
61
62     /**
63      * Returns the dependent identifier.
64      *
65      * @return identifier, or <code>null</code>.
66      * @since 2.0.2
67      */

68     public String JavaDoc getIdentifier() {
69         return id;
70     }
71
72     /**
73      * Returns the dependent plug-in version.
74      *
75      * @deprecated use getVersion() instead
76      * @return plug-in version, or <code>null</code>.
77      * @since 2.0
78      */

79     public String JavaDoc getPluginVersion() {
80         return version;
81     }
82
83     /**
84      * Returns the dependent version.
85      *
86      * @return version, or <code>null</code>.
87      * @since 2.0.2
88      */

89     public String JavaDoc getVersion() {
90         return version;
91     }
92     
93     /**
94      * Returns the dependent version matching rule name.
95      *
96      * @return matching rule name, or <code>null</code>.
97      * @since 2.0
98      */

99     public String JavaDoc getMatchingRuleName() {
100         return matchingRuleName;
101     }
102     
103     /**
104      * Returns the dependent id matching rule name.
105      *
106      * @return matching rule name, or <code>null</code>.
107      * @since 2.1
108      */

109     public String JavaDoc getMatchingIdRuleName() {
110         return matchingIdRuleName;
111     }
112
113     /**
114      * Sets the dependent plug-in identifier.
115      * Throws a runtime exception if this object is marked read-only.
116      *
117      * @deprecated use setIdentifier()
118      * @param pluginId dependent plug-in identifier
119      * @since 2.0
120      */

121     public void setPluginIdentifier(String JavaDoc pluginId) {
122         assertIsWriteable();
123         this.id = pluginId;
124     }
125
126     /**
127      * Sets the dependent plug-in version.
128      * Throws a runtime exception if this object is marked read-only.
129      *
130      * @deprecated use setVersion()
131      * @param pluginVersion dependent plug-in version
132      * @since 2.0
133      */

134     public void setPluginVersion(String JavaDoc pluginVersion) {
135         assertIsWriteable();
136         this.version = pluginVersion;
137     }
138
139     /**
140      * Sets the dependent identifier.
141      * Throws a runtime exception if this object is marked read-only.
142      *
143      * @param id dependent identifier
144      * @since 2.0.2
145      */

146     public void setIdentifier(String JavaDoc id) {
147         assertIsWriteable();
148         this.id = id;
149     }
150
151     /**
152      * Sets the dependent version.
153      * Throws a runtime exception if this object is marked read-only.
154      *
155      * @param version dependent version
156      * @since 2.0.2
157      */

158     public void setVersion(String JavaDoc version) {
159         assertIsWriteable();
160         this.version = version;
161     }
162     
163     /**
164      * Sets the dependent version matching rule name.
165      * Throws a runtime exception if this object is marked read-only.
166      *
167      * @param matchingRuleName dependent version matching rule.
168      * @since 2.0
169      */

170     public void setMatchingRuleName(String JavaDoc matchingRuleName) {
171         assertIsWriteable();
172         this.matchingRuleName = matchingRuleName;
173     }
174     /**
175      * Sets the dependent id matching rule name.
176      * Throws a runtime exception if this object is marked read-only.
177      *
178      * @param matchingIdRuleName dependent id matching rule.
179      * @since 2.1
180      */

181     public void setMatchingIdRuleName(String JavaDoc matchingIdRuleName) {
182         assertIsWriteable();
183         this.matchingIdRuleName = matchingIdRuleName;
184     }
185     /**
186      * Returns the isFeatureImport.
187      * @return boolean
188      */

189     public boolean isFeatureImport() {
190         return featureImport;
191     }
192     
193     /**
194      * Sets the featureImport.
195      * @param featureImport The featureImport to set
196      */

197     public void setFeatureImport(boolean featureImport) {
198         this.featureImport = featureImport;
199     }
200     
201     /**
202      * Returns the patch mode.
203      */

204     public boolean isPatch() {
205         return patch;
206     }
207     
208     /**
209      * Sets the patch mode.
210      */

211     public void setPatch(boolean patch) {
212         this.patch = patch;
213     }
214     /**
215      * Returns the os.
216      * @return String
217      */

218     public String JavaDoc getOS() {
219         return os;
220     }
221
222     /**
223      * Returns the osArch.
224      * @return String
225      */

226     public String JavaDoc getOSArch() {
227         return osArch;
228     }
229
230     /**
231      * Returns the ws.
232      * @return String
233      */

234     public String JavaDoc getWS() {
235         return ws;
236     }
237
238     /**
239      * Sets the os.
240      * @param os The os to set
241      */

242     public void setOS(String JavaDoc os) {
243         this.os = os;
244     }
245
246     /**
247      * Sets the osArch.
248      * @param osArch The osArch to set
249      */

250     public void setOSArch(String JavaDoc osArch) {
251         this.osArch = osArch;
252     }
253
254     /**
255      * Sets the ws.
256      * @param ws The ws to set
257      */

258     public void setWS(String JavaDoc ws) {
259         this.ws = ws;
260     }
261
262     /**
263      * Returns the nl.
264      * @return String
265      */

266     public String JavaDoc getNL() {
267         return nl;
268     }
269
270     /**
271      * Sets the nl.
272      * @param nl The nl to set
273      */

274     public void setNL(String JavaDoc nl) {
275         this.nl = nl;
276     }
277
278 }
279
Popular Tags