1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.apache.directory.ldap.client.api;
21
22
23 import java.io.IOException;
24 import java.util.List;
25
26 import org.apache.directory.api.asn1.util.Oid;
27 import org.apache.directory.api.ldap.codec.api.BinaryAttributeDetector;
28 import org.apache.directory.api.ldap.codec.api.LdapApiService;
29 import org.apache.directory.api.ldap.model.cursor.EntryCursor;
30 import org.apache.directory.api.ldap.model.cursor.SearchCursor;
31 import org.apache.directory.api.ldap.model.entry.Entry;
32 import org.apache.directory.api.ldap.model.entry.Modification;
33 import org.apache.directory.api.ldap.model.entry.ModificationOperation;
34 import org.apache.directory.api.ldap.model.entry.Value;
35 import org.apache.directory.api.ldap.model.exception.LdapException;
36 import org.apache.directory.api.ldap.model.message.AbandonRequest;
37 import org.apache.directory.api.ldap.model.message.AddRequest;
38 import org.apache.directory.api.ldap.model.message.AddResponse;
39 import org.apache.directory.api.ldap.model.message.BindRequest;
40 import org.apache.directory.api.ldap.model.message.BindResponse;
41 import org.apache.directory.api.ldap.model.message.CompareRequest;
42 import org.apache.directory.api.ldap.model.message.CompareResponse;
43 import org.apache.directory.api.ldap.model.message.Control;
44 import org.apache.directory.api.ldap.model.message.DeleteRequest;
45 import org.apache.directory.api.ldap.model.message.DeleteResponse;
46 import org.apache.directory.api.ldap.model.message.ExtendedRequest;
47 import org.apache.directory.api.ldap.model.message.ExtendedResponse;
48 import org.apache.directory.api.ldap.model.message.ModifyDnRequest;
49 import org.apache.directory.api.ldap.model.message.ModifyDnResponse;
50 import org.apache.directory.api.ldap.model.message.ModifyRequest;
51 import org.apache.directory.api.ldap.model.message.ModifyResponse;
52 import org.apache.directory.api.ldap.model.message.SearchRequest;
53 import org.apache.directory.api.ldap.model.message.SearchScope;
54 import org.apache.directory.api.ldap.model.name.Dn;
55 import org.apache.directory.api.ldap.model.name.Rdn;
56 import org.apache.directory.api.ldap.model.schema.SchemaManager;
57
58
59
60
61
62
63
64
65
66 public class LdapConnectionWrapper implements LdapConnection, Wrapper<LdapConnection>
67 {
68
69 protected LdapConnection connection;
70
71
72
73
74
75
76
77 protected LdapConnectionWrapper( LdapConnection connection )
78 {
79 this.connection = connection;
80 }
81
82
83
84
85
86 @Override
87 public LdapConnection wrapped()
88 {
89 return connection;
90 }
91
92
93
94
95
96 @Override
97 public boolean isConnected()
98 {
99 return connection.isConnected();
100 }
101
102
103
104
105
106 @Override
107 public boolean isAuthenticated()
108 {
109 return connection.isAuthenticated();
110 }
111
112
113
114
115
116 @Override
117 public boolean connect() throws LdapException
118 {
119 return connection.connect();
120 }
121
122
123
124
125
126 public Throwable exceptionCaught()
127 {
128 return connection.exceptionCaught();
129 }
130
131
132
133
134
135 @Override
136 public void close() throws IOException
137 {
138 connection.close();
139 }
140
141
142
143
144
145 @Override
146 public void add( Entry entry ) throws LdapException
147 {
148 connection.add( entry );
149 }
150
151
152
153
154
155 @Override
156 public AddResponse add( AddRequest addRequest ) throws LdapException
157 {
158 return connection.add( addRequest );
159 }
160
161
162
163
164
165 @Override
166 public void abandon( int messageId )
167 {
168 connection.abandon( messageId );
169 }
170
171
172
173
174
175 @Override
176 public void abandon( AbandonRequest abandonRequest )
177 {
178 connection.abandon( abandonRequest );
179 }
180
181
182
183
184
185 @Override
186 public void bind() throws LdapException
187 {
188 connection.bind();
189 }
190
191
192
193
194
195 @Override
196 public void anonymousBind() throws LdapException
197 {
198 connection.anonymousBind();
199 }
200
201
202
203
204
205 @Override
206 public void bind( String name ) throws LdapException
207 {
208 connection.bind( name );
209 }
210
211
212
213
214
215 @Override
216 public void bind( String name, String credentials ) throws LdapException
217 {
218 connection.bind( name, credentials );
219 }
220
221
222
223
224
225 @Override
226 public void bind( Dn name ) throws LdapException
227 {
228 connection.bind( name );
229 }
230
231
232
233
234
235 @Override
236 public void bind( Dn name, String credentials ) throws LdapException
237 {
238 connection.bind( name, credentials );
239 }
240
241
242
243
244
245 @Override
246 public BindResponse bind( BindRequest bindRequest ) throws LdapException
247 {
248 return connection.bind( bindRequest );
249 }
250
251
252
253
254
255 @Override
256 public BindResponse bind( SaslRequest saslRequest ) throws LdapException
257 {
258 return connection.bind( saslRequest );
259 }
260
261
262
263
264
265 @Override
266 public EntryCursor search( Dn baseDn, String filter, SearchScope scope, String... attributes )
267 throws LdapException
268 {
269 return connection.search( baseDn, filter, scope, attributes );
270 }
271
272
273
274
275
276 @Override
277 public EntryCursor search( String baseDn, String filter, SearchScope scope, String... attributes )
278 throws LdapException
279 {
280 return connection.search( baseDn, filter, scope, attributes );
281 }
282
283
284
285
286
287 @Override
288 public SearchCursor search( SearchRequest searchRequest ) throws LdapException
289 {
290 return connection.search( searchRequest );
291 }
292
293
294
295
296
297 @Override
298 public void unBind() throws LdapException
299 {
300 connection.unBind();
301 }
302
303
304
305
306
307 @Override
308 public void setTimeOut( long timeOut )
309 {
310 connection.setTimeOut( timeOut );
311 }
312
313
314
315
316
317 @Override
318 public void modify( Dn dn, Modification... modifications ) throws LdapException
319 {
320 connection.modify( dn, modifications );
321 }
322
323
324
325
326
327 @Override
328 public void modify( String dn, Modification... modifications ) throws LdapException
329 {
330 connection.modify( dn, modifications );
331 }
332
333
334
335
336
337 @Override
338 public void modify( Entry entry, ModificationOperation modOp ) throws LdapException
339 {
340 connection.modify( entry, modOp );
341 }
342
343
344
345
346
347 @Override
348 public ModifyResponse modify( ModifyRequest modRequest ) throws LdapException
349 {
350 return connection.modify( modRequest );
351 }
352
353
354
355
356
357 @Override
358 public void rename( String entryDn, String newRdn ) throws LdapException
359 {
360 connection.rename( entryDn, newRdn );
361 }
362
363
364
365
366
367 @Override
368 public void rename( Dn entryDn, Rdn newRdn ) throws LdapException
369 {
370 connection.rename( entryDn, newRdn );
371 }
372
373
374
375
376
377 @Override
378 public void rename( String entryDn, String newRdn, boolean deleteOldRdn ) throws LdapException
379 {
380 connection.rename( entryDn, newRdn, deleteOldRdn );
381 }
382
383
384
385
386
387 @Override
388 public void rename( Dn entryDn, Rdn newRdn, boolean deleteOldRdn ) throws LdapException
389 {
390 connection.rename( entryDn, newRdn, deleteOldRdn );
391 }
392
393
394
395
396
397 @Override
398 public void move( String entryDn, String newSuperiorDn ) throws LdapException
399 {
400 connection.move( entryDn, newSuperiorDn );
401 }
402
403
404
405
406
407 @Override
408 public void move( Dn entryDn, Dn newSuperiorDn ) throws LdapException
409 {
410 connection.move( entryDn, newSuperiorDn );
411 }
412
413
414
415
416
417 @Override
418 public void moveAndRename( Dn entryDn, Dn newDn ) throws LdapException
419 {
420 connection.moveAndRename( entryDn, newDn );
421 }
422
423
424
425
426
427 @Override
428 public void moveAndRename( String entryDn, String newDn ) throws LdapException
429 {
430 connection.moveAndRename( entryDn, newDn );
431 }
432
433
434
435
436
437 @Override
438 public void moveAndRename( Dn entryDn, Dn newDn, boolean deleteOldRdn ) throws LdapException
439 {
440 connection.moveAndRename( entryDn, newDn, deleteOldRdn );
441 }
442
443
444
445
446
447 @Override
448 public void moveAndRename( String entryDn, String newDn, boolean deleteOldRdn ) throws LdapException
449 {
450 connection.moveAndRename( entryDn, newDn, deleteOldRdn );
451 }
452
453
454
455
456
457 @Override
458 public ModifyDnResponse modifyDn( ModifyDnRequest modDnRequest ) throws LdapException
459 {
460 return connection.modifyDn( modDnRequest );
461 }
462
463
464
465
466
467 @Override
468 public void delete( String dn ) throws LdapException
469 {
470 connection.delete( dn );
471 }
472
473
474
475
476
477 @Override
478 public void delete( Dn dn ) throws LdapException
479 {
480 connection.delete( dn );
481 }
482
483
484
485
486
487 @Override
488 public DeleteResponse delete( DeleteRequest deleteRequest ) throws LdapException
489 {
490 return connection.delete( deleteRequest );
491 }
492
493
494
495
496
497 @Override
498 public boolean compare( String dn, String attributeName, String value ) throws LdapException
499 {
500 return connection.compare( dn, attributeName, value );
501 }
502
503
504
505
506
507 @Override
508 public boolean compare( String dn, String attributeName, byte[] value ) throws LdapException
509 {
510 return connection.compare( dn, attributeName, value );
511 }
512
513
514
515
516
517 @Override
518 public boolean compare( String dn, String attributeName, Value value ) throws LdapException
519 {
520 return connection.compare( dn, attributeName, value );
521 }
522
523
524
525
526
527 @Override
528 public boolean compare( Dn dn, String attributeName, String value ) throws LdapException
529 {
530 return connection.compare( dn, attributeName, value );
531 }
532
533
534
535
536
537 @Override
538 public boolean compare( Dn dn, String attributeName, byte[] value ) throws LdapException
539 {
540 return connection.compare( dn, attributeName, value );
541 }
542
543
544
545
546
547 @Override
548 public boolean compare( Dn dn, String attributeName, Value value ) throws LdapException
549 {
550 return connection.compare( dn, attributeName, value );
551 }
552
553
554
555
556
557 @Override
558 public CompareResponse compare( CompareRequest compareRequest ) throws LdapException
559 {
560 return connection.compare( compareRequest );
561 }
562
563
564
565
566
567 @Override
568 public ExtendedResponse extended( String oid ) throws LdapException
569 {
570 return connection.extended( oid );
571 }
572
573
574
575
576
577 @Override
578 public ExtendedResponse extended( String oid, byte[] value ) throws LdapException
579 {
580 return connection.extended( oid, value );
581 }
582
583
584
585
586
587 @Override
588 public ExtendedResponse extended( Oid oid ) throws LdapException
589 {
590 return connection.extended( oid );
591 }
592
593
594
595
596
597 @Override
598 public ExtendedResponse extended( Oid oid, byte[] value ) throws LdapException
599 {
600 return connection.extended( oid, value );
601 }
602
603
604
605
606
607 @Override
608 public ExtendedResponse extended( ExtendedRequest extendedRequest ) throws LdapException
609 {
610 return connection.extended( extendedRequest );
611 }
612
613
614
615
616
617 @Override
618 public boolean exists( String dn ) throws LdapException
619 {
620 return connection.exists( dn );
621 }
622
623
624
625
626
627 @Override
628 public boolean exists( Dn dn ) throws LdapException
629 {
630 return connection.exists( dn );
631 }
632
633
634
635
636
637 @Override
638 public Entry getRootDse() throws LdapException
639 {
640 return connection.getRootDse();
641 }
642
643
644
645
646
647 @Override
648 public Entry getRootDse( String... attributes ) throws LdapException
649 {
650 return connection.getRootDse( attributes );
651 }
652
653
654
655
656
657 @Override
658 public Entry lookup( Dn dn ) throws LdapException
659 {
660 return connection.lookup( dn );
661 }
662
663
664
665
666
667 @Override
668 public Entry lookup( String dn ) throws LdapException
669 {
670 return connection.lookup( dn );
671 }
672
673
674
675
676
677 @Override
678 public Entry lookup( Dn dn, String... attributes ) throws LdapException
679 {
680 return connection.lookup( dn, attributes );
681 }
682
683
684
685
686
687 @Override
688 public Entry lookup( Dn dn, Control[] controls, String... attributes ) throws LdapException
689 {
690 return connection.lookup( dn, controls, attributes );
691 }
692
693
694
695
696
697 @Override
698 public Entry lookup( String dn, String... attributes ) throws LdapException
699 {
700 return connection.lookup( dn, attributes );
701 }
702
703
704
705
706
707 @Override
708 public Entry lookup( String dn, Control[] controls, String... attributes ) throws LdapException
709 {
710 return connection.lookup( dn, controls, attributes );
711 }
712
713
714
715
716
717 @Override
718 public boolean isControlSupported( String controlOID ) throws LdapException
719 {
720 return connection.isControlSupported( controlOID );
721 }
722
723
724
725
726
727 @Override
728 public List<String> getSupportedControls() throws LdapException
729 {
730 return connection.getSupportedControls();
731 }
732
733
734
735
736
737 @Override
738 public void loadSchema() throws LdapException
739 {
740 connection.loadSchema();
741 }
742
743
744
745
746
747 @Override
748 public SchemaManager getSchemaManager()
749 {
750 return connection.getSchemaManager();
751 }
752
753
754
755
756
757 @Override
758 public LdapApiService getCodecService()
759 {
760 return connection.getCodecService();
761 }
762
763
764
765
766
767 @Override
768 public boolean isRequestCompleted( int messageId )
769 {
770 return connection.isRequestCompleted( messageId );
771 }
772
773
774
775
776
777 @Override
778 public boolean doesFutureExistFor( int messageId )
779 {
780 return connection.isRequestCompleted( messageId );
781 }
782
783
784
785
786
787 @Override
788 public BinaryAttributeDetector getBinaryAttributeDetector()
789 {
790 return connection.getBinaryAttributeDetector();
791 }
792
793
794
795
796
797 @Override
798 public void setBinaryAttributeDetector( BinaryAttributeDetector binaryAttributeDetecter )
799 {
800 connection.setBinaryAttributeDetector( binaryAttributeDetecter );
801 }
802
803
804
805
806
807 @Override
808 public void setSchemaManager( SchemaManager schemaManager )
809 {
810 connection.setSchemaManager( schemaManager );
811 }
812
813
814
815
816
817 @Override
818 public void loadSchemaRelaxed() throws LdapException
819 {
820 connection.loadSchemaRelaxed();
821 }
822 }