| | |
| | | */ |
| | | private boolean isSchemaConfigAttribute(Attribute attribute) |
| | | { |
| | | AttributeType attrType = attribute.getAttributeType(); |
| | | AttributeType attrType = attribute.getAttributeDescription().getAttributeType(); |
| | | return attrType.hasName(ATTR_SCHEMA_ENTRY_DN.toLowerCase()) || |
| | | attrType.hasName(ATTR_BACKEND_ENABLED.toLowerCase()) || |
| | | attrType.hasName(ATTR_BACKEND_CLASS.toLowerCase()) || |
| | |
| | | Map<AttributeType, List<Attribute>> userAttrs, |
| | | Map<AttributeType, List<Attribute>> operationalAttrs) |
| | | { |
| | | AttributeType type = attribute.getAttributeType(); |
| | | AttributeType type = attribute.getAttributeDescription().getAttributeType(); |
| | | Map<AttributeType, List<Attribute>> attrsMap = type.isOperational() ? operationalAttrs : userAttrs; |
| | | List<Attribute> attrs = attrsMap.get(type); |
| | | if (attrs == null) |
| | |
| | | |
| | | Attribute attribute = builder.toAttribute(); |
| | | ArrayList<Attribute> attrList = newArrayList(attribute); |
| | | if (attribute.getAttributeType().isOperational() |
| | | if (attribute.getAttributeDescription().getAttributeType().isOperational() |
| | | && (ignoreShowAllOption || !showAllAttributes)) |
| | | { |
| | | operationalAttrs.put(attribute.getAttributeType(), attrList); |
| | | operationalAttrs.put(attribute.getAttributeDescription().getAttributeType(), attrList); |
| | | } |
| | | else |
| | | { |
| | | userAttrs.put(attribute.getAttributeType(), attrList); |
| | | userAttrs.put(attribute.getAttributeDescription().getAttributeType(), attrList); |
| | | } |
| | | } |
| | | |
| | |
| | | // to add a schema element that already exists and treat it as a |
| | | // replacement of that existing element. |
| | | Attribute a = m.getAttribute(); |
| | | AttributeType at = a.getAttributeType(); |
| | | AttributeType at = a.getAttributeDescription().getAttributeType(); |
| | | switch (m.getModificationType().asEnum()) |
| | | { |
| | | case ADD: |
| | |
| | | Attribute a = m.getAttribute(); |
| | | |
| | | if (m.getModificationType() != ModificationType.ADD || |
| | | !a.getAttributeType().equals(objectClassesType)) |
| | | !a.getAttributeDescription().getAttributeType().equals(objectClassesType)) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | Attribute a = m.getAttribute(); |
| | | |
| | | if (m.getModificationType() != ModificationType.ADD || |
| | | !a.getAttributeType().equals(nameFormsType)) |
| | | !a.getAttributeDescription().getAttributeType().equals(nameFormsType)) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | Attribute a = m.getAttribute(); |
| | | |
| | | if (m.getModificationType() != ModificationType.ADD || |
| | | !a.getAttributeType().equals(ditStructureRulesType)) |
| | | !a.getAttributeDescription().getAttributeType().equals(ditStructureRulesType)) |
| | | { |
| | | continue; |
| | | } |
| | |
| | | for (Attribute attribute : attributes.values()) |
| | | { |
| | | ArrayList<Attribute> attrList = newArrayList(attribute); |
| | | schemaEntry.putAttribute(attribute.getAttributeType(), attrList); |
| | | schemaEntry.putAttribute(attribute.getAttributeDescription().getAttributeType(), attrList); |
| | | } |
| | | } |
| | | |