SDK does NOT provide literal constants matching RFC. For instance for result code 32:
RFC refers to 'noSuchObject' while name attribute value is "no such object" for ResultCode instance.
I am working in a REST service that makes some kind of translation of LDAP queries and result codes are specified in headers using String representation as defined in RFC. Not a big deal, BUT maybe could be an interesting add-on for the SDK adding the RFC literal as another field to the ResultCode (e.g. rfcName with getRfcName())
What do you think?
Thanks in advance,
Evaristo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just committed a change that adds a getStandardName() method, which retrieves the name used to reference the result code in the relevant specification (which isn't always an RFC). Most of the names use the camelCase formatting, although some of the client-side result codes (such as those defined in draft-ietf-ldapext-ldap-java-api-19) are in ALL_CAPS_SEPARATED_BY_UNDERSCORES because that is the representation used in that specification.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi there,
First of all thanks for the great library!!!!
I was NOT able to find in the SDK constants with String representation of result codes as defined in LDAP RFC.
LDAP RFC defines result codes as LDAPResult ::= SEQUENCE {
resultCode ENUMERATED {
success (0),
operationsError (1),
protocolError (2),
...
noSuchObject (32), noSuchObject (32),
SDK does NOT provide literal constants matching RFC. For instance for result code 32:
RFC refers to 'noSuchObject' while name attribute value is "no such object" for ResultCode instance.
I am working in a REST service that makes some kind of translation of LDAP queries and result codes are specified in headers using String representation as defined in RFC. Not a big deal, BUT maybe could be an interesting add-on for the SDK adding the RFC literal as another field to the ResultCode (e.g. rfcName with getRfcName())
What do you think?
Thanks in advance,
Evaristo
I just committed a change that adds a getStandardName() method, which retrieves the name used to reference the result code in the relevant specification (which isn't always an RFC). Most of the names use the camelCase formatting, although some of the client-side result codes (such as those defined in draft-ietf-ldapext-ldap-java-api-19) are in ALL_CAPS_SEPARATED_BY_UNDERSCORES because that is the representation used in that specification.
Thanks a lot Neil for the commit.