| | |
| | | |
| | | import java.util.*; |
| | | |
| | | import com.sun.opends.sdk.util.Message; |
| | | import org.opends.sdk.LocalizableMessage; |
| | | |
| | | import com.sun.opends.sdk.util.Validator; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | @Override |
| | | void validate(List<Message> warnings, Schema schema) |
| | | void validate(List<LocalizableMessage> warnings, Schema schema) |
| | | throws SchemaException |
| | | { |
| | | if (validated) |
| | |
| | | } |
| | | catch (final UnknownSchemaElementException e) |
| | | { |
| | | final Message message = |
| | | final LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_UNKNOWN_SUPERIOR_CLASS.get( |
| | | oid, superClassOid); |
| | | throw new SchemaException(message, e); |
| | |
| | | // classes. |
| | | if (superiorType != ObjectClassType.ABSTRACT) |
| | | { |
| | | final Message message = |
| | | final LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_INVALID_SUPERIOR_TYPE.get( |
| | | oid, objectClassType.toString(), superiorType |
| | | .toString(), superiorClass.getNameOrOID()); |
| | |
| | | if (superiorType != ObjectClassType.ABSTRACT |
| | | && superiorType != ObjectClassType.AUXILIARY) |
| | | { |
| | | final Message message = |
| | | final LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_INVALID_SUPERIOR_TYPE.get( |
| | | oid, objectClassType.toString(), superiorType |
| | | .toString(), superiorClass.getNameOrOID()); |
| | |
| | | if (superiorType != ObjectClassType.ABSTRACT |
| | | && superiorType != ObjectClassType.STRUCTURAL) |
| | | { |
| | | final Message message = |
| | | final LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_INVALID_SUPERIOR_TYPE.get( |
| | | oid, objectClassType.toString(), superiorType |
| | | .toString(), superiorClass.getNameOrOID()); |
| | |
| | | // in the superior chain. |
| | | if (!derivesTop) |
| | | { |
| | | final Message message = |
| | | final LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_STRUCTURAL_SUPERIOR_NOT_TOP |
| | | .get(oid); |
| | | throw new SchemaException(message); |
| | |
| | | // This isn't good because it means that the objectclass |
| | | // requires an attribute type that we don't know anything |
| | | // about. |
| | | final Message message = |
| | | final LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_UNKNOWN_REQUIRED_ATTR.get( |
| | | oid, requiredAttribute); |
| | | throw new SchemaException(message, e); |
| | |
| | | // This isn't good because it means that the objectclass |
| | | // requires an attribute type that we don't know anything |
| | | // about. |
| | | final Message message = |
| | | final LocalizableMessage message = |
| | | WARN_ATTR_SYNTAX_OBJECTCLASS_UNKNOWN_OPTIONAL_ATTR.get( |
| | | oid, optionalAttribute); |
| | | throw new SchemaException(message, e); |