KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mockobjects > vaj > MockType


1 package com.mockobjects.vaj;
2
3 import com.ibm.ivj.util.base.*;
4 import com.ibm.ivj.util.builders.*;
5 import com.ibm.ivj.util.base.Package;
6 import com.mockobjects.*;
7
8 import java.util.*;
9
10 public class MockType extends MockObject implements Type {
11     private String JavaDoc myTypeName;
12     private Package JavaDoc myPkg;
13     private ArrayList myEditions = new ArrayList();
14     private boolean myHasSourceCode;
15
16
17     public MockType(String JavaDoc name) {
18         super();
19         myTypeName = name;
20     }
21
22     /**
23      * clearToolRepositoryData method comment.
24      */

25     public void clearToolRepositoryData(String JavaDoc arg1) throws IvjException {}
26
27     /**
28      * clearToolWorkspaceData method comment.
29      */

30     public void clearToolWorkspaceData(String JavaDoc arg1) throws IvjException {}
31
32     /**
33      * createNewEdition method comment.
34      */

35     public void createNewEdition() throws IvjException {}
36
37     /**
38      * createVersion method comment.
39      */

40     public void createVersion(String JavaDoc arg1) throws IvjException {}
41
42     /**
43      * createVersion method comment.
44      */

45     public void createVersion(String JavaDoc arg1, boolean arg2) throws IvjException {}
46
47     /**
48      * delete method comment.
49      */

50     public void delete() throws IvjException {}
51
52     public TypeEdition[] getAllEditions() throws IvjException {
53         TypeEdition[] result = new TypeEdition[myEditions.size()];
54         myEditions.toArray(result);
55         return result;
56     }
57
58     /**
59      * getAllSubtypes method comment.
60      */

61     public com.ibm.ivj.util.base.Type[] getAllSubtypes() {
62         return null;
63     }
64
65     /**
66      * getDeveloperName method comment.
67      */

68     public String JavaDoc getDeveloperName() throws IvjException {
69         return null;
70     }
71
72     /**
73      * getEdition method comment.
74      */

75     public TypeEdition getEdition() throws IvjException {
76         return null;
77     }
78
79     /**
80      * getName method comment.
81      */

82     public String JavaDoc getName() {
83         return myTypeName;
84     }
85
86     /**
87      * getOwnerName method comment.
88      */

89     public String JavaDoc getOwnerName() throws IvjException {
90         return null;
91     }
92
93     /**
94      * getPackage method comment.
95      */

96     public com.ibm.ivj.util.base.Package getPackage() throws IvjException {
97         return myPkg;
98     }
99
100     /**
101      * getProject method comment.
102      */

103     public Project getProject() throws IvjException {
104         return myPkg.getProject();
105     }
106
107     /**
108      * getQualifiedName method comment.
109      */

110     public String JavaDoc getQualifiedName() {
111         return myPkg.getName()+"."+myTypeName;
112     }
113
114     /**
115      * getToolRepositoryData method comment.
116      */

117     public ToolData getToolRepositoryData(String JavaDoc arg1) throws java.io.IOException JavaDoc, java.io.StreamCorruptedException JavaDoc, IvjException, ClassNotFoundException JavaDoc, java.io.OptionalDataException JavaDoc {
118         return null;
119     }
120
121     /**
122      * getToolWorkspaceData method comment.
123      */

124     public ToolData getToolWorkspaceData(String JavaDoc arg1) throws java.io.IOException JavaDoc, java.io.StreamCorruptedException JavaDoc, IvjException, ClassNotFoundException JavaDoc, java.io.OptionalDataException JavaDoc {
125         return null;
126     }
127
128     /**
129      * getVersionName method comment.
130      */

131     public String JavaDoc getVersionName() throws IvjException {
132         return null;
133     }
134
135     /**
136      * getVersionStamp method comment.
137      */

138     public java.util.Date JavaDoc getVersionStamp() throws IvjException {
139         return null;
140     }
141
142     public boolean hasError() {
143         notImplemented();
144         return false;
145     }
146
147     public boolean hasSourceCode() {
148         return myHasSourceCode;
149     }
150
151     /**
152      * isApplet method comment.
153      */

154     public boolean isApplet() throws IvjException {
155         return false;
156     }
157
158     /**
159      * isApplication method comment.
160      */

161     public boolean isApplication() throws IvjException {
162         return false;
163     }
164
165     /**
166      * isClass method comment.
167      */

168     public boolean isClass() throws IvjException {
169         return true;
170     }
171
172     /**
173      * isEdition method comment.
174      */

175     public boolean isEdition() throws IvjException {
176         return true;
177     }
178
179     /**
180      * isInDefaultPackage method comment.
181      */

182     public boolean isInDefaultPackage() {
183         return false;
184     }
185
186     /**
187      * isInterface method comment.
188      */

189     public boolean isInterface() throws IvjException {
190         return false;
191     }
192
193     /**
194      * isPackage method comment.
195      */

196     public boolean isPackage() {
197         return false;
198     }
199
200     /**
201      * isProject method comment.
202      */

203     public boolean isProject() {
204         return false;
205     }
206
207     /**
208      * isReleased method comment.
209      */

210     public boolean isReleased() throws IvjException {
211         return false;
212     }
213
214     /**
215      * isType method comment.
216      */

217     public boolean isType() {
218         return false;
219     }
220
221     /**
222      * isVersion method comment.
223      */

224     public boolean isVersion() throws IvjException {
225         return false;
226     }
227
228     /**
229      * openBrowser method comment.
230      */

231     public void openBrowser() throws IvjException {}
232
233     /**
234      * release method comment.
235      */

236     public void release() throws IvjException {}
237
238     public void setHasSourceCode(boolean hasSourceCode) {
239         myHasSourceCode = hasSourceCode;
240     }
241
242
243     public void setPackage(Package JavaDoc pkg) {
244         myPkg = pkg;
245     }
246
247     /**
248      * setToolRepositoryData method comment.
249      */

250     public void setToolRepositoryData(ToolData arg1) throws java.io.IOException JavaDoc, IvjException {}
251
252     /**
253      * setToolWorkspaceData method comment.
254      */

255     public void setToolWorkspaceData(ToolData arg1) throws java.io.IOException JavaDoc, IvjException {}
256
257     public void setupAddTypeEdition(TypeEdition edition) {
258         myEditions.add(edition);
259     }
260
261     public MockTypeEdition setupNewTypeEdition(String JavaDoc versionName) {
262         MockTypeEdition anEdition = new MockTypeEdition(versionName);
263         setupAddTypeEdition(anEdition);
264
265         return anEdition;
266     }
267
268     public MockTypeEdition setupNewTypeEdition(Date edition) {
269         MockTypeEdition anEdition = new MockTypeEdition(null, edition);
270         setupAddTypeEdition(anEdition);
271
272         return anEdition;
273     }
274
275     /**
276      * testToolRepositoryData method comment.
277      */

278     public boolean testToolRepositoryData(String JavaDoc arg1) throws IvjException {
279         return false;
280     }
281
282     /**
283      * testToolWorkspaceData method comment.
284      */

285     public boolean testToolWorkspaceData(String JavaDoc arg1) throws IvjException {
286         return false;
287     }
288
289     /**
290      * Returns a string representation of the test case
291      */

292     public String JavaDoc toString() {
293         return "MockType: " + getQualifiedName();
294     }
295
296     /**
297      * verify method comment.
298      */

299     public void verify() {}
300 }
301
Popular Tags