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 myTypeName; 12 private Package myPkg; 13 private ArrayList myEditions = new ArrayList(); 14 private boolean myHasSourceCode; 15 16 17 public MockType(String name) { 18 super(); 19 myTypeName = name; 20 } 21 22 25 public void clearToolRepositoryData(String arg1) throws IvjException {} 26 27 30 public void clearToolWorkspaceData(String arg1) throws IvjException {} 31 32 35 public void createNewEdition() throws IvjException {} 36 37 40 public void createVersion(String arg1) throws IvjException {} 41 42 45 public void createVersion(String arg1, boolean arg2) throws IvjException {} 46 47 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 61 public com.ibm.ivj.util.base.Type[] getAllSubtypes() { 62 return null; 63 } 64 65 68 public String getDeveloperName() throws IvjException { 69 return null; 70 } 71 72 75 public TypeEdition getEdition() throws IvjException { 76 return null; 77 } 78 79 82 public String getName() { 83 return myTypeName; 84 } 85 86 89 public String getOwnerName() throws IvjException { 90 return null; 91 } 92 93 96 public com.ibm.ivj.util.base.Package getPackage() throws IvjException { 97 return myPkg; 98 } 99 100 103 public Project getProject() throws IvjException { 104 return myPkg.getProject(); 105 } 106 107 110 public String getQualifiedName() { 111 return myPkg.getName()+"."+myTypeName; 112 } 113 114 117 public ToolData getToolRepositoryData(String arg1) throws java.io.IOException , java.io.StreamCorruptedException , IvjException, ClassNotFoundException , java.io.OptionalDataException { 118 return null; 119 } 120 121 124 public ToolData getToolWorkspaceData(String arg1) throws java.io.IOException , java.io.StreamCorruptedException , IvjException, ClassNotFoundException , java.io.OptionalDataException { 125 return null; 126 } 127 128 131 public String getVersionName() throws IvjException { 132 return null; 133 } 134 135 138 public java.util.Date 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 154 public boolean isApplet() throws IvjException { 155 return false; 156 } 157 158 161 public boolean isApplication() throws IvjException { 162 return false; 163 } 164 165 168 public boolean isClass() throws IvjException { 169 return true; 170 } 171 172 175 public boolean isEdition() throws IvjException { 176 return true; 177 } 178 179 182 public boolean isInDefaultPackage() { 183 return false; 184 } 185 186 189 public boolean isInterface() throws IvjException { 190 return false; 191 } 192 193 196 public boolean isPackage() { 197 return false; 198 } 199 200 203 public boolean isProject() { 204 return false; 205 } 206 207 210 public boolean isReleased() throws IvjException { 211 return false; 212 } 213 214 217 public boolean isType() { 218 return false; 219 } 220 221 224 public boolean isVersion() throws IvjException { 225 return false; 226 } 227 228 231 public void openBrowser() throws IvjException {} 232 233 236 public void release() throws IvjException {} 237 238 public void setHasSourceCode(boolean hasSourceCode) { 239 myHasSourceCode = hasSourceCode; 240 } 241 242 243 public void setPackage(Package pkg) { 244 myPkg = pkg; 245 } 246 247 250 public void setToolRepositoryData(ToolData arg1) throws java.io.IOException , IvjException {} 251 252 255 public void setToolWorkspaceData(ToolData arg1) throws java.io.IOException , IvjException {} 256 257 public void setupAddTypeEdition(TypeEdition edition) { 258 myEditions.add(edition); 259 } 260 261 public MockTypeEdition setupNewTypeEdition(String 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 278 public boolean testToolRepositoryData(String arg1) throws IvjException { 279 return false; 280 } 281 282 285 public boolean testToolWorkspaceData(String arg1) throws IvjException { 286 return false; 287 } 288 289 292 public String toString() { 293 return "MockType: " + getQualifiedName(); 294 } 295 296 299 public void verify() {} 300 } 301 | Popular Tags |