| | |
| | | import org.forgerock.opendj.ldap.ByteSequence; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.DecodeException; |
| | | import org.opends.server.api.AbstractMatchingRule; |
| | | import org.opends.server.api.OrderingMatchingRule; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.util.StaticUtils; |
| | | |
| | |
| | | * This class defines the uuidOrderingMatch matching rule defined in RFC 4530. |
| | | * This will be the default ordering matching rule for the UUID syntax. |
| | | */ |
| | | public class UUIDOrderingMatchingRule |
| | | extends AbstractMatchingRule |
| | | implements OrderingMatchingRule |
| | | public class UUIDOrderingMatchingRule extends AbstractOrderingMatchingRule |
| | | { |
| | | |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the description for this matching rule. |
| | | * |
| | | * @return The description for this matching rule, or <CODE>null</CODE> if |
| | | * there is none. |
| | | */ |
| | | @Override |
| | | public String getDescription() |
| | | { |
| | | // There is no standard description for this matching rule. |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the OID of the syntax with which this matching rule is |
| | | * associated. |
| | | * |
| | |
| | | } |
| | | } |
| | | |
| | | private ByteString reject(ByteSequence value, LocalizableMessage message) |
| | | throws DecodeException |
| | | { |
| | | switch (DirectoryServer.getSyntaxEnforcementPolicy()) |
| | | { |
| | | case REJECT: |
| | | throw DecodeException.error(message); |
| | | case WARN: |
| | | logger.error(message); |
| | | return value.toByteString(); |
| | | default: |
| | | return value.toByteString(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |