| | |
| | | throw new ConfigException(message); |
| | | } |
| | | |
| | | userDefinedAttributes = new ArrayList<Attribute>(); |
| | | userDefinedAttributes = new ArrayList<>(); |
| | | addAllUserDefinedAttrs(userDefinedAttributes, configEntry.getEntry()); |
| | | |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | subordinateBaseDNs = new ConcurrentHashMap<DN, Backend<?>>(); |
| | | subordinateBaseDNs = new ConcurrentHashMap<>(); |
| | | for (DN baseDN : subDNs) |
| | | { |
| | | Backend<?> backend = DirectoryServer.getBackend(baseDN); |
| | |
| | | |
| | | // Construct the set of "static" attributes that will always be present in |
| | | // the root DSE. |
| | | staticDSEAttributes = new ArrayList<Attribute>(); |
| | | |
| | | staticDSEAttributes.add(Attributes.create(ATTR_VENDOR_NAME, |
| | | SERVER_VENDOR_NAME)); |
| | | |
| | | staticDSEAttributes = new ArrayList<>(); |
| | | staticDSEAttributes.add(Attributes.create(ATTR_VENDOR_NAME, SERVER_VENDOR_NAME)); |
| | | staticDSEAttributes.add(Attributes.create(ATTR_VENDOR_VERSION, |
| | | DirectoryServer.getVersionString())); |
| | | |
| | | staticDSEAttributes.add(Attributes.create("fullVendorVersion", |
| | | BuildVersion.binaryVersion().toString())); |
| | | |
| | | // Construct the set of objectclasses to include in the root DSE entry. |
| | | dseObjectClasses = new HashMap<ObjectClass,String>(2); |
| | | dseObjectClasses = new HashMap<>(2); |
| | | ObjectClass topOC = DirectoryServer.getObjectClass(OC_TOP); |
| | | if (topOC == null) |
| | | { |
| | |
| | | } |
| | | dseObjectClasses.put(topOC, OC_TOP); |
| | | |
| | | ObjectClass rootDSEOC = |
| | | DirectoryServer.getObjectClass(OC_ROOT_DSE); |
| | | ObjectClass rootDSEOC = DirectoryServer.getObjectClass(OC_ROOT_DSE); |
| | | if (rootDSEOC == null) |
| | | { |
| | | rootDSEOC = DirectoryServer.getDefaultObjectClass(OC_ROOT_DSE); |
| | |
| | | */ |
| | | private Entry getRootDSE(ClientConnection connection) |
| | | { |
| | | HashMap<AttributeType,List<Attribute>> dseUserAttrs = |
| | | new HashMap<AttributeType,List<Attribute>>(); |
| | | HashMap<AttributeType,List<Attribute>> dseOperationalAttrs = |
| | | new HashMap<AttributeType,List<Attribute>>(); |
| | | HashMap<AttributeType,List<Attribute>> dseUserAttrs = new HashMap<>(); |
| | | HashMap<AttributeType,List<Attribute>> dseOperationalAttrs = new HashMap<>(); |
| | | |
| | | |
| | | Attribute publicNamingContextAttr = createDNAttribute( |
| | |
| | | DirectoryServer.getPublicNamingContexts().keySet()); |
| | | addAttribute(publicNamingContextAttr, dseUserAttrs, dseOperationalAttrs); |
| | | |
| | | |
| | | // Add the "ds-private-naming-contexts" attribute. |
| | | Attribute privateNamingContextAttr = createDNAttribute( |
| | | ATTR_PRIVATE_NAMING_CONTEXTS, ATTR_PRIVATE_NAMING_CONTEXTS, |
| | |
| | | ATTR_SUPPORTED_FEATURE_LC, DirectoryServer.getSupportedFeatures()); |
| | | addAttribute(supportedFeatureAttr, dseUserAttrs, dseOperationalAttrs); |
| | | |
| | | |
| | | // Add the "supportedSASLMechanisms" attribute. |
| | | Attribute supportedSASLMechAttr = createAttribute( |
| | | ATTR_SUPPORTED_SASL_MECHANISMS, ATTR_SUPPORTED_SASL_MECHANISMS_LC, |
| | | DirectoryServer.getSupportedSASLMechanisms().keySet()); |
| | | addAttribute(supportedSASLMechAttr, dseUserAttrs, dseOperationalAttrs); |
| | | |
| | | |
| | | // Add the "supportedLDAPVersions" attribute. |
| | | TreeSet<String> versionStrings = new TreeSet<String>(); |
| | | TreeSet<String> versionStrings = new TreeSet<>(); |
| | | for (Integer ldapVersion : DirectoryServer.getSupportedLDAPVersions()) |
| | | { |
| | | versionStrings.add(ldapVersion.toString()); |
| | | } |
| | | Attribute supportedLDAPVersionAttr = |
| | | createAttribute(ATTR_SUPPORTED_LDAP_VERSION, |
| | | ATTR_SUPPORTED_LDAP_VERSION_LC, |
| | | versionStrings); |
| | | Attribute supportedLDAPVersionAttr = createAttribute( |
| | | ATTR_SUPPORTED_LDAP_VERSION, ATTR_SUPPORTED_LDAP_VERSION_LC, versionStrings); |
| | | addAttribute(supportedLDAPVersionAttr, dseUserAttrs, dseOperationalAttrs); |
| | | |
| | | |
| | | // Add the "supportedAuthPasswordSchemes" attribute. |
| | | Set<String> authPWSchemes = |
| | | DirectoryServer.getAuthPasswordStorageSchemes().keySet(); |
| | |
| | | Attribute supportedAuthPWSchemesAttr = |
| | | createAttribute(ATTR_SUPPORTED_AUTH_PW_SCHEMES, |
| | | ATTR_SUPPORTED_AUTH_PW_SCHEMES_LC, authPWSchemes); |
| | | ArrayList<Attribute> supportedAuthPWSchemesAttrs = |
| | | new ArrayList<Attribute>(1); |
| | | ArrayList<Attribute> supportedAuthPWSchemesAttrs = new ArrayList<>(1); |
| | | supportedAuthPWSchemesAttrs.add(supportedAuthPWSchemesAttr); |
| | | if (showAllAttributes |
| | | || !supportedSASLMechAttr.getAttributeType().isOperational()) |
| | |
| | | List<Attribute> attrs = attrsMap.get(type); |
| | | if (attrs == null) |
| | | { |
| | | attrs = new ArrayList<Attribute>(); |
| | | attrs = new ArrayList<>(); |
| | | attrsMap.put(type, attrs); |
| | | } |
| | | attrs.add(a); |
| | |
| | | { |
| | | if (!publicNamingContextAttr.isEmpty()) |
| | | { |
| | | List<Attribute> privateNamingContextAttrs = new ArrayList<Attribute>(1); |
| | | List<Attribute> privateNamingContextAttrs = new ArrayList<>(1); |
| | | privateNamingContextAttrs.add(publicNamingContextAttr); |
| | | final AttributeType attrType = publicNamingContextAttr.getAttributeType(); |
| | | if (showAllAttributes || !attrType.isOperational()) |
| | |
| | | } |
| | | else |
| | | { |
| | | subBases = new ConcurrentHashMap<DN, Backend<?>>(); |
| | | subBases = new ConcurrentHashMap<>(); |
| | | for (DN baseDN : subDNs) |
| | | { |
| | | Backend<?> backend = DirectoryServer.getBackend(baseDN); |
| | |
| | | |
| | | |
| | | // Check to see if there is a new set of user-defined attributes. |
| | | ArrayList<Attribute> userAttrs = new ArrayList<Attribute>(); |
| | | ArrayList<Attribute> userAttrs = new ArrayList<>(); |
| | | try |
| | | { |
| | | ConfigEntry configEntry = DirectoryServer.getConfigEntry(configEntryDN); |