mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

mrossign
16.34.2009 55a07ce2479e1b4c74dec15ce4e78e3fdf50a27c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
/*
 * CDDL HEADER START
 *
 * The contents of this file are subject to the terms of the
 * Common Development and Distribution License, Version 1.0 only
 * (the "License").  You may not use this file except in compliance
 * with the License.
 *
 * You can obtain a copy of the license at
 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
 * See the License for the specific language governing permissions
 * and limitations under the License.
 *
 * When distributing Covered Code, include this CDDL HEADER in each
 * file and include the License file at
 * trunk/opends/resource/legal-notices/OpenDS.LICENSE.  If applicable,
 * add the following below this CDDL HEADER, with the fields enclosed
 * by brackets "[]" replaced with your own identifying information:
 *      Portions Copyright [yyyy] [name of copyright owner]
 *
 * CDDL HEADER END
 *
 *
 *      Copyright 2006-2009 Sun Microsystems, Inc.
 */
package org.opends.server.api.plugin;
import org.opends.messages.Message;
 
 
 
import java.util.List;
import java.util.Set;
 
import org.opends.server.admin.std.server.PluginCfg;
import org.opends.server.api.ClientConnection;
import org.opends.server.config.ConfigException;
import org.opends.server.types.*;
import org.opends.server.types.operation.*;
 
import static org.opends.messages.PluginMessages.*;
 
 
/**
 * This class defines the set of methods and structures that are
 * available for use in Directory Server plugins.  This is a single
 * class that may be used for all types of plugins, and an individual
 * plugin only needs to implement the specific methods that are
 * applicable to that particular plugin type.
 *
 * @param  <T>  The type of configuration handled by this plugin.
 */
@org.opends.server.types.PublicAPI(
     stability=org.opends.server.types.StabilityLevel.UNCOMMITTED,
     mayInstantiate=false,
     mayExtend=true,
     mayInvoke=false)
public abstract class DirectoryServerPlugin
       <T extends PluginCfg>
{
  // Indicates whether this plugin should be invoked for internal
  // operations.
  private boolean invokeForInternalOps;
 
  // The DN of the configuration entry for this plugin.
  private DN pluginDN;
 
  // The plugin types for which this plugin is registered.
  private Set<PluginType> pluginTypes;
 
 
 
  /**
   * Creates a new instance of this Directory Server plugin.  Every
   * plugin must implement a default constructor (it is the only one
   * that will be used to create plugins defined in the
   * configuration), and every plugin constructor must call
   * {@code super()} as its first action.
   */
  protected DirectoryServerPlugin()
  {
  }
 
 
 
  /**
   * Indicates whether the provided configuration is acceptable for
   * this plugin.  It should be possible to call this method on an
   * uninitialized plugin instance in order to determine whether the
   * plugin would be able to use the provided configuration.
   *
   * @param  configuration        The plugin configuration for which
   *                              to make the determination.
   * @param  unacceptableReasons  A list that may be used to hold the
   *                              reasons that the provided
   *                              configuration is not acceptable.
   *
   * @return  {@code true} if the provided configuration is acceptable
   *          for this plugin, or {@code false} if not.
   */
  public boolean isConfigurationAcceptable(PluginCfg configuration,
                      List<Message> unacceptableReasons)
  {
    // This default implementation does not perform any special
    // validation.  It should be overridden by plugin implementations
    // that wish to perform more detailed validation.
    return true;
  }
 
 
 
  /**
   * Performs any initialization that should be done for all types of
   * plugins regardless of type.  This should only be called by the
   * core Directory Server code during the course of loading a plugin.
   *
   * @param  configuration  The configuration for this plugin.
   * @param  pluginTypes    The set of plugin types for which this
   *                        plugin is registered.
   */
  @org.opends.server.types.PublicAPI(
       stability=org.opends.server.types.StabilityLevel.PRIVATE,
       mayInstantiate=false,
       mayExtend=false,
       mayInvoke=false)
  public final void initializeInternal(PluginCfg configuration,
                                       Set<PluginType> pluginTypes)
  {
    this.pluginTypes = pluginTypes;
 
    pluginDN = configuration.dn();
    invokeForInternalOps =
         configuration.isInvokeForInternalOperations();
  }
 
 
 
  /**
   * Performs any initialization necessary for this plugin.  This will
   * be called as soon as the plugin has been loaded and before it is
   * registered with the server.
   *
   * @param  pluginTypes    The set of plugin types that indicate the
   *                        ways in which this plugin will be invoked.
   * @param  configuration  The configuration for this plugin.
   *
   * @throws  ConfigException  If the provided entry does not contain
   *                           a valid configuration for this plugin.
   *
   * @throws  InitializationException  If a problem occurs while
   *                                   initializing the plugin that is
   *                                   not related to the server
   *                                   configuration.
   */
  public abstract void initializePlugin(Set<PluginType> pluginTypes,
                                        T configuration)
         throws ConfigException, InitializationException;
 
 
 
  /**
   * Performs any necessary finalization for this plugin.  This will
   * be called just after the plugin has been deregistered with the
   * server but before it has been unloaded.
   */
  public void finalizePlugin()
  {
    // No implementation is required by default.
  }
 
 
 
  /**
   * Retrieves the DN of the configuration entry for this plugin.
   *
   * @return  The DN of the configuration entry for this plugin.
   */
  public final DN getPluginEntryDN()
  {
    return pluginDN;
  }
 
 
 
  /**
   * Retrieves the plugin types for which this plugin is registered.
   * This set must not be modified.
   *
   * @return  The plugin types for which this plugin is registered.
   */
  public final Set<PluginType> getPluginTypes()
  {
    return pluginTypes;
  }
 
 
 
  /**
   * Indicates whether this plugin should be invoked for internal
   * operations.
   *
   * @return  {@code true} if this plugin should be invoked for
   *          internal operations, or {@code false} if not.
   */
  public final boolean invokeForInternalOperations()
  {
    return invokeForInternalOps;
  }
 
 
 
  /**
   * Specifies whether this plugin should be invoked for internal
   * operations.
   *
   * @param  invokeForInternalOps  Indicates whether this plugin
   *                               should be invoked for internal
   *                               operations.
   */
  @org.opends.server.types.PublicAPI(
       stability=org.opends.server.types.StabilityLevel.PRIVATE,
       mayInstantiate=false,
       mayExtend=false,
       mayInvoke=false)
  public final void setInvokeForInternalOperations(
                         boolean invokeForInternalOps)
  {
    this.invokeForInternalOps = invokeForInternalOps;
  }
 
 
 
  /**
   * Performs any processing that should be done when the Directory
   * Server is in the process of starting.  This method will be called
   * after virtually all other initialization has been performed but
   * before the connection handlers are started.
   *
   * @return  The result of the startup plugin processing.
   */
  public PluginResult.Startup doStartup()
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get(
        String.valueOf(pluginDN), PluginType.STARTUP.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any processing that should be done when the Directory
   * Server is in the process of performing a graceful shutdown.  This
   * method will be called early in the shutdown process after the
   * connection handlers are stopped but before other finalization is
   * performed.
   *
   * @param  reason  The human-readable reason for the shutdown.
   */
  public void doShutdown(Message reason)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get(
        String.valueOf(pluginDN), PluginType.SHUTDOWN.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any processing that should be done when the Directory
   * Server accepts a new connection from a client.  This method will
   * be called after additional verification is performed to ensure
   * that the connection should be accepted.
   *
   * @param  clientConnection  The client connection that has been
   *                           accepted.
   *
   * @return  The result of the plugin processing.
   */
  public PluginResult.PostConnect doPostConnect(ClientConnection
                                                    clientConnection)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get(
        String.valueOf(pluginDN), PluginType.POST_CONNECT.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any processing that should be done whenever a client
   * connection is closed (regardless of whether the closure is
   * initiated by the client or the server).
   *
   * @param  clientConnection  The client connection that has been
   *                           closed.
   * @param  disconnectReason  The disconnect reason for the closure.
   * @param  message           A message providing additional
   *                           information about the closure, or
   *                           {@code null} if there is none.
   *
   * @return  The result of the plugin processing.
   */
  public PluginResult.PostDisconnect
              doPostDisconnect(ClientConnection clientConnection,
                               DisconnectReason disconnectReason,
                               Message message)
  {
    Message msg = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_DISCONNECT.getName());
    throw new UnsupportedOperationException(msg.toString());
  }
 
 
  /**
   * Performs any necessary processing that should be done during an
   * LDIF import operation immediately after reading an entry and
   * confirming that it should be imported based on the provided
   * configuration.
   *
   * @param  importConfig  The configuration used for the LDIF import.
   * @param  entry         The entry that has been read to the LDIF
   *                       file.
   *
   * @return  The result of the plugin processing.
   */
  public PluginResult.ImportLDIF
    doLDIFImport(LDIFImportConfig importConfig, Entry entry)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get(
        String.valueOf(pluginDN), PluginType.LDIF_IMPORT.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
  /**
   * Terminates an import session.
   * Performs any necessary processing that should be done at the end
   * of an LDIF import session based on the provided configuration.
   *
   * @param  importConfig  The configuration used for the LDIF import.
   */
  public void doLDIFImportEnd(LDIFImportConfig importConfig)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get(
        String.valueOf(pluginDN),
        PluginType.LDIF_IMPORT_END.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
  /**
   * Performs any necessary processing that should be done during an
   * LDIF export operation immediately after determining that the
   * provided entry should be included in the export.
   *
   * @param  exportConfig  The configuration used for the LDIF export.
   * @param  entry         The entry to be written to the LDIF file.
   *
   * @return  The result of the plugin processing.
   */
  public PluginResult.ImportLDIF
    doLDIFExport(LDIFExportConfig exportConfig, Entry entry)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get(
        String.valueOf(pluginDN), PluginType.LDIF_EXPORT.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before the
   * Directory Server parses the elements of an abandon request.
   *
   * @param  abandonOperation  The abandon operation that has been
   *                           requested.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PreParse
       doPreParse(PreParseAbandonOperation abandonOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_PARSE_ABANDON.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed processing for an abandon
   * operation.
   *
   * @param  abandonOperation  The abandon operation for which
   *                           processing has completed.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostOperation
       doPostOperation(PostOperationAbandonOperation abandonOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_OPERATION_ABANDON.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before the
   * Directory Server parses the elements of an add request.
   *
   * @param  addOperation  The add operation that has been requested.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreParse
       doPreParse(PreParseAddOperation addOperation)
       throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get(
        String.valueOf(pluginDN), PluginType.PRE_PARSE_ADD.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done just before
   * the Directory Server performs the core processing for an add
   * operation.
   * This method is not called when processing synchronization
   * operations.
   *
   * @param  addOperation  The add operation to be processed.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreOperation
       doPreOperation(PreOperationAddOperation addOperation)
      throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_OPERATION_ADD.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed the core processing for an add
   * operation but before the response has been sent to the client.
   *
   * @param  addOperation  The add operation for which processing has
   *                       completed but no response has yet been
   *                       sent.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostOperation
       doPostOperation(PostOperationAddOperation addOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_OPERATION_ADD.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed all processing for an add
   * operation and has sent the response to the client.
   *
   * @param  addOperation  The add operation for which processing has
   *                       completed and the response has been sent to
   *                       the client.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostResponse
       doPostResponse(PostResponseAddOperation addOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_RESPONSE_ADD.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed processing for an add operation
   * performed via synchronization.
   *
   * @param  addOperation  The synchronized add operation for which
   *                       processing has been completed.
   */
  public void doPostSynchronization(
                   PostSynchronizationAddOperation addOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_SYNCHRONIZATION_ADD.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before the
   * Directory Server parses the elements of a bind request.
   *
   * @param  bindOperation  The bind operation that has been
   *                        requested.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PreParse
       doPreParse(PreParseBindOperation bindOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_PARSE_BIND.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done just before
   * the Directory Server performs the core processing for a bind
   * operation.
   *
   * @param  bindOperation  The bind operation to be processed.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PreOperation
       doPreOperation(PreOperationBindOperation bindOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_OPERATION_BIND.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed the core processing for a bind
   * operation but before the response has been sent to the client.
   *
   * @param  bindOperation  The bind operation for which processing
   *                        has completed but no response has yet been
   *                        sent.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostOperation
       doPostOperation(PostOperationBindOperation bindOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_OPERATION_BIND.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed all processing for a bind
   * operation and has sent the response to the client.
   *
   * @param  bindOperation  The bind operation for which processing
   *                        has completed and the response has been
   *                        sent to the client.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostResponse
       doPostResponse(PostResponseBindOperation bindOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_RESPONSE_BIND.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before the
   * Directory Server parses the elements of a compare request.
   *
   * @param  compareOperation  The compare operation that has been
   *                           requested.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreParse
       doPreParse(PreParseCompareOperation compareOperation)
       throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_PARSE_COMPARE.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done just before
   * the Directory Server performs the core processing for a compare
   * operation.
   *
   * @param  compareOperation  The compare operation to be processed.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreOperation
       doPreOperation(PreOperationCompareOperation compareOperation)
      throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_OPERATION_COMPARE.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed the core processing for a compare
   * operation but before the response has been sent to the client.
   *
   * @param  compareOperation  The compare operation for which
   *                           processing has completed but no
   *                           response has yet been sent.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostOperation
       doPostOperation(PostOperationCompareOperation compareOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_OPERATION_COMPARE.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed all processing for a compare
   * operation and has sent the response to the client.
   *
   * @param  compareOperation  The compare operation for which
   *                           processing has completed and the
   *                           response has been sent to the client.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostResponse
       doPostResponse(PostResponseCompareOperation compareOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_RESPONSE_COMPARE.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before the
   * Directory Server parses the elements of a delete request.
   *
   * @param  deleteOperation  The delete operation that has been
   *                          requested.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreParse
       doPreParse(PreParseDeleteOperation deleteOperation)
       throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_PARSE_DELETE.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done just before
   * the Directory Server performs the core processing for a delete
   * operation.
   * This method is not called when processing synchronization
   * operations.
   *
   * @param  deleteOperation  The delete operation to be processed.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreOperation
       doPreOperation(PreOperationDeleteOperation deleteOperation)
      throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_OPERATION_DELETE.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed the core processing for a delete
   * operation but before the response has been sent to the client.
   *
   * @param  deleteOperation  The delete operation for which
   *                          processing has completed but no
   *                          response has yet been sent.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostOperation
       doPostOperation(PostOperationDeleteOperation deleteOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_OPERATION_DELETE.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed all processing for a delete
   * operation and has sent the response to the client.
   *
   * @param  deleteOperation  The delete operation for which
   *                          processing has completed and the
   *                          response has been sent to the client.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostResponse
       doPostResponse(PostResponseDeleteOperation deleteOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_RESPONSE_DELETE.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed processing for a delete operation
   * performed via synchronization.
   *
   * @param  deleteOperation  The synchronized delete operation for
   *                          which processing has been completed.
   */
  public void doPostSynchronization(
                   PostSynchronizationDeleteOperation deleteOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_SYNCHRONIZATION_DELETE.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before the
   * Directory Server parses the elements of an extended request.
   *
   * @param  extendedOperation  The extended operation that has been
   *                            requested.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreParse
       doPreParse(PreParseExtendedOperation extendedOperation)
       throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_PARSE_EXTENDED.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done just before
   * the Directory Server performs the core processing for an extended
   * operation.
   *
   * @param  extendedOperation  The extended operation to be
   *                            processed.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreOperation
       doPreOperation(PreOperationExtendedOperation extendedOperation)
      throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_OPERATION_EXTENDED.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed the core processing for an
   * extended operation but before the response has been sent to the
   * client.
   *
   * @param  extendedOperation  The extended operation for which
   *                            processing has completed but no
   *                            response has yet been sent.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostOperation
       doPostOperation(PostOperationExtendedOperation
                            extendedOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_OPERATION_EXTENDED.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed all processing for an extended
   * operation and has sent the response to the client.
   *
   * @param  extendedOperation  The extended operation for which
   *                            processing has completed and the
   *                            response has been sent to the client.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostResponse
       doPostResponse(PostResponseExtendedOperation extendedOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_RESPONSE_EXTENDED.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before the
   * Directory Server parses the elements of a modify request.
   *
   * @param  modifyOperation  The modify operation that has been
   *                          requested.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreParse
       doPreParse(PreParseModifyOperation modifyOperation)
       throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_PARSE_MODIFY.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done just before
   * the Directory Server performs the core processing for a modify
   * operation.
   *
   * This method is not called when processing synchronization
   * operations.
   * @param  modifyOperation  The modify operation to be processed.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreOperation
       doPreOperation(PreOperationModifyOperation modifyOperation)
      throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_OPERATION_MODIFY.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed the core processing for a modify
   * operation but before the response has been sent to the client.
   *
   * @param  modifyOperation  The modify operation for which
   *                          processing has completed but no response
   *                          has yet been sent.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostOperation
       doPostOperation(PostOperationModifyOperation modifyOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_OPERATION_MODIFY.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed all processing for a modify
   * operation and has sent the response to the client.
   *
   * @param  modifyOperation  The modify operation for which
   *                          processing has completed and the
   *                          response has been sent to the client.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostResponse
       doPostResponse(PostResponseModifyOperation modifyOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_RESPONSE_MODIFY.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed processing for a modify operation
   * performed via synchronization.
   *
   * @param  modifyOperation  The synchronized modify operation for
   *                          which processing has been completed.
   */
  public void doPostSynchronization(
                   PostSynchronizationModifyOperation modifyOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_SYNCHRONIZATION_MODIFY.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before the
   * Directory Server parses the elements of a modify DN request.
   *
   * @param  modifyDNOperation  The modify DN operation that has been
   *                            requested.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreParse
       doPreParse(PreParseModifyDNOperation modifyDNOperation)
       throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_PARSE_MODIFY_DN.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done just before
   * the Directory Server performs the core processing for a modify DN
   * operation.
   * This method is not called when processing synchronization
   * operations.
   *
   * @param  modifyDNOperation  The modify DN operation to be
   *                            processed.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreOperation
       doPreOperation(PreOperationModifyDNOperation modifyDNOperation)
      throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_OPERATION_MODIFY_DN.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done whenever a
   * subordinate entry is moved or renamed as part of a modify DN
   * operation.  Note that if the entry is to be changed in any way,
   * the new entry should be directly modified, and the changes made
   * should also be added to the provided list of modifications.
   * <BR><BR>
   * NOTE:  At the present time, OpenDS does not provide support for
   * altering entries subordinate to the target of a modify DN
   * operation.  While this may be available in the future, current
   * plugins should not attempt to alter the new or old entries in any
   * way, nor should they attempt to add any modifications to the
   * provided list.
   *
   * @param  modifyDNOperation  The modify DN operation with which the
   *                            subordinate entry is associated.
   * @param  oldEntry           The subordinate entry prior to the
   *                            move/rename operation.
   * @param  newEntry           The subordinate enry after the
   *                            move/rename operation.
   * @param  modifications      A list into which any modifications
   *                            made to the target entry should be
   *                            placed.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.SubordinateModifyDN
       processSubordinateModifyDN(SubordinateModifyDNOperation
                                       modifyDNOperation,
                                  Entry oldEntry, Entry newEntry,
                                  List<Modification> modifications)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.get(
            String.valueOf(pluginDN),
            PluginType.SUBORDINATE_MODIFY_DN.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed the core processing for a modify
   * DN operation but before the response has been sent to the client.
   *
   * @param  modifyDNOperation  The modify DN operation for which
   *                            processing has completed but no
   *                            response has yet been sent.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostOperation
       doPostOperation(PostOperationModifyDNOperation
                            modifyDNOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_OPERATION_MODIFY_DN.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed all processing for a modify DN
   * operation and has sent the response to the client.
   *
   * @param  modifyDNOperation  The modifyDN operation for which
   *                            processing has completed and the
   *                            response has been sent to the client.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostResponse
       doPostResponse(PostResponseModifyDNOperation modifyDNOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_RESPONSE_MODIFY_DN.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed processing for a modify DN
   * operation performed via synchronization.
   *
   * @param  modifyDNOperation  The synchronized modify DN operation
   *                            for which processing has been
   *                            completed.
   */
  public void doPostSynchronization(
              PostSynchronizationModifyDNOperation modifyDNOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_SYNCHRONIZATION_MODIFY_DN.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before the
   * Directory Server parses the elements of a search request.
   *
   * @param  searchOperation  The search operation that has been
   *                          requested.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreParse
       doPreParse(PreParseSearchOperation searchOperation)
       throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_PARSE_SEARCH.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done just before
   * the Directory Server performs the core processing for a search
   * operation.
   *
   * @param  searchOperation  The search operation to be processed.
   *
   * @return  Information about the result of the plugin processing.
   *
   * @throws CanceledOperationException if this operation should
   * be cancelled.
   */
  public PluginResult.PreOperation
       doPreOperation(PreOperationSearchOperation searchOperation)
      throws CanceledOperationException {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_OPERATION_SEARCH.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before a
   * search result entry is sent to a client.  This will be called
   * after it has been verified that the entry does actually match the
   * search criteria and after access control has been enforced to
   * ensure that the entry should be sent and/or to strip out
   * attributes/values that the user should not see.
   *
   * @param  searchOperation  The search operation with which the
   *                          search entry is associated.
   * @param  searchEntry      The search result entry that is to be
   *                          sent to the client.  Its contents may be
   *                          altered by the plugin if necessary.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.IntermediateResponse
       processSearchEntry(SearchEntrySearchOperation searchOperation,
                          SearchResultEntry searchEntry)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.SEARCH_RESULT_ENTRY.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before a
   * search result reference is sent to a client.
   *
   * @param  searchOperation  The search operation with which the
   *                          search result reference is associated.
   * @param  searchReference  The search result reference that is to
   *                          be sent to the client.  Its contents may
   *                          be altered by the plugin if necessary.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.IntermediateResponse
       processSearchReference(SearchReferenceSearchOperation
                                   searchOperation,
                              SearchResultReference searchReference)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.SEARCH_RESULT_REFERENCE.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed the core processing for a search
   * operation but before the response has been sent to the client.
   *
   * @param  searchOperation  The search operation for which
   *                          processing has completed but no response
   *                          has yet been sent.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostOperation
       doPostOperation(PostOperationSearchOperation searchOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_OPERATION_SEARCH.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed all processing for a search
   * operation and has sent the response to the client.
   *
   * @param  searchOperation  The search operation for which
   *                          processing has completed and the
   *                          response has been sent to the client.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostResponse
       doPostResponse(PostResponseSearchOperation searchOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_RESPONSE_SEARCH.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before the
   * Directory Server parses the elements of an unbind request.
   *
   * @param  unbindOperation  The unbind operation that has been
   *                          requested.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PreParse
       doPreParse(PreParseUnbindOperation unbindOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.PRE_PARSE_UNBIND.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done after the
   * Directory Server has completed processing for an unbind
   * operation.
   *
   * @param  unbindOperation  The unbind operation for which
   *                          processing has completed.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.PostOperation
       doPostOperation(PostOperationUnbindOperation unbindOperation)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.POST_OPERATION_UNBIND.getName());
    throw new UnsupportedOperationException(message.toString());
  }
 
 
 
  /**
   * Performs any necessary processing that should be done before an
   * intermediate response message is sent to a client.
   *
   * @param  intermediateResponse  The intermediate response to be
   *                               sent to the client.
   *
   * @return  Information about the result of the plugin processing.
   */
  public PluginResult.IntermediateResponse
              processIntermediateResponse(
                   IntermediateResponse intermediateResponse)
  {
    Message message = ERR_PLUGIN_TYPE_NOT_SUPPORTED.
        get(String.valueOf(pluginDN),
            PluginType.INTERMEDIATE_RESPONSE.getName());
    throw new UnsupportedOperationException(message.toString());
  }
}