We don't use the fortress provided "REST" interface, but my concern would be that the query builders use the apache ldap api FilterBuilder class internally (https://directory.apache.org/api/gen-docs/latest/apidocs/org/apache/directory/ldap/client/api/search/FilterBuilder.html), so we'd have to see if that would serialize correctly. Also, if someone was trying to build a RoleQueryBuilder without the help of the java libraries, might be difficult.
At the end of the day, the result of the QueryBuilder is a filter string, so perhaps the RoleQueryBuilder would need to have it's own internal representation that got converted to FilterBuilders as part of building the string. ----- Original Message ----- From: "Shawn McKinney" <[email protected]> To: [email protected] Sent: Tuesday, October 25, 2016 10:03:53 AM Subject: Re: Custom object classes and attributes > On Oct 25, 2016, at 1:38 AM, Patrick Brunmayr <[email protected]> wrote: > > That seems a valid solution but how can u do this in the REST way ? Using the example Chris provided: > RoleQueryBuilder rqb = new RoleQueryBuilder(); > rqb.addPropertyEqualsFilter( "exposeMidpoint", "true" ); > List<Role> roles = reviewMgr.findRoles( rqb ); The new rolequerybuilder entity gets decorated with jaxb annotations, added to its objectbuilder, with a new search api added to reviewmgr and would be implemented inside service interface of fortress rest component. And presto we have a restful dynamic search capability. :-)
