Package com.unboundid.ldap.sdk
Class RootDSE
- java.lang.Object
-
- com.unboundid.ldap.sdk.Entry
-
- com.unboundid.ldap.sdk.ReadOnlyEntry
-
- com.unboundid.ldap.sdk.RootDSE
-
- All Implemented Interfaces:
LDIFRecord,java.io.Serializable
- Direct Known Subclasses:
UnboundIDRootDSE
@NotExtensible @NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public class RootDSE extends ReadOnlyEntry
This class provides a data structure for representing the directory server root DSE. This entry provides information about the capabilities of the directory server, server vendor and version information, and published naming contexts.
Note a root DSE object instance represents a read-only version of an entry, so all read operations allowed for an entry will succeed, but all write attempts will be rejected.
Example
The following example demonstrates the process for retrieving the root DSE of a directory server and using it to determine whether it supports theServerSideSortRequestControl:RootDSE rootDSE = connection.getRootDSE(); if (rootDSE.supportsControl( ServerSideSortRequestControl.SERVER_SIDE_SORT_REQUEST_OID)) { // The directory server does support the server-side sort control. } else { // The directory server does not support the server-side sort control. }- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringATTR_ALT_SERVERThe name of the attribute that includes a set of URIs (likely in the form of LDAP URLs) of other servers that may be contacted if the target server is unavailable, as defined in RFC 4512 section 5.1.static java.lang.StringATTR_CHANGELOG_DNThe name of the attribute that specifies the DN that is the base of the LDAP changelog data, if available, as defined in draft-good-ldap-changelog.static java.lang.StringATTR_FIRST_CHANGE_NUMBERThe name of the attribute that may contain the change number for the first entry in the LDAP changelog.static java.lang.StringATTR_LAST_CHANGE_NUMBERThe name of the attribute that may contain the change number for the last entry in the LDAP changelog, if available.static java.lang.StringATTR_LAST_PURGED_CHANGE_NUMBERThe name of the attribute that may contain the change number for the last entry purged from the LDAP changelog, if available.static java.lang.StringATTR_NAMING_CONTEXTThe name of the attribute that includes the DNs of the public naming contexts defined in the server, as defined in RFC 4512 section 5.1.static java.lang.StringATTR_SUBSCHEMA_SUBENTRYThe name of the attribute that specifies the DN of the subschema subentry that serves the server root DSE, as defined in RFC 4512 section 4.2.static java.lang.StringATTR_SUPPORTED_AUTH_PASSWORD_STORAGE_SCHEMEThe name of the attribute that includes the names of the supported authentication password storage schemes, as defined in RFC 3112.static java.lang.StringATTR_SUPPORTED_CONTROLThe name of the attribute that includes the OIDs of the request controls supported by the server, as defined in RFC 4512 section 5.1.static java.lang.StringATTR_SUPPORTED_EXTENDED_OPERATIONThe name of the attribute that includes the OIDs of the extended operations supported by the server, as defined in RFC 4512 section 5.1.static java.lang.StringATTR_SUPPORTED_FEATUREThe name of the attribute that includes the OIDs of the features supported by the server, as defined in RFC 4512 section 5.1.static java.lang.StringATTR_SUPPORTED_LDAP_VERSIONThe name of the attribute that includes the OIDs of the LDAP protocol versions supported by the server, as defined in RFC 4512 section 5.1.static java.lang.StringATTR_SUPPORTED_SASL_MECHANISMThe name of the attribute that includes the names of the SASL mechanisms supported by the server, as defined in RFC 4512 section 5.1.static java.lang.StringATTR_VENDOR_NAMEThe name of the attribute that includes the name of the server vendor, as defined in RFC 3045.static java.lang.StringATTR_VENDOR_VERSIONThe name of the attribute that includes the server version, as defined in RFC 3045.protected static java.lang.String[]REQUEST_ATTRSThe set of request attributes to use when attempting to retrieve the server root DSE.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getAltServerURIs()Retrieves a set of URIs for alternate servers that may be contacted if the current server becomes unavailable.java.lang.StringgetChangelogDN()Retrieves the DN of the base entry for the directory server changelog information, if available.java.lang.LonggetFirstChangeNumber()Retrieves the change number for the first entry contained in the LDAP changelog, if available.java.lang.LonggetLastChangeNumber()Retrieves the change number for the last entry contained in the LDAP changelog, if available.java.lang.LonggetLastPurgedChangeNumber()Retrieves the change number for the last entry purged from the LDAP changelog, if available.java.lang.String[]getNamingContextDNs()Retrieves the DNs of the naming contexts provided by the directory server.static RootDSEgetRootDSE(LDAPInterface connection)Retrieves the directory server root DSE using the provided connection.java.lang.StringgetSubschemaSubentryDN()Retrieves the DN of the subschema subentry that serves the directory server root DSE.java.lang.String[]getSupportedAuthPasswordSchemeNames()Retrieves the names of the authentication password storage schemes supported by the server.java.lang.String[]getSupportedControlOIDs()Retrieves the OIDs of the supported request controls advertised by the server root DSE.java.lang.String[]getSupportedExtendedOperationOIDs()Retrieves the OIDs of the supported extended operations advertised by the server root DSE.java.lang.String[]getSupportedFeatureOIDs()Retrieves the OIDs of the supported features advertised by the server root DSE.int[]getSupportedLDAPVersions()Retrieves the supported LDAP protocol versions advertised by the server root DSE.java.lang.String[]getSupportedSASLMechanismNames()Retrieves the names of the supported SASL mechanisms advertised by the server root DSE.java.lang.StringgetVendorName()Retrieves the name of the directory server vendor, if available.java.lang.StringgetVendorVersion()Retrieves the directory server version string, if available.booleansupportsAuthPasswordScheme(java.lang.String scheme)Indicates whether the directory server indicates that it supports the specified authentication password storage scheme.booleansupportsControl(java.lang.String controlOID)Indicates whether the directory server indicates that it supports the request control with the provided OID.booleansupportsExtendedOperation(java.lang.String extendedOperationOID)Indicates whether the directory server indicates that it supports the extended operation with the provided OID.booleansupportsFeature(java.lang.String featureOID)Indicates whether the directory server indicates that it supports the extended operation with the provided OID.booleansupportsLDAPVersion(int ldapVersion)Indicates whether the directory server indicates that it supports the provided LDAP protocol version.booleansupportsSASLMechanism(java.lang.String mechanismName)Indicates whether the directory server indicates that it supports the specified SASL mechanism.-
Methods inherited from class com.unboundid.ldap.sdk.ReadOnlyEntry
addAttribute, addAttribute, addAttribute, addAttribute, addAttribute, removeAttribute, removeAttributeValue, removeAttributeValue, removeAttributeValues, removeAttributeValues, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setDN, setDN
-
Methods inherited from class com.unboundid.ldap.sdk.Entry
addAttribute, applyModifications, applyModifications, applyModifyDN, applyModifyDN, diff, diff, diff, duplicate, equals, getAttribute, getAttribute, getAttributes, getAttributesWithOptions, getAttributeValue, getAttributeValueAsBoolean, getAttributeValueAsDate, getAttributeValueAsDN, getAttributeValueAsInteger, getAttributeValueAsLong, getAttributeValueByteArrays, getAttributeValueBytes, getAttributeValues, getDN, getObjectClassAttribute, getObjectClassValues, getParentDN, getParentDNString, getParsedDN, getRDN, getSchema, hasAttribute, hasAttribute, hasAttribute, hasAttributeValue, hasAttributeValue, hasAttributeValue, hasAttributeValue, hashCode, hasObjectClass, intersectEntries, matchesBaseAndScope, matchesBaseAndScope, mergeEntries, removeAttributeValue, removeAttributeValue, setAttribute, toLDIF, toLDIF, toLDIF, toLDIF, toLDIFString, toLDIFString, toLDIFString, toLDIFString, toString, toString
-
-
-
-
Field Detail
-
ATTR_ALT_SERVER
@NotNull public static final java.lang.String ATTR_ALT_SERVER
The name of the attribute that includes a set of URIs (likely in the form of LDAP URLs) of other servers that may be contacted if the target server is unavailable, as defined in RFC 4512 section 5.1.- See Also:
- Constant Field Values
-
ATTR_CHANGELOG_DN
@NotNull public static final java.lang.String ATTR_CHANGELOG_DN
The name of the attribute that specifies the DN that is the base of the LDAP changelog data, if available, as defined in draft-good-ldap-changelog.- See Also:
- Constant Field Values
-
ATTR_FIRST_CHANGE_NUMBER
@NotNull public static final java.lang.String ATTR_FIRST_CHANGE_NUMBER
The name of the attribute that may contain the change number for the first entry in the LDAP changelog. This is not defined in any public specification, but is provided by a number of servers which implement draft-good-ldap-changelog.- See Also:
- Constant Field Values
-
ATTR_LAST_CHANGE_NUMBER
@NotNull public static final java.lang.String ATTR_LAST_CHANGE_NUMBER
The name of the attribute that may contain the change number for the last entry in the LDAP changelog, if available. This is not defined in any public specification, but is provided by a number of servers which implement draft-good-ldap-changelog.- See Also:
- Constant Field Values
-
ATTR_LAST_PURGED_CHANGE_NUMBER
@NotNull public static final java.lang.String ATTR_LAST_PURGED_CHANGE_NUMBER
The name of the attribute that may contain the change number for the last entry purged from the LDAP changelog, if available. This is not defined in any public specification, but is provided by a number of servers which implement draft-good-ldap-changelog.- See Also:
- Constant Field Values
-
ATTR_NAMING_CONTEXT
@NotNull public static final java.lang.String ATTR_NAMING_CONTEXT
The name of the attribute that includes the DNs of the public naming contexts defined in the server, as defined in RFC 4512 section 5.1.- See Also:
- Constant Field Values
-
ATTR_SUBSCHEMA_SUBENTRY
@NotNull public static final java.lang.String ATTR_SUBSCHEMA_SUBENTRY
The name of the attribute that specifies the DN of the subschema subentry that serves the server root DSE, as defined in RFC 4512 section 4.2.- See Also:
- Constant Field Values
-
ATTR_SUPPORTED_AUTH_PASSWORD_STORAGE_SCHEME
@NotNull public static final java.lang.String ATTR_SUPPORTED_AUTH_PASSWORD_STORAGE_SCHEME
The name of the attribute that includes the names of the supported authentication password storage schemes, as defined in RFC 3112.- See Also:
- Constant Field Values
-
ATTR_SUPPORTED_CONTROL
@NotNull public static final java.lang.String ATTR_SUPPORTED_CONTROL
The name of the attribute that includes the OIDs of the request controls supported by the server, as defined in RFC 4512 section 5.1.- See Also:
- Constant Field Values
-
ATTR_SUPPORTED_EXTENDED_OPERATION
@NotNull public static final java.lang.String ATTR_SUPPORTED_EXTENDED_OPERATION
The name of the attribute that includes the OIDs of the extended operations supported by the server, as defined in RFC 4512 section 5.1.- See Also:
- Constant Field Values
-
ATTR_SUPPORTED_FEATURE
@NotNull public static final java.lang.String ATTR_SUPPORTED_FEATURE
The name of the attribute that includes the OIDs of the features supported by the server, as defined in RFC 4512 section 5.1.- See Also:
- Constant Field Values
-
ATTR_SUPPORTED_LDAP_VERSION
@NotNull public static final java.lang.String ATTR_SUPPORTED_LDAP_VERSION
The name of the attribute that includes the OIDs of the LDAP protocol versions supported by the server, as defined in RFC 4512 section 5.1.- See Also:
- Constant Field Values
-
ATTR_SUPPORTED_SASL_MECHANISM
@NotNull public static final java.lang.String ATTR_SUPPORTED_SASL_MECHANISM
The name of the attribute that includes the names of the SASL mechanisms supported by the server, as defined in RFC 4512 section 5.1.- See Also:
- Constant Field Values
-
ATTR_VENDOR_NAME
@NotNull public static final java.lang.String ATTR_VENDOR_NAME
The name of the attribute that includes the name of the server vendor, as defined in RFC 3045.- See Also:
- Constant Field Values
-
ATTR_VENDOR_VERSION
@NotNull public static final java.lang.String ATTR_VENDOR_VERSION
The name of the attribute that includes the server version, as defined in RFC 3045.- See Also:
- Constant Field Values
-
REQUEST_ATTRS
@NotNull protected static final java.lang.String[] REQUEST_ATTRS
The set of request attributes to use when attempting to retrieve the server root DSE. It will attempt to retrieve all operational attributes if the server supports that capability, but will also attempt to retrieve specific attributes by name in case it does not.
-
-
Method Detail
-
getRootDSE
@Nullable public static RootDSE getRootDSE(@NotNull LDAPInterface connection) throws LDAPException
Retrieves the directory server root DSE using the provided connection.- Parameters:
connection- The connection to use to retrieve the server root DSE.- Returns:
- The directory server root DSE, or
nullif it is not available (e.g., the client does not have permission to read the entry). - Throws:
LDAPException- If a problem occurs while attempting to retrieve the server root DSE.
-
getAltServerURIs
@Nullable public final java.lang.String[] getAltServerURIs()
Retrieves a set of URIs for alternate servers that may be contacted if the current server becomes unavailable.- Returns:
- A set of URIs for alternate servers that may be contacted if the
current server becomes available, or
nullif the server does not publish that information.
-
getChangelogDN
@Nullable public final java.lang.String getChangelogDN()
Retrieves the DN of the base entry for the directory server changelog information, if available.- Returns:
- The DN of the base entry for the directory server changelog
information, or
nullif the server does not publish that information or no changelog is available.
-
getFirstChangeNumber
@Nullable public final java.lang.Long getFirstChangeNumber()
Retrieves the change number for the first entry contained in the LDAP changelog, if available.- Returns:
- The change number for the first entry contained in the LDAP changelog, if available.
-
getLastChangeNumber
@Nullable public final java.lang.Long getLastChangeNumber()
Retrieves the change number for the last entry contained in the LDAP changelog, if available.- Returns:
- The change number for the last entry contained in the LDAP changelog, if available.
-
getLastPurgedChangeNumber
@Nullable public final java.lang.Long getLastPurgedChangeNumber()
Retrieves the change number for the last entry purged from the LDAP changelog, if available.- Returns:
- The change number for the last entry purged from the LDAP changelog, if available.
-
getNamingContextDNs
@Nullable public final java.lang.String[] getNamingContextDNs()
Retrieves the DNs of the naming contexts provided by the directory server.- Returns:
- The DNs of the naming contexts provided by the directory server,
or
nullif the server does not publish that information.
-
getSubschemaSubentryDN
@Nullable public final java.lang.String getSubschemaSubentryDN()
Retrieves the DN of the subschema subentry that serves the directory server root DSE.- Returns:
- The DN of the subschema subentry that serves the directory server
root DSE, or
nullif the server does not publish that information.
-
getSupportedAuthPasswordSchemeNames
@Nullable public final java.lang.String[] getSupportedAuthPasswordSchemeNames()
Retrieves the names of the authentication password storage schemes supported by the server.- Returns:
- The names of the authentication password storage schemes supported
by the server, or
nullif the server does not publish that information.
-
supportsAuthPasswordScheme
public final boolean supportsAuthPasswordScheme(@NotNull java.lang.String scheme)
Indicates whether the directory server indicates that it supports the specified authentication password storage scheme.- Parameters:
scheme- The name of the authentication password storage scheme for which to make the determination. It must not benull.- Returns:
trueif the directory server indicates that it supports the specified authentication password storage scheme, orfalseif it does not.
-
getSupportedControlOIDs
@Nullable public final java.lang.String[] getSupportedControlOIDs()
Retrieves the OIDs of the supported request controls advertised by the server root DSE.- Returns:
- The OIDs of the supported request controls advertised by the
server root DSE, or
nullif the server does not publish that information.
-
supportsControl
public final boolean supportsControl(@NotNull java.lang.String controlOID)
Indicates whether the directory server indicates that it supports the request control with the provided OID.- Parameters:
controlOID- The OID of the control for which to make the determination. It must not benull.- Returns:
trueif the server indicates that it supports the request control with the specified OID, orfalseif it does not.
-
getSupportedExtendedOperationOIDs
@Nullable public final java.lang.String[] getSupportedExtendedOperationOIDs()
Retrieves the OIDs of the supported extended operations advertised by the server root DSE.- Returns:
- The OIDs of the supported extended operations advertised by the
server root DSE, or
nullif the server does not publish that information.
-
supportsExtendedOperation
public final boolean supportsExtendedOperation(@NotNull java.lang.String extendedOperationOID)
Indicates whether the directory server indicates that it supports the extended operation with the provided OID.- Parameters:
extendedOperationOID- The OID of the extended operation for which to make the determination. It must not benull.- Returns:
trueif the server indicates that it supports the extended operation with the specified OID, orfalseif it does not.
-
getSupportedFeatureOIDs
@Nullable public final java.lang.String[] getSupportedFeatureOIDs()
Retrieves the OIDs of the supported features advertised by the server root DSE.- Returns:
- The OIDs of the supported features advertised by the server root
DSE, or
nullif the server does not publish that information.
-
supportsFeature
public final boolean supportsFeature(@NotNull java.lang.String featureOID)
Indicates whether the directory server indicates that it supports the extended operation with the provided OID.- Parameters:
featureOID- The OID of the feature for which to make the determination. It must not benull.- Returns:
trueif the server indicates that it supports the feature with the specified OID, orfalseif it does not.
-
getSupportedLDAPVersions
@Nullable public final int[] getSupportedLDAPVersions()
Retrieves the supported LDAP protocol versions advertised by the server root DSE.- Returns:
- The supported LDAP protocol versions advertised by the server
root DSE, or
nullif the server does not publish that information.
-
supportsLDAPVersion
public final boolean supportsLDAPVersion(int ldapVersion)
Indicates whether the directory server indicates that it supports the provided LDAP protocol version.- Parameters:
ldapVersion- The LDAP protocol version for which to make the determination.- Returns:
trueif the server indicates that it supports the specified LDAP protocol version, orfalseif it does not.
-
getSupportedSASLMechanismNames
@Nullable public final java.lang.String[] getSupportedSASLMechanismNames()
Retrieves the names of the supported SASL mechanisms advertised by the server root DSE.- Returns:
- The names of the supported SASL mechanisms advertised by the
server root DSE, or
nullif the server does not publish that information.
-
supportsSASLMechanism
public final boolean supportsSASLMechanism(@NotNull java.lang.String mechanismName)
Indicates whether the directory server indicates that it supports the specified SASL mechanism.- Parameters:
mechanismName- The name of the SASL mechanism for which to make the determination. It must not benull.- Returns:
trueif the server indicates that it supports the specified SASL mechanism, orfalseif it does not.
-
getVendorName
@Nullable public final java.lang.String getVendorName()
Retrieves the name of the directory server vendor, if available.- Returns:
- The name of the directory server vendor, or
nullif the server does not publish that information.
-
getVendorVersion
@Nullable public final java.lang.String getVendorVersion()
Retrieves the directory server version string, if available.- Returns:
- The directory server version string, or
nullif the server does not publish that information.
-
-