Announcement Announcement Module
No announcement yet.
why no getId()/Classname() in AclObjectIdentity interface? Page Title Module
Move Remove Collapse
This topic is closed
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • why no getId()/Classname() in AclObjectIdentity interface?

    I'm curious why the AclObjectIdenity interface does not provide


    methods like NamedEntityObjectIdentity does.

    When I implement

    BasicAclDao.getAcls(AclObjectIdentity aclObjectIdentity)

    the aclObjectIdentity I receive as a parameter is difficult to map back to the domain instance object, since all I know about it within the getAcls() method is limited to what's available via the AclObjectIdentity interface.

    The getId()/getClassname() methods in NamedEntityObjectIdentity are exactly what I need ... I was surprised not to find them in AclObjectIdentity ...

    How do you suggest mapping from the aclObjectIdentity back to the domain instance?



  • #2
    As noted in the interface contract for BasicAclDao:

    BasicAclDao implementations are responsible for interpreting a given AclObjectIdentity and being able to lookup and return the corresponding BasicAclEntry[]s.
    I didn't define a getClassname() or getId() on AclObjectIdentity as not every application will want to map ACLs by class + id combination. I certainly recognise most do, which is why NamedEntityObjectIdentity is the typical implementation of the interface. As it's a minor effort for your BasicAclDao to detect and cast to NamedEntityObjectIdentity, I'm having trouble understanding the problem. As mentioned, your DAOs are knowingly supposed to support an explicit AclObjectIdentity or given AclObjectIdentity implementations.