| | |
| | | * |
| | | * |
| | | * Copyright 2009 Sun Microsystems, Inc. |
| | | * Portions copyright 2011 ForgeRock AS |
| | | * Portions copyright 2011-2013 ForgeRock AS |
| | | */ |
| | | |
| | | package org.forgerock.opendj.ldap.schema; |
| | |
| | | import static com.forgerock.opendj.ldap.CoreMessages.*; |
| | | import static org.forgerock.opendj.ldap.schema.SchemaConstants.EMR_OID_FIRST_COMPONENT_OID; |
| | | import static org.forgerock.opendj.ldap.schema.SchemaConstants.SYNTAX_MATCHING_RULE_NAME; |
| | | import static com.forgerock.opendj.util.StaticUtils.SCHEMA_LOG; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | |
| | | import com.forgerock.opendj.util.StaticUtils; |
| | | import com.forgerock.opendj.util.SubstringReader; |
| | | |
| | | /** |
| | |
| | | // whitespace. That is illegal. |
| | | final LocalizableMessage message = ERR_ATTR_SYNTAX_MR_EMPTY_VALUE1.get(definition); |
| | | final DecodeException e = DecodeException.error(message); |
| | | StaticUtils.DEBUG_LOG.throwing("MatchingRuleSyntax", "valueIsAcceptable", e); |
| | | SCHEMA_LOG.debug("", e); |
| | | throw e; |
| | | } |
| | | |
| | |
| | | ERR_ATTR_SYNTAX_MR_EXPECTED_OPEN_PARENTHESIS.get(definition, |
| | | (reader.pos() - 1), String.valueOf(c)); |
| | | final DecodeException e = DecodeException.error(message); |
| | | StaticUtils.DEBUG_LOG.throwing("MatchingRuleSyntax", "valueIsAcceptable", e); |
| | | SCHEMA_LOG.debug("", e); |
| | | throw e; |
| | | } |
| | | |
| | |
| | | final LocalizableMessage message = |
| | | ERR_ATTR_SYNTAX_MR_ILLEGAL_TOKEN1.get(definition, tokenName); |
| | | final DecodeException e = DecodeException.error(message); |
| | | StaticUtils.DEBUG_LOG.throwing("MatchingRuleSyntax", "valueIsAcceptable", e); |
| | | SCHEMA_LOG.debug("", e); |
| | | throw e; |
| | | } |
| | | } |
| | |
| | | if (syntax == null) { |
| | | final LocalizableMessage message = ERR_ATTR_SYNTAX_MR_NO_SYNTAX.get(definition); |
| | | final DecodeException e = DecodeException.error(message); |
| | | StaticUtils.DEBUG_LOG.throwing("MatchingRuleSyntax", "valueIsAcceptable", e); |
| | | SCHEMA_LOG.debug("", e); |
| | | throw e; |
| | | } |
| | | return true; |