001/*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License").  You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2006-2009 Sun Microsystems, Inc.
025 *      Portions Copyright 2013-2015 ForgeRock AS.
026 */
027package org.opends.server.types;
028
029import java.util.List;
030import java.util.Map;
031import java.util.Set;
032
033import org.forgerock.i18n.LocalizableMessage;
034import org.forgerock.opendj.config.server.ConfigException;
035import org.forgerock.opendj.ldap.ResultCode;
036import org.forgerock.opendj.ldap.schema.MatchingRule;
037import org.forgerock.opendj.ldap.schema.Syntax;
038import org.opends.server.api.AlertGenerator;
039import org.opends.server.api.ConfigHandler;
040import org.opends.server.api.ExtendedOperationHandler;
041import org.opends.server.api.InvokableComponent;
042import org.opends.server.api.SASLMechanismHandler;
043import org.opends.server.api.ServerShutdownListener;
044import org.opends.server.config.ConfigEntry;
045import org.opends.server.core.DirectoryServer;
046
047import com.forgerock.opendj.util.OperatingSystem;
048
049/**
050 * This interface defines a set of methods that may be used by
051 * third-party code to obtain information about the core Directory
052 * Server configuration and the instances of various kinds of
053 * components that have registered themselves with the server.
054 * <BR><BR>
055 * Note that this interface is not intended to be implemented by any
056 * third-party code.  It is merely used to control which elements are
057 * intended for use by external classes.
058 */
059@org.opends.server.types.PublicAPI(
060     stability=org.opends.server.types.StabilityLevel.VOLATILE,
061     mayInstantiate=false,
062     mayExtend=false,
063     mayInvoke=true)
064public final class DirectoryConfig
065{
066  /**
067   * Retrieves a reference to the Directory Server crypto manager.
068   *
069   * @return  A reference to the Directory Server crypto manager.
070   */
071  public static CryptoManager getCryptoManager()
072  {
073    return DirectoryServer.getCryptoManager();
074  }
075
076
077
078  /**
079   * Retrieves the operating system on which the Directory Server is
080   * running.
081   *
082   * @return  The operating system on which the Directory Server is
083   *          running.
084   */
085  public static OperatingSystem getOperatingSystem()
086  {
087    return DirectoryServer.getOperatingSystem();
088  }
089
090
091
092  /**
093   * Retrieves a reference to the Directory Server configuration
094   * handler.
095   *
096   * @return  A reference to the Directory Server configuration
097   *          handler.
098   */
099  public static ConfigHandler getConfigHandler()
100  {
101    return DirectoryServer.getConfigHandler();
102  }
103
104
105
106  /**
107   * Retrieves the requested entry from the Directory Server
108   * configuration.
109   *
110   * @param  entryDN  The DN of the configuration entry to retrieve.
111   *
112   * @return  The requested entry from the Directory Server
113   *          configuration.
114   *
115   * @throws  ConfigException  If a problem occurs while trying to
116   *                           retrieve the requested entry.
117   */
118  public static ConfigEntry getConfigEntry(DN entryDN)
119         throws ConfigException
120  {
121    return DirectoryServer.getConfigEntry(entryDN);
122  }
123
124
125
126  /**
127   * Retrieves the path to the root directory for this instance of the
128   * Directory Server.
129   *
130   * @return  The path to the root directory for this instance of the
131   *          Directory Server.
132  */
133  public static String getServerRoot()
134  {
135    return DirectoryServer.getServerRoot();
136  }
137
138
139
140  /**
141   * Retrieves the time that the Directory Server was started, in
142   * milliseconds since the epoch.
143   *
144   * @return  The time that the Directory Server was started, in
145   *          milliseconds since the epoch.
146   */
147  public static long getStartTime()
148  {
149    return DirectoryServer.getStartTime();
150  }
151
152
153
154  /**
155   * Retrieves the time that the Directory Server was started,
156   * formatted in UTC.
157   *
158   * @return  The time that the Directory Server was started,
159   *          formatted in UTC.
160   */
161  public static String getStartTimeUTC()
162  {
163    return DirectoryServer.getStartTimeUTC();
164  }
165
166
167
168  /**
169   * Retrieves a reference to the Directory Server schema.
170   *
171   * @return  A reference to the Directory Server schema.
172   */
173  public static Schema getSchema()
174  {
175    return DirectoryServer.getSchema();
176  }
177
178
179
180  /**
181   * Retrieves the set of matching rules registered with the Directory
182   * Server.  The mapping will be between the lowercase name or OID
183   * for each matching rule and the matching rule implementation.  The
184   * same matching rule instance may be included multiple times with
185   * different keys.  The returned map must not be altered by the
186   * caller.
187   *
188   * @return  The set of matching rules registered with the Directory
189   *          Server.
190   */
191  public static Map<String,MatchingRule> getMatchingRules()
192  {
193    return DirectoryServer.getMatchingRules();
194  }
195
196
197
198  /**
199   * Retrieves the matching rule with the specified name or OID.
200   *
201   * @param  lowerName  The lowercase name or OID for the matching
202   *                    rule to retrieve.
203   *
204   * @return  The requested matching rule, or <CODE>null</CODE> if no
205   *          such matching rule has been defined in the server.
206   */
207  public static MatchingRule getMatchingRule(String lowerName)
208  {
209    return DirectoryServer.getMatchingRule(lowerName);
210  }
211
212
213
214  /**
215   * Retrieves the approximate matching rule with the specified name
216   * or OID.
217   *
218   * @param  lowerName  The lowercase name or OID for the approximate
219   *                    matching rule to retrieve.
220   *
221   * @return  The requested approximate matching rule, or
222   *          <CODE>null</CODE> if no such matching rule has been
223   *          defined in the server.
224   */
225  public static MatchingRule
226       getApproximateMatchingRule(String lowerName)
227  {
228    return DirectoryServer.getMatchingRule(lowerName);
229  }
230
231
232
233  /**
234   * Retrieves the equality matching rule with the specified name or
235   * OID.
236   *
237   * @param  lowerName  The lowercase name or OID for the equality
238   *                    matching rule to retrieve.
239   *
240   * @return  The requested equality matching rule, or
241   *          <CODE>null</CODE> if no such matching rule has been
242   *          defined in the server.
243   */
244  public static MatchingRule
245       getEqualityMatchingRule(String lowerName)
246  {
247    return DirectoryServer.getMatchingRule(lowerName);
248  }
249
250
251
252  /**
253   * Retrieves the ordering matching rule with the specified name or
254   * OID.
255   *
256   * @param  lowerName  The lowercase name or OID for the ordering
257   *                    matching rule to retrieve.
258   *
259   * @return  The requested ordering matching rule, or
260   *          <CODE>null</CODE> if no such matching rule has been
261   *          defined in the server.
262   */
263  public static MatchingRule
264       getOrderingMatchingRule(String lowerName)
265  {
266    return DirectoryServer.getMatchingRule(lowerName);
267  }
268
269
270
271  /**
272   * Retrieves the substring matching rule with the specified name or
273   * OID.
274   *
275   * @param  lowerName  The lowercase name or OID for the substring
276   *                    matching rule to retrieve.
277   *
278   * @return  The requested substring matching rule, or
279   *          <CODE>null</CODE> if no such matching rule has been
280   *          defined in the server.
281   */
282  public static MatchingRule
283       getSubstringMatchingRule(String lowerName)
284  {
285    return DirectoryServer.getMatchingRule(lowerName);
286  }
287
288
289
290  /**
291   * Retrieves the set of objectclasses registered with the Directory
292   * Server.  The mapping will be between the lowercase name or OID
293   * for each objectclass and the objectclass implementation.  The
294   * same objectclass instance may be included multiple times with
295   * different keys.  The returned map must not be altered by the
296   * caller.
297   *
298   * @return  The set of objectclasses defined in the Directory
299   *          Server.
300   */
301  public static Map<String,ObjectClass> getObjectClasses()
302  {
303    return DirectoryServer.getObjectClasses();
304  }
305
306
307
308  /**
309   * Retrieves the objectclass for the provided lowercase name or OID.
310   * It can optionally return a generated "default" version if the
311   * requested objectclass is not defined in the schema.
312   *
313   * @param  lowerName      The lowercase name or OID for the
314   *                        objectclass to retrieve.
315   * @param  returnDefault  Indicates whether to generate a default
316   *                        version if the requested objectclass is
317   *                        not defined in the server schema.
318   *
319   * @return  The objectclass type, or <CODE>null</CODE> if there is
320   *          no objectclass with the specified name or OID defined in
321   *          the server schema and a default class should not be
322   *          returned.
323   */
324  public static ObjectClass
325       getObjectClass(String lowerName, boolean returnDefault)
326  {
327    return DirectoryServer.getObjectClass(lowerName, returnDefault);
328  }
329
330
331
332  /**
333   * Retrieves the "top" objectClass, which should be the topmost
334   * objectclass in the inheritance chain for most other
335   * objectclasses.
336   *
337   * @return  The "top" objectClass.
338   */
339  public static ObjectClass getTopObjectClass()
340  {
341    return DirectoryServer.getTopObjectClass();
342  }
343
344
345
346  /**
347   * Retrieves the set of attribute type definitions that have been
348   * defined in the Directory Server.  The mapping will be between the
349   * lowercase name or OID for each attribute type and the attribute
350   * type implementation.  The same attribute type may be included
351   * multiple times with different keys.  The returned map must not be
352   * altered by the caller.
353   *
354   * @return The set of attribute type definitions that have been
355   *         defined in the Directory Server.
356   */
357  public static Map<String,AttributeType> getAttributeTypes()
358  {
359    return DirectoryServer.getAttributeTypes();
360  }
361
362  /**
363   * Retrieves the attribute type for the "objectClass" attribute.
364   *
365   * @return  The attribute type for the "objectClass" attribute.
366   */
367  public static AttributeType getObjectClassAttributeType()
368  {
369    return DirectoryServer.getObjectClassAttributeType();
370  }
371
372
373
374  /**
375   * Retrieves the set of attribute syntaxes defined in the Directory
376   * Server.  The mapping will be between the OID and the
377   * corresponding syntax implementation.  The returned map must not
378   * be altered by the caller.
379   *
380   * @return  The set of attribute syntaxes defined in the Directory
381   *          Server.
382   */
383  public static Map<String,Syntax>
384       getAttributeSyntaxes()
385  {
386    return DirectoryServer.getAttributeSyntaxes();
387  }
388
389  /**
390   * Retrieves the default attribute syntax that should be used for
391   * attributes that are not defined in the server schema.
392   *
393   * @return  The default attribute syntax that should be used for
394   *          attributes that are not defined in the server schema.
395   */
396  public static Syntax getDefaultAttributeSyntax()
397  {
398    return DirectoryServer.getDefaultAttributeSyntax();
399  }
400
401
402
403  /**
404   * Retrieves the default attribute syntax that should be used for
405   * attributes that are not defined in the server schema and are
406   * meant to store binary values.
407   *
408   * @return  The default attribute syntax that should be used for
409   *          attributes that are not defined in the server schema and
410   *          are meant to store binary values.
411   */
412  public static Syntax getDefaultBinarySyntax()
413  {
414    return DirectoryServer.getDefaultBinarySyntax();
415  }
416
417
418
419  /**
420   * Retrieves the default attribute syntax that should be used for
421   * attributes that are not defined in the server schema and are
422   * meant to store Boolean values.
423   *
424   * @return  The default attribute syntax that should be used for
425   *          attributes that are not defined in the server schema and
426   *          are meant to store Boolean values.
427   */
428  public static Syntax getDefaultBooleanSyntax()
429  {
430    return DirectoryServer.getDefaultBooleanSyntax();
431  }
432
433
434
435  /**
436   * Retrieves the default attribute syntax that should be used for
437   * attributes that are not defined in the server schema and are
438   * meant to store DN values.
439   *
440   * @return  The default attribute syntax that should be used for
441   *          attributes that are not defined in the server schema and
442   *          are meant to store DN values.
443   */
444  public static Syntax getDefaultDNSyntax()
445  {
446    return DirectoryServer.getDefaultDNSyntax();
447  }
448
449
450
451  /**
452   * Retrieves the default attribute syntax that should be used for
453   * attributes that are not defined in the server schema and are
454   * meant to store integer values.
455   *
456   * @return  The default attribute syntax that should be used for
457   *          attributes that are not defined in the server schema and
458   *          are meant to store integer values.
459   */
460  public static Syntax getDefaultIntegerSyntax()
461  {
462    return DirectoryServer.getDefaultIntegerSyntax();
463  }
464
465
466
467  /**
468   * Retrieves the default attribute syntax that should be used for
469   * attributes that are not defined in the server schema and are
470   * meant to store string values.
471   *
472   * @return  The default attribute syntax that should be used for
473   *          attributes that are not defined in the server schema and
474   *          are meant to store string values.
475   */
476  public static Syntax getDefaultStringSyntax()
477  {
478    return DirectoryServer.getDefaultStringSyntax();
479  }
480
481
482
483  /**
484   * Retrieves the set of matching rule uses defined in the Directory
485   * Server.  The mapping will be between the matching rule and its
486   * corresponding matching rule use.  The returned map must not be
487   * altered by the caller.
488   *
489   * @return  The set of matching rule uses defined in the Directory
490   *          Server.
491   */
492  public static Map<MatchingRule,MatchingRuleUse>
493       getMatchingRuleUses()
494  {
495    return DirectoryServer.getMatchingRuleUses();
496  }
497
498
499
500  /**
501   * Retrieves the matching rule use associated with the provided
502   * matching rule.
503   *
504   * @param  matchingRule  The matching rule for which to retrieve the
505   *                       matching rule use.
506   *
507   * @return  The matching rule use for the provided matching rule, or
508   *          <CODE>null</CODE> if none is defined.
509   */
510  public static MatchingRuleUse
511       getMatchingRuleUse(MatchingRule matchingRule)
512  {
513    return DirectoryServer.getMatchingRuleUse(matchingRule);
514  }
515
516
517
518  /**
519   * Retrieves the set of DIT content rules defined in the Directory
520   * Server.  The mapping will be between the structural objectclass
521   * and its corresponding DIT content rule.  The returned map must
522   * not be altered by the caller.
523   *
524   * @return  The set of DIT content rules defined in the Directory
525   *          Server.
526   */
527  public static Map<ObjectClass,DITContentRule>
528       getDITContentRules()
529  {
530    return DirectoryServer.getDITContentRules();
531  }
532
533
534
535  /**
536   * Retrieves the DIT content rule associated with the specified
537   * objectclass.
538   *
539   * @param  objectClass  The objectclass for which to retrieve the
540   *                      associated DIT content rule.
541   *
542   * @return  The requested DIT content rule, or <CODE>null</CODE> if
543   *          no such rule is defined in the schema.
544   */
545  public static DITContentRule
546       getDITContentRule(ObjectClass objectClass)
547  {
548    return DirectoryServer.getDITContentRule(objectClass);
549  }
550
551
552
553  /**
554   * Retrieves the set of DIT structure rules defined in the Directory
555   * Server.  The mapping will be between the name form and its
556   * corresponding DIT structure rule.  The returned map must not be
557   * altered by the caller.
558   *
559   * @return  The set of DIT structure rules defined in the Directory
560   *          Server.
561   */
562  public static Map<NameForm,DITStructureRule>
563       getDITStructureRules()
564  {
565    return DirectoryServer.getDITStructureRules();
566  }
567
568
569
570  /**
571   * Retrieves the DIT structure rule associated with the provided
572   * rule ID.
573   *
574   * @param  ruleID  The rule ID for which to retrieve the associated
575   *                 DIT structure rule.
576   *
577   * @return  The requested DIT structure rule, or <CODE>null</CODE>
578   *          if no such rule is defined.
579   */
580  public static DITStructureRule getDITStructureRule(int ruleID)
581  {
582    return DirectoryServer.getDITStructureRule(ruleID);
583  }
584
585
586
587  /**
588   * Retrieves the DIT structure rule associated with the provided
589   * name form.
590   *
591   * @param  nameForm  The name form for which to retrieve the
592   *                   associated DIT structure rule.
593   *
594   * @return  The requested DIT structure rule, or <CODE>null</CODE>
595   *          if no such rule is defined.
596   */
597  public static DITStructureRule
598       getDITStructureRule(NameForm nameForm)
599  {
600    return DirectoryServer.getDITStructureRule(nameForm);
601  }
602
603
604
605  /**
606   * Retrieves the set of name forms defined in the Directory Server.
607   * The mapping will be between the structural objectclass and its
608   * corresponding name forms.  The returned map must not be altered
609   * by the caller.
610   *
611   * @return  The set of name forms defined in the Directory Server.
612   */
613  public static Map<ObjectClass,List<NameForm>> getNameForms()
614  {
615    return DirectoryServer.getNameForms();
616  }
617
618
619
620  /**
621   * Retrieves the list of name forms associated with the specified
622   * structural objectclass.
623   *
624   * @param  objectClass  The structural objectclass for which to
625   *                      retrieve the  associated name form.
626   *
627   * @return  The list of requested name forms, or <CODE>null</CODE>
628   *           if no such name form is defined in the schema.
629   */
630  public static List<NameForm> getNameForm(ObjectClass objectClass)
631  {
632    return DirectoryServer.getNameForm(objectClass);
633  }
634
635
636
637  /**
638   * Retrieves the name form associated with the specified name or
639   * OID.
640   *
641   * @param  lowerName  The name or OID of the name form to retrieve,
642   *                    formatted in all lowercase characters.
643   *
644   * @return  The requested name form, or <CODE>null</CODE> if no such
645   *          name form is defined in the schema.
646   */
647  public static NameForm getNameForm(String lowerName)
648  {
649    return DirectoryServer.getNameForm(lowerName);
650  }
651
652
653
654  /**
655   * Registers the provided invokable component with the Directory
656   * Server.
657   *
658   * @param  component  The invokable component to register.
659   */
660  public static void registerInvokableComponent(
661                                InvokableComponent component)
662  {
663    DirectoryServer.registerInvokableComponent(component);
664  }
665
666
667
668  /**
669   * Deregisters the provided invokable component with the Directory
670   * Server.
671   *
672   * @param  component  The invokable component to deregister.
673   */
674  public static void deregisterInvokableComponent(
675                                InvokableComponent component)
676  {
677    DirectoryServer.deregisterInvokableComponent(component);
678  }
679
680
681
682  /**
683   * Registers the provided alert generator with the Directory Server.
684   *
685   * @param  alertGenerator  The alert generator to register.
686   */
687  public static void registerAlertGenerator(
688                                AlertGenerator alertGenerator)
689  {
690    DirectoryServer.registerAlertGenerator(alertGenerator);
691  }
692
693
694
695  /**
696   * Deregisters the provided alert generator with the Directory
697   * Server.
698   *
699   * @param  alertGenerator  The alert generator to deregister.
700   */
701  public static void deregisterAlertGenerator(
702                                AlertGenerator alertGenerator)
703  {
704    DirectoryServer.deregisterAlertGenerator(alertGenerator);
705  }
706
707
708
709  /**
710   * Sends an alert notification with the provided information.
711   *
712   * @param  generator     The alert generator that created the alert.
713   * @param  alertType     The alert type name for this alert.
714   * @param  alertMessage  A message (possibly <CODE>null</CODE>) that
715   *                       can provide more information about this
716   *                       alert.
717   */
718  public static void
719       sendAlertNotification(AlertGenerator generator,
720                             String alertType,
721                             LocalizableMessage alertMessage)
722  {
723    DirectoryServer.sendAlertNotification(generator, alertType,
724            alertMessage);
725  }
726
727
728
729  /**
730   * Retrieves the result code that should be used when the Directory
731   * Server encounters an internal server error.
732   *
733   * @return  The result code that should be used when the Directory
734   *          Server encounters an internal server error.
735   */
736  public static ResultCode getServerErrorResultCode()
737  {
738    return DirectoryServer.getServerErrorResultCode();
739  }
740
741
742
743  /**
744   * Retrieves the entry with the requested DN.  It will first
745   * determine which backend should be used for this DN and will then
746   * use that backend to retrieve the entry.  The caller must already
747   * hold the appropriate lock on the specified entry.
748   *
749   * @param  entryDN  The DN of the entry to retrieve.
750   *
751   * @return  The requested entry, or <CODE>null</CODE> if it does not
752   *          exist.
753   *
754   * @throws  DirectoryException  If a problem occurs while attempting
755   *                              to retrieve the entry.
756   */
757  public static Entry getEntry(DN entryDN)
758         throws DirectoryException
759  {
760    return DirectoryServer.getEntry(entryDN);
761  }
762
763
764
765  /**
766   * Indicates whether the specified entry exists in the Directory
767   * Server.  The caller is not required to hold any locks when
768   * invoking this method.
769   *
770   * @param  entryDN  The DN of the entry for which to make the
771   *                  determination.
772   *
773   * @return  <CODE>true</CODE> if the specified entry exists in one
774   *          of the backends, or <CODE>false</CODE> if it does not.
775   *
776   * @throws  DirectoryException  If a problem occurs while attempting
777   *                              to make the determination.
778   */
779  public static boolean entryExists(DN entryDN)
780         throws DirectoryException
781  {
782    return DirectoryServer.entryExists(entryDN);
783  }
784
785
786
787  /**
788   * Retrieves the set of OIDs for the supported controls registered
789   * with the Directory Server.
790   *
791   * @return  The set of OIDS for the supported controls registered
792   *          with the Directory Server.
793   */
794  public static Set<String> getSupportedControls()
795  {
796    return DirectoryServer.getSupportedControls();
797  }
798
799
800
801  /**
802   * Indicates whether the specified OID is registered with the
803   * Directory Server as a supported control.
804   *
805   * @param  controlOID  The OID of the control for which to make the
806   *                     determination.
807   *
808   * @return  <CODE>true</CODE> if the specified OID is registered
809   *          with the server as a supported control, or
810   *          <CODE>false</CODE> if not.
811   */
812  public static boolean isSupportedControl(String controlOID)
813  {
814    return DirectoryServer.isSupportedControl(controlOID);
815  }
816
817
818
819  /**
820   * Registers the provided OID as a supported control for the
821   * Directory Server.  This will have no effect if the specified
822   * control OID is already present in the list of supported controls.
823   *
824   * @param  controlOID  The OID of the control to register as a
825   *                     supported control.
826   */
827  public static void registerSupportedControl(String controlOID)
828  {
829    DirectoryServer.registerSupportedControl(controlOID);
830  }
831
832
833
834  /**
835   * Deregisters the provided OID as a supported control for the
836   * Directory Server.  This will have no effect if the specified
837   * control OID is not present in the list of supported controls.
838   *
839   * @param  controlOID  The OID of the control to deregister as a
840   *                     supported control.
841   */
842  public static void
843       deregisterSupportedControl(String controlOID)
844  {
845    DirectoryServer.deregisterSupportedControl(controlOID);
846  }
847
848
849
850  /**
851   * Retrieves the set of OIDs for the supported features registered
852   * with the Directory Server.
853   *
854   * @return  The set of OIDs for the supported features registered
855   *          with the Directory Server.
856   */
857  public static Set<String> getSupportedFeatures()
858  {
859    return DirectoryServer.getSupportedFeatures();
860  }
861
862
863
864  /**
865   * Indicates whether the specified OID is registered with the
866   * Directory Server as a supported feature.
867   *
868   * @param  featureOID  The OID of the feature for which to make the
869   *                     determination.
870   *
871   * @return  <CODE>true</CODE> if the specified OID is registered
872   *          with the server as a supported feature, or
873   *          <CODE>false</CODE> if not.
874   */
875  public static boolean isSupportedFeature(String featureOID)
876  {
877    return DirectoryServer.isSupportedFeature(featureOID);
878  }
879
880
881
882  /**
883   * Registers the provided OID as a supported feature for the
884   * Directory Server.  This will have no effect if the specified
885   * feature OID is already present in the list of supported features.
886   *
887   * @param  featureOID  The OID of the feature to register as a
888   *                     supported feature.
889   */
890  public static void registerSupportedFeature(String featureOID)
891  {
892    DirectoryServer.registerSupportedFeature(featureOID);
893  }
894
895
896
897  /**
898   * Deregisters the provided OID as a supported feature for the
899   * Directory Server.  This will have no effect if the specified
900   * feature OID is not present in the list of supported features.
901   *
902   * @param  featureOID  The OID of the feature to deregister as a
903   *                     supported feature.
904   */
905  public static void
906       deregisterSupportedFeature(String featureOID)
907  {
908    DirectoryServer.deregisterSupportedFeature(featureOID);
909  }
910
911
912
913  /**
914   * Retrieves the set of extended operations that may be processed by
915   * the Directory Server.  The mapping will be between the OID and
916   * the extended operation handler providing the logic for the
917   * extended operation with that OID.  The returned map must not be
918   * altered by the caller.
919   *
920   * @return  The set of extended operations that may be processed by
921   *          the Directory Server.
922   */
923  public static Map<String,ExtendedOperationHandler>
924                     getSupportedExtensions()
925  {
926    return DirectoryServer.getSupportedExtensions();
927  }
928
929
930
931  /**
932   * Retrieves the handler for the extended operation for the provided
933   * extended operation OID.
934   *
935   * @param  oid  The OID of the extended operation to retrieve.
936   *
937   * @return  The handler for the specified extended operation, or
938   *          <CODE>null</CODE> if there is none.
939   */
940  public static ExtendedOperationHandler
941       getExtendedOperationHandler(String oid)
942  {
943    return DirectoryServer.getExtendedOperationHandler(oid);
944  }
945
946
947
948  /**
949   * Registers the provided extended operation handler with the
950   * Directory Server.
951   *
952   * @param  oid      The OID for the extended operation to register.
953   * @param  handler  The extended operation handler to register with
954   *                  the Directory Server.
955   */
956  public static void registerSupportedExtension(String oid,
957                          ExtendedOperationHandler handler)
958  {
959    DirectoryServer.registerSupportedExtension(oid, handler);
960  }
961
962
963
964  /**
965   * Deregisters the provided extended operation handler with the
966   * Directory Server.
967   *
968   * @param  oid  The OID for the extended operation to deregister.
969   */
970  public static void deregisterSupportedExtension(String oid)
971  {
972    DirectoryServer.deregisterSupportedExtension(oid);
973  }
974
975
976
977  /**
978   * Retrieves the set of SASL mechanisms that are supported by the
979   * Directory Server.  The mapping will be between the mechanism name
980   * and the SASL mechanism handler that implements support for that
981   * mechanism.  The returned map must not be altered by the caller.
982   *
983   * @return  The set of SASL mechanisms that are supported by the
984   *          Directory Server.
985   */
986  public static Map<String,SASLMechanismHandler>
987                     getSupportedSASLMechanisms()
988  {
989    return DirectoryServer.getSupportedSASLMechanisms();
990  }
991
992
993
994  /**
995   * Retrieves the handler for the specified SASL mechanism.
996   *
997   * @param  name  The name of the SASL mechanism to retrieve.
998   *
999   * @return  The handler for the specified SASL mechanism, or
1000   *          <CODE>null</CODE> if there is none.
1001   */
1002  public static SASLMechanismHandler
1003       getSASLMechanismHandler(String name)
1004  {
1005    return DirectoryServer.getSASLMechanismHandler(name);
1006  }
1007
1008
1009
1010  /**
1011   * Registers the provided SASL mechanism handler with the Directory
1012   * Server.
1013   *
1014   * @param  name     The name of the SASL mechanism to be registered.
1015   * @param  handler  The SASL mechanism handler to register with the
1016   *                  Directory Server.
1017   */
1018  public static void
1019       registerSASLMechanismHandler(String name,
1020                                    SASLMechanismHandler handler)
1021  {
1022    DirectoryServer.registerSASLMechanismHandler(name, handler);
1023  }
1024
1025
1026
1027  /**
1028   * Deregisters the provided SASL mechanism handler with the
1029   * Directory Server.
1030   *
1031   * @param  name  The name of the SASL mechanism to be deregistered.
1032   */
1033  public static void deregisterSASLMechanismHandler(String name)
1034  {
1035    DirectoryServer.deregisterSASLMechanismHandler(name);
1036  }
1037
1038  /**
1039   * Registers the provided shutdown listener with the Directory
1040   * Server so that it will be notified when the server shuts down.
1041   *
1042   * @param  listener  The shutdown listener to register with the
1043   *                   Directory Server.
1044   */
1045  public static void
1046       registerShutdownListener(ServerShutdownListener listener)
1047  {
1048    DirectoryServer.registerShutdownListener(listener);
1049  }
1050
1051
1052
1053  /**
1054   * Deregisters the provided shutdown listener with the Directory
1055   * Server.
1056   *
1057   * @param  listener  The shutdown listener to deregister with the
1058   *                   Directory Server.
1059   */
1060  public static void
1061       deregisterShutdownListener(ServerShutdownListener listener)
1062  {
1063    DirectoryServer.deregisterShutdownListener(listener);
1064  }
1065
1066
1067
1068  /**
1069   * Retrieves the full version string for the Directory Server.
1070   *
1071   * @return  The full version string for the Directory Server.
1072   */
1073  public static String getVersionString()
1074  {
1075    return DirectoryServer.getVersionString();
1076  }
1077}
1078