| | |
| | | import org.forgerock.opendj.ldap.schema.CoreSchema; |
| | | import org.forgerock.opendj.ldap.schema.DITContentRule; |
| | | import org.forgerock.opendj.ldap.schema.DITStructureRule; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRule; |
| | | import org.forgerock.opendj.ldap.schema.MatchingRuleUse; |
| | | import org.forgerock.opendj.ldap.schema.NameForm; |
| | | import org.forgerock.opendj.ldap.schema.ObjectClass; |
| | |
| | | } |
| | | } |
| | | |
| | | // Obsolete matching rule and attribute types are not checked by the SDK |
| | | MatchingRule matchingRule = matchingRuleUse.getMatchingRule(); |
| | | if (matchingRule.isObsolete()) |
| | | { |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_MRU_OBSOLETE_MR.get( |
| | | matchingRuleUse.getNameOrOID(), matchingRule.getNameOrOID()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message); |
| | | } |
| | | |
| | | for (AttributeType at : matchingRuleUse.getAttributes()) |
| | | { |
| | | if (at.isObsolete()) |
| | | { |
| | | LocalizableMessage message = ERR_SCHEMA_MODIFY_MRU_OBSOLETE_ATTR.get( |
| | | matchingRuleUse.getNameOrOID(), matchingRule.getNameOrOID()); |
| | | throw new DirectoryException(ResultCode.CONSTRAINT_VIOLATION, message); |
| | | } |
| | | } |
| | | |
| | | // If there is no existing matching rule use, then we're adding a new one. |
| | | // Otherwise, we're replacing an existing matching rule use. |
| | | if (existingMRU == null) |