Class ReadOnlyInMemoryDirectoryServerConfig

    • Constructor Detail

    • Method Detail

      • setBaseDNs

        public void setBaseDNs​(java.lang.String... baseDNs)
                        throws LDAPException,
                               java.lang.UnsupportedOperationException
        Specifies the set of base DNs that should be used for the directory server. This method will always throw an UnsupportedOperationException.
        Overrides:
        setBaseDNs in class InMemoryDirectoryServerConfig
        Parameters:
        baseDNs - The set of base DNs that should be used for the directory server. It must not be null or empty.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
        LDAPException - If the provided set of base DN strings is null or empty, or if any of the provided base DN strings cannot be parsed as a valid DN.
      • setBaseDNs

        public void setBaseDNs​(DN... baseDNs)
                        throws LDAPException,
                               java.lang.UnsupportedOperationException
        Specifies the set of base DNs that should be used for the directory server. This method will always throw an UnsupportedOperationException.
        Overrides:
        setBaseDNs in class InMemoryDirectoryServerConfig
        Parameters:
        baseDNs - The set of base DNs that should be used for the directory server. It must not be null or empty.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
        LDAPException - If the provided set of base DNs is null or empty.
      • setListenerConfigs

        public void setListenerConfigs​(InMemoryListenerConfig... listenerConfigs)
                                throws java.lang.UnsupportedOperationException
        Specifies the configurations for all listeners that should be used for the directory server. This method will always throw an UnsupportedOperationException.
        Overrides:
        setListenerConfigs in class InMemoryDirectoryServerConfig
        Parameters:
        listenerConfigs - The configurations for all listeners that should be used for the directory server. It must not be null or empty, and it must not contain multiple configurations with the same name.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setListenerConfigs

        public void setListenerConfigs​(java.util.Collection<InMemoryListenerConfig> listenerConfigs)
                                throws java.lang.UnsupportedOperationException
        Specifies the configurations for all listeners that should be used for the directory server. This method will always throw an UnsupportedOperationException.
        Overrides:
        setListenerConfigs in class InMemoryDirectoryServerConfig
        Parameters:
        listenerConfigs - The configurations for all listeners that should be used for the directory server. It must not be null or empty, and it must not contain multiple configurations with the same name.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • getAllowedOperationTypes

        public java.util.Set<OperationTypegetAllowedOperationTypes()
        Retrieves the set of operation types that will be allowed by the server. Note that if the server is configured to support StartTLS, then it will be allowed even if other types of extended operations are not allowed. The returned set will not be modifiable.
        Overrides:
        getAllowedOperationTypes in class InMemoryDirectoryServerConfig
        Returns:
        The set of operation types that will be allowed by the server.
      • setAllowedOperationTypes

        public void setAllowedOperationTypes​(OperationType... operationTypes)
                                      throws java.lang.UnsupportedOperationException
        Specifies the set of operation types that will be allowed by the server. Note that if the server is configured to support StartTLS, then it will be allowed even if other types of extended operations are not allowed. This method will always throw an UnsupportedOperationException.
        Overrides:
        setAllowedOperationTypes in class InMemoryDirectoryServerConfig
        Parameters:
        operationTypes - The set of operation types that will be allowed by the server.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setAllowedOperationTypes

        public void setAllowedOperationTypes​(java.util.Collection<OperationType> operationTypes)
                                      throws java.lang.UnsupportedOperationException
        Specifies the set of operation types that will be allowed by the server. Note that if the server is configured to support StartTLS, then it will be allowed even if other types of extended operations are not allowed. This method will always throw an UnsupportedOperationException.
        Overrides:
        setAllowedOperationTypes in class InMemoryDirectoryServerConfig
        Parameters:
        operationTypes - The set of operation types that will be allowed by the server.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • getAuthenticationRequiredOperationTypes

        public java.util.Set<OperationTypegetAuthenticationRequiredOperationTypes()
        Retrieves the set of operation types that will only be allowed for authenticated clients. Note that authentication will never be required for bind operations, and if the server is configured to support StartTLS, then authentication will never be required for StartTLS operations even if it is required for other types of extended operations. The returned set will not be modifiable.
        Overrides:
        getAuthenticationRequiredOperationTypes in class InMemoryDirectoryServerConfig
        Returns:
        The set of operation types that will only be allowed for authenticated clients.
      • setAuthenticationRequiredOperationTypes

        public void setAuthenticationRequiredOperationTypes​(OperationType... operationTypes)
                                                     throws java.lang.UnsupportedOperationException
        Specifies the set of operation types that will only be allowed for authenticated clients. Note that authentication will never be required for bind operations, and if the server is configured to support StartTLS, then authentication will never be required for StartTLS operations even if it is required for other types of extended operations. This method will always throw an UnsupportedOperationException.
        Overrides:
        setAuthenticationRequiredOperationTypes in class InMemoryDirectoryServerConfig
        Parameters:
        operationTypes - The set of operation types that will be allowed for authenticated clients.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setAuthenticationRequiredOperationTypes

        public void setAuthenticationRequiredOperationTypes​(java.util.Collection<OperationType> operationTypes)
                                                     throws java.lang.UnsupportedOperationException
        Specifies the set of operation types that will only be allowed for authenticated clients. Note that authentication will never be required for bind operations, and if the server is configured to support StartTLS, then authentication will never be required for StartTLS operations even if it is required for other types of extended operations. This method will always throw an UnsupportedOperationException.
        Overrides:
        setAuthenticationRequiredOperationTypes in class InMemoryDirectoryServerConfig
        Parameters:
        operationTypes - The set of operation types that will be allowed for authenticated clients.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • getAdditionalBindCredentials

        public java.util.Map<DN,​byte[]> getAdditionalBindCredentials()
        Retrieves a map containing DNs and passwords of additional users that will be allowed to bind to the server, even if their entries do not exist in the data set. This can be used to mimic the functionality of special administrative accounts (e.g., "cn=Directory Manager" in many directories). The map that is returned may be altered if desired. The returned map will not be modifiable.
        Overrides:
        getAdditionalBindCredentials in class InMemoryDirectoryServerConfig
        Returns:
        A map containing DNs and passwords of additional users that will be allowed to bind to the server, even if their entries do not exist in the data set.
      • addAdditionalBindCredentials

        public void addAdditionalBindCredentials​(java.lang.String dn,
                                                 java.lang.String password)
                                          throws LDAPException,
                                                 java.lang.UnsupportedOperationException
        Adds an additional bind DN and password combination that can be used to bind to the server, even if the corresponding entry does not exist in the data set. This can be used to mimic the functionality of special administrative accounts (e.g., "cn=Directory Manager" in many directories). If a password has already been defined for the given DN, then it will be replaced with the newly-supplied password. This method will always throw an UnsupportedOperationException.
        Overrides:
        addAdditionalBindCredentials in class InMemoryDirectoryServerConfig
        Parameters:
        dn - The bind DN to allow. It must not be null or represent the null DN.
        password - The password for the provided bind DN. It must not be null or empty.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
        LDAPException - If there is a problem with the provided bind DN or password.
      • addAdditionalBindCredentials

        public void addAdditionalBindCredentials​(java.lang.String dn,
                                                 byte[] password)
                                          throws LDAPException,
                                                 java.lang.UnsupportedOperationException
        Adds an additional bind DN and password combination that can be used to bind to the server, even if the corresponding entry does not exist in the data set. This can be used to mimic the functionality of special administrative accounts (e.g., "cn=Directory Manager" in many directories). If a password has already been defined for the given DN, then it will be replaced with the newly-supplied password. This method will always throw an UnsupportedOperationException.
        Overrides:
        addAdditionalBindCredentials in class InMemoryDirectoryServerConfig
        Parameters:
        dn - The bind DN to allow. It must not be null or represent the null DN.
        password - The password for the provided bind DN. It must not be null or empty.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
        LDAPException - If there is a problem with the provided bind DN or password.
      • setListenerExceptionHandler

        public void setListenerExceptionHandler​(LDAPListenerExceptionHandler exceptionHandler)
                                         throws java.lang.UnsupportedOperationException
        Specifies the LDAP listener exception handler that the server should use to handle any errors encountered while attempting to interact with a client. This method will always throw an UnsupportedOperationException.
        Overrides:
        setListenerExceptionHandler in class InMemoryDirectoryServerConfig
        Parameters:
        exceptionHandler - The LDAP listener exception handler that the server should use to handle any errors encountered while attempting to interact with a client. It may be null if no exception handler should be used.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setSchema

        public void setSchema​(Schema schema)
                       throws java.lang.UnsupportedOperationException
        Specifies the schema that should be used by the server. If a schema is defined, then it will be used to validate entries and determine which matching rules should be used for various types of matching operations. This method will always throw an UnsupportedOperationException.
        Overrides:
        setSchema in class InMemoryDirectoryServerConfig
        Parameters:
        schema - The schema that should be used by the server. It may be null if no schema should be used.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setEnforceAttributeSyntaxCompliance

        public void setEnforceAttributeSyntaxCompliance​(boolean enforceAttributeSyntaxCompliance)
        Specifies whether the server should reject attribute values which violate the constraints of the associated syntax. This setting will be ignored if a null schema is in place. This method will always throw an UnsupportedOperationException.
        Overrides:
        setEnforceAttributeSyntaxCompliance in class InMemoryDirectoryServerConfig
        Parameters:
        enforceAttributeSyntaxCompliance - Indicates whether the server should reject attribute values which violate the constraints of the associated syntax.
      • setEnforceSingleStructuralObjectClass

        public void setEnforceSingleStructuralObjectClass​(boolean enforceSingleStructuralObjectClass)
        Specifies whether the server should reject entries which do not contain exactly one structural object class. This setting will be ignored if a null schema is in place. This method will always throw an UnsupportedOperationException.
        Overrides:
        setEnforceSingleStructuralObjectClass in class InMemoryDirectoryServerConfig
        Parameters:
        enforceSingleStructuralObjectClass - Indicates whether the server should reject entries which do not contain exactly one structural object class.
      • setAccessLogHandler

        public void setAccessLogHandler​(java.util.logging.Handler accessLogHandler)
                                 throws java.lang.UnsupportedOperationException
        Specifies the log handler that should be used to record access log messages about operations processed by the server. This method will always throw an UnsupportedOperationException.
        Overrides:
        setAccessLogHandler in class InMemoryDirectoryServerConfig
        Parameters:
        accessLogHandler - The log handler that should be used to record access log messages about operations processed by the server. It may be null if no access logging should be performed.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setLDAPDebugLogHandler

        public void setLDAPDebugLogHandler​(java.util.logging.Handler ldapDebugLogHandler)
                                    throws java.lang.UnsupportedOperationException
        Specifies the log handler that should be used to record detailed messages about LDAP communication to and from the server, which may be useful for debugging purposes. This method will always throw an UnsupportedOperationException.
        Overrides:
        setLDAPDebugLogHandler in class InMemoryDirectoryServerConfig
        Parameters:
        ldapDebugLogHandler - The log handler that should be used to record detailed messages about LDAP communication to and from the server. It may be null if no LDAP debug logging should be performed.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • addExtendedOperationHandler

        public void addExtendedOperationHandler​(InMemoryExtendedOperationHandler handler)
                                         throws java.lang.UnsupportedOperationException
        Adds the provided extended operation handler for use by the server for processing certain types of extended operations. This method will always throw an UnsupportedOperationException.
        Overrides:
        addExtendedOperationHandler in class InMemoryDirectoryServerConfig
        Parameters:
        handler - The extended operation handler that should be used by the server for processing certain types of extended operations.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • getSASLBindHandlers

        public java.util.List<InMemorySASLBindHandlergetSASLBindHandlers()
        Retrieves a list of the SASL bind handlers that may be used to process SASL bind requests in the server. The contents of the list may be altered by the caller. The returned list will not be modifiable.
        Overrides:
        getSASLBindHandlers in class InMemoryDirectoryServerConfig
        Returns:
        An updatable list of the SASL bind handlers that may be used to process SASL bind requests in the server.
      • addSASLBindHandler

        public void addSASLBindHandler​(InMemorySASLBindHandler handler)
                                throws java.lang.UnsupportedOperationException
        Adds the provided SASL bind handler for use by the server for processing certain types of SASL bind requests. This method will always throw an UnsupportedOperationException.
        Overrides:
        addSASLBindHandler in class InMemoryDirectoryServerConfig
        Parameters:
        handler - The SASL bind handler that should be used by the server for processing certain types of SASL bind requests.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setGenerateOperationalAttributes

        public void setGenerateOperationalAttributes​(boolean generateOperationalAttributes)
                                              throws java.lang.UnsupportedOperationException
        Specifies whether the server should automatically generate operational attributes (including entryDN, entryUUID, creatorsName, createTimestamp, modifiersName, modifyTimestamp, and subschemaSubentry) for entries in the server. This method will always throw an UnsupportedOperationException.
        Overrides:
        setGenerateOperationalAttributes in class InMemoryDirectoryServerConfig
        Parameters:
        generateOperationalAttributes - Indicates whether the server should automatically generate operational attributes for entries in the server.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setMaxChangeLogEntries

        public void setMaxChangeLogEntries​(int maxChangeLogEntries)
                                    throws java.lang.UnsupportedOperationException
        Specifies the maximum number of changelog entries that the server should maintain. A value less than or equal to zero indicates that the server should not attempt to maintain a changelog. This method will always throw an UnsupportedOperationException.
        Overrides:
        setMaxChangeLogEntries in class InMemoryDirectoryServerConfig
        Parameters:
        maxChangeLogEntries - The maximum number of changelog entries that the server should maintain.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • getEqualityIndexAttributes

        public java.util.List<java.lang.String> getEqualityIndexAttributes()
        Retrieves a list containing the names or OIDs of the attribute types for which to maintain an equality index to improve the performance of certain kinds of searches. The returned list will not be modifiable.
        Overrides:
        getEqualityIndexAttributes in class InMemoryDirectoryServerConfig
        Returns:
        A list containing the names or OIDs of the attribute types for which to maintain an equality index to improve the performance of certain kinds of searches, or an empty list if no equality indexes should be created.
      • setEqualityIndexAttributes

        public void setEqualityIndexAttributes​(java.lang.String... equalityIndexAttributes)
                                        throws java.lang.UnsupportedOperationException
        Specifies the names or OIDs of the attribute types for which to maintain an equality index to improve the performance of certain kinds of searches. This method will always throw an UnsupportedOperationException.
        Overrides:
        setEqualityIndexAttributes in class InMemoryDirectoryServerConfig
        Parameters:
        equalityIndexAttributes - The names or OIDs of the attributes for which to maintain an equality index to improve the performance of certain kinds of searches. It may be null or empty to indicate that no equality indexes should be maintained.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setEqualityIndexAttributes

        public void setEqualityIndexAttributes​(java.util.Collection<java.lang.String> equalityIndexAttributes)
                                        throws java.lang.UnsupportedOperationException
        Specifies the names or OIDs of the attribute types for which to maintain an equality index to improve the performance of certain kinds of searches. This method will always throw an UnsupportedOperationException.
        Overrides:
        setEqualityIndexAttributes in class InMemoryDirectoryServerConfig
        Parameters:
        equalityIndexAttributes - The names or OIDs of the attributes for which to maintain an equality index to improve the performance of certain kinds of searches. It may be null or empty to indicate that no equality indexes should be maintained.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • getReferentialIntegrityAttributes

        public java.util.Set<java.lang.String> getReferentialIntegrityAttributes()
        Retrieves the names of the attributes for which referential integrity should be maintained. If referential integrity is to be provided and an entry is removed, then any other entries containing one of the specified attributes with a value equal to the DN of the entry that was removed, then that value will also be removed. Similarly, if an entry is moved or renamed, then any references to that entry in one of the specified attributes will be updated to reflect the new DN. The returned set will not be modifiable.
        Overrides:
        getReferentialIntegrityAttributes in class InMemoryDirectoryServerConfig
        Returns:
        The names of the attributes for which referential integrity should be maintained, or an empty set if referential integrity should not be maintained for any attributes.
      • setReferentialIntegrityAttributes

        public void setReferentialIntegrityAttributes​(java.lang.String... referentialIntegrityAttributes)
                                               throws java.lang.UnsupportedOperationException
        Specifies the names of the attributes for which referential integrity should be maintained. If referential integrity is to be provided and an entry is removed, then any other entries containing one of the specified attributes with a value equal to the DN of the entry that was removed, then that value will also be removed. Similarly, if an entry is moved or renamed, then any references to that entry in one of the specified attributes will be updated to reflect the new DN. This method will always throw an UnsupportedOperationException.
        Overrides:
        setReferentialIntegrityAttributes in class InMemoryDirectoryServerConfig
        Parameters:
        referentialIntegrityAttributes - The names of the attributes for which referential integrity should be maintained. The values of these attributes should be DNs. It may be null or empty if referential integrity should not be maintained.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setReferentialIntegrityAttributes

        public void setReferentialIntegrityAttributes​(java.util.Collection<java.lang.String> referentialIntegrityAttributes)
                                               throws java.lang.UnsupportedOperationException
        Specifies the names of the attributes for which referential integrity should be maintained. If referential integrity is to be provided and an entry is removed, then any other entries containing one of the specified attributes with a value equal to the DN of the entry that was removed, then that value will also be removed. Similarly, if an entry is moved or renamed, then any references to that entry in one of the specified attributes will be updated to reflect the new DN. This method will always throw an UnsupportedOperationException.
        Overrides:
        setReferentialIntegrityAttributes in class InMemoryDirectoryServerConfig
        Parameters:
        referentialIntegrityAttributes - The names of the attributes for which referential integrity should be maintained. The values of these attributes should be DNs. It may be null or empty if referential integrity should not be maintained.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setVendorName

        public void setVendorName​(java.lang.String vendorName)
                           throws java.lang.UnsupportedOperationException
        Specifies the vendor name value to report in the server root DSE. This method will always throw an UnsupportedOperationException.
        Overrides:
        setVendorName in class InMemoryDirectoryServerConfig
        Parameters:
        vendorName - The vendor name value to report in the server root DSE. It may be null if no vendor name should appear.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.
      • setVendorVersion

        public void setVendorVersion​(java.lang.String vendorVersion)
                              throws java.lang.UnsupportedOperationException
        Specifies the vendor version value to report in the server root DSE. This method will always throw an UnsupportedOperationException.
        Overrides:
        setVendorVersion in class InMemoryDirectoryServerConfig
        Parameters:
        vendorVersion - The vendor version value to report in the server root DSE. It may be null if no vendor version should appear.
        Throws:
        java.lang.UnsupportedOperationException - To indicate that this object cannot be altered.