I am looking for a separate Java library that allows me to parse LDAP style filter expressions. Is this possible, or is it advisable to use ANTLR instead and build it with one self?
As a background: the filter itself is sent through the network, and I want to create say, the corresponding criteria for sleep mode. I do nothing with LDAP!
Any other ideas for a technology-independent solution for transmitting and converting user queries are also welcome.
You can use the shared Apache LDAP directory library.
maven
<dependency> <groupId>org.apache.directory.shared</groupId> <artifactId>shared-ldap</artifactId> <version>0.9.15</version> </dependency>
:
final ExprNode filter = FilterParser.parse(filterString);
Apache , , lavinio- OpenLDAP, .
OpenDS LDAPFilter, , , , , :
LDAPFilter parsed = LDAPFilter.decode(filter);
javadoc .
Apache DS FilterParser, , . , , , , , , - .
, , , , - :
filter.replaceAll("\\s?([\\(\\|&!=:\\)])\\s?", "$1");
, .
LDAP , System.DirectoryServices.NET . * Mono, ( .net ).
jldap OpenLDAP?
, URL- LDAP . , , , LDAP, , .
, sail- LDAP, ldap.
- ?
http://josql.sourceforge.net/
OSGi , OSGi.
Source: https://habr.com/ru/post/1710993/More articles:How to create a map in Java? - javaИспользование Erlang для управления несколькими экземплярами внешнего процесса - erlangjavascript asks for a password (i.e. *******) - javascriptSecurity Considerations for Creating Email on the Internet - securityCDialog and CPropertySheet authentication recommendations? - validationExcel 2007 - conversation with web service - web-servicesWhat happens when the server starts as soon as the request arrives? - djangoHow can I get numbers from Perl bignum? - perlProblem with java version for Mac OS for jar files - javaInstalling standard fonts in C # - c #All Articles