mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
29.30.2016 42dd9eb626b81e5f370f3d66f932a72fc2bdc0d5
refs
author Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, February 29, 2016 16:30 +0100
committer Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Monday, March 7, 2016 16:44 +0100
commit42dd9eb626b81e5f370f3d66f932a72fc2bdc0d5
tree bf2cf84defaf1ee976fdb700e2f9ae225082848f tree | zip | gz
parent 8d16f1ef80784676d9ab34cb12b6954da96d3276 view | diff
OPENDJ-1342 Migrate AVA, RDN, and DN classes

These changes are required to complete the migration of the server to the SDK's DN and RDN classes.

DN.java:
In toNormalizedByteString(), changed the representation to include a leading NORMALIZED_RDN_SEPARATOR
when for all DNs other than the root DN.
This is consistent with how the server stores data in dn2id or dn2uri.
Moved RDN.AVA_CHAR_SEPARATOR here, to be consistent with NORMALIZED_* constants.
Added RDN_CHAR_SEPARATOR and used it throughout this class.
Added valueOf(ByteString), rdn(int) and toUUID().
Moved hasAttributeType() here from server's RDN.
Inlined static method compareTo(DN, DN)

RDN.java:
Added MIN_VALUE and minValue(), and modified code to take care of it.
Moved AVA_CHAR_SEPARATOR to DN class and used it throughout this class.

DNTestCase.java:
Added test cases for using RDN.maxValue() and DN.minValue() with a Map keyed by DNs

DistinguishedNameEqualityMatchingRuleTest.java:
Consequence of the change to DN.toNormalizedByteString()
4 files modified
359 ■■■■ changed files
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/DN.java 105 ●●●●● diff | view | raw | blame | history
opendj-sdk/opendj-core/src/main/java/org/forgerock/opendj/ldap/RDN.java 106 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/DNTestCase.java 139 ●●●● diff | view | raw | blame | history
opendj-sdk/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/DistinguishedNameEqualityMatchingRuleTest.java 9 ●●●● diff | view | raw | blame | history