> On Oct 22, 2024, at 12:20 PM, Brian Demers <bdem...@apache.org> wrote:
>
> but while we are hacking on things, the thinking was that keeping it outside
> the repo would make it easier to get started.
Something I wanted to get input on is how best to create a flexible interface
with the LDAP API. Need to allow the user the ability to define the data
structures. Don't want to reinvent the wheel. Are there any recommendations on
how to proceed?
I’ve got in mind some kind of meta file that maps from the physical data model
to a logical one.
A template or hashmap would do well here.
Once the data mappings are in place, it would be a simple matter to pass a map
to the data access object for operations with the backend.
e.g. Pass a simple user entry via a HashMap:
```
HashMap map = new HashMap<String, String>();
String uid = "foo";
map.put(SchemaConstants.OBJECT_CLASS_AT, Config.getString(
Ids.USERS_OBJECT_CLASS ));
map.put(SchemaConstants.CN_AT, "foo bar");
map.put(SchemaConstants.SN_AT, "bar");
map.put(SchemaConstants.UID_AT, uid);
map.put(SchemaConstants.DESCRIPTION_AT, " ... ");
…
map.put("DN", SchemaConstants.UID_AT + "=" + uid + "," + Config.getString(
Ids.USERS ));
```
Thoughts?
—
Shawn
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@directory.apache.org
For additional commands, e-mail: dev-h...@directory.apache.org