| 1 20 21 package org.apache.directory.ldapstudio.browser.core.internal.model; 22 23 24 import java.io.Writer ; 25 26 import org.apache.directory.ldapstudio.browser.core.BookmarkManager; 27 import org.apache.directory.ldapstudio.browser.core.SearchManager; 28 import org.apache.directory.ldapstudio.browser.core.jobs.ExtendedProgressMonitor; 29 import org.apache.directory.ldapstudio.browser.core.model.ConnectionParameter; 30 import org.apache.directory.ldapstudio.browser.core.model.DN; 31 import org.apache.directory.ldapstudio.browser.core.model.IAttribute; 32 import org.apache.directory.ldapstudio.browser.core.model.IConnection; 33 import org.apache.directory.ldapstudio.browser.core.model.IEntry; 34 import org.apache.directory.ldapstudio.browser.core.model.IRootDSE; 35 import org.apache.directory.ldapstudio.browser.core.model.ISearch; 36 import org.apache.directory.ldapstudio.browser.core.model.IValue; 37 import org.apache.directory.ldapstudio.browser.core.model.SearchParameter; 38 import org.apache.directory.ldapstudio.browser.core.model.URL; 39 import org.apache.directory.ldapstudio.browser.core.model.ldif.LdifEnumeration; 40 import org.apache.directory.ldapstudio.browser.core.model.schema.Schema; 41 42 43 public class DummyConnection implements IConnection 44 { 45 46 private static final long serialVersionUID = 3671686808330691741L; 47 48 private Schema schema; 49 50 51 public DummyConnection( Schema schema ) 52 { 53 this.schema = schema; 54 } 55 56 57 public void bind( ExtendedProgressMonitor monitor ) 58 { 59 } 60 61 62 public boolean canClose() 63 { 64 return false; 65 } 66 67 68 public boolean canOpen() 69 { 70 return false; 71 } 72 73 74 public void close() 75 { 76 } 77 78 79 public void connect( ExtendedProgressMonitor monitor ) 80 { 81 } 82 83 84 public void create( IEntry entryToCreate, ExtendedProgressMonitor monitor ) 85 { 86 } 87 88 89 public void create( IValue[] valuesToCreate, ExtendedProgressMonitor monitor ) 90 { 91 } 92 93 94 public void delete( IEntry entryToDelete, ExtendedProgressMonitor monitor ) 95 { 96 } 97 98 99 public void delete( IValue[] valuesToDelete, ExtendedProgressMonitor monitor ) 100 { 101 102 } 103 104 105 public void delete( IAttribute[] attriubtesToDelete, ExtendedProgressMonitor monitor ) 106 { 107 108 } 109 110 111 public boolean existsEntry( DN dn, ExtendedProgressMonitor monitor ) 112 { 113 return false; 114 } 115 116 117 public LdifEnumeration exportLdif( SearchParameter searchParameter, ExtendedProgressMonitor pm ) 118 throws ConnectionException 119 { 120 throw new UnsupportedOperationException (); 121 } 122 123 124 public void fetchRootDSE( ExtendedProgressMonitor monitor ) 125 { 126 } 127 128 129 public int getAuthMethod() 130 { 131 return AUTH_ANONYMOUS; 132 } 133 134 135 public DN getBaseDN() 136 { 137 return new DN(); 138 } 139 140 141 public IEntry[] getBaseDNEntries() 142 { 143 return new IEntry[0]; 144 } 145 146 147 public String getBindPrincipal() 148 { 149 return null; 150 } 151 152 153 public String getBindPassword() 154 { 155 return null; 156 } 157 158 159 public BookmarkManager getBookmarkManager() 160 { 161 return null; 162 } 163 164 165 public ConnectionParameter getConnectionParameter() 166 { 167 return null; 168 } 169 170 171 public int getCountLimit() 172 { 173 return 0; 174 } 175 176 177 public int getAliasesDereferencingMethod() 178 { 179 return DEREFERENCE_ALIASES_NEVER; 180 } 181 182 183 public int getEncryptionMethod() 184 { 185 return ENCYRPTION_NONE; 186 } 187 188 189 public IEntry getEntry( DN dn, ExtendedProgressMonitor monitor ) 190 { 191 return null; 192 } 193 194 195 public IEntry getEntryFromCache( DN dn ) 196 { 197 return null; 198 } 199 200 201 public String getHost() 202 { 203 return null; 204 } 205 206 207 public IEntry[] getMetadataEntries() 208 { 209 return new IEntry[0]; 210 } 211 212 213 public String getName() 214 { 215 return null; 216 } 217 218 219 public int getPort() 220 { 221 return -1; 222 } 223 224 225 public IRootDSE getRootDSE() 226 { 227 return null; 228 } 229 230 231 public Schema getSchema() 232 { 233 return schema; 234 } 235 236 237 public SearchManager getSearchManager() 238 { 239 return null; 240 } 241 242 243 public int getTimeLimit() 244 { 245 return 0; 246 } 247 248 249 public void importLdif( LdifEnumeration enumeration, Writer logWriter, boolean continueOnError, 250 ExtendedProgressMonitor monitor ) 251 { 252 253 } 254 255 256 public boolean isFetchBaseDNs() 257 { 258 return false; 259 } 260 261 262 public boolean isOpened() 263 { 264 return true; 265 } 266 267 268 public boolean isSuspended() 269 { 270 return true; 271 } 272 273 274 public void modify( IValue oldValue, IValue newVaue, ExtendedProgressMonitor monitor ) 275 { 276 } 277 278 279 public void open( ExtendedProgressMonitor monitor ) 280 { 281 } 282 283 284 public void reloadSchema( ExtendedProgressMonitor monitor ) 285 { 286 } 287 288 289 public void move( IEntry entryToMove, DN newSuperior, ExtendedProgressMonitor monitor ) 290 { 291 } 292 293 294 public void rename( IEntry entryToRename, DN newDn, boolean deleteOldRdn, ExtendedProgressMonitor monitor ) 295 { 296 } 297 298 299 public void reset() 300 { 301 } 302 303 304 public void resume( ExtendedProgressMonitor monitor ) 305 { 306 } 307 308 309 public void search( ISearch searchRequest, ExtendedProgressMonitor monitor ) 310 { 311 } 312 313 314 public void setAuthMethod( int authMethod ) 315 { 316 } 317 318 319 public void setBaseDN( DN baseDN ) 320 { 321 } 322 323 324 public void setBindPrincipal( String bindPrincipal ) 325 { 326 } 327 328 329 public void setBindPassword( String bindPassword ) 330 { 331 } 332 333 334 public void setConnectionParameter( ConnectionParameter connectionParameter ) 335 { 336 } 337 338 339 public void setCountLimit( int countLimit ) 340 { 341 } 342 343 344 public void setAliasesDereferencingMethod( int aliasesDereferencingMethod ) 345 { 346 } 347 348 349 public void setEncryptionMethod( int encryptionMethod ) 350 { 351 } 352 353 354 public void setFetchBaseDNs( boolean fetchBaseDNs ) 355 { 356 } 357 358 359 public void setHost( String host ) 360 { 361 } 362 363 364 public void setName( String name ) 365 { 366 } 367 368 369 public void setPort( int port ) 370 { 371 } 372 373 374 public void setSchema( Schema schema ) 375 { 376 this.schema = schema; 377 } 378 379 380 public void setTimeLimit( int timeLimit ) 381 { 382 383 } 384 385 386 public void suspend() 387 { 388 389 } 390 391 392 public Object getAdapter( Class adapter ) 393 { 394 return null; 395 } 396 397 398 public Object clone() 399 { 400 return this; 401 } 402 403 404 public ModificationLogger getModificationLogger() 405 { 406 return null; 407 } 408 409 410 public int getReferralsHandlingMethod() 411 { 412 return HANDLE_REFERRALS_IGNORE; 413 } 414 415 416 public void setReferralsHandlingMethod( int referralsHandlingMethod ) 417 { 418 } 419 420 421 public URL getUrl() 422 { 423 return null; 424 } 425 426 } 427 | Popular Tags |