Results 1 to 2 of 2

Thread: why no getId()/Classname() in AclObjectIdentity interface?

  1. #1
    Join Date
    Mar 2005
    Posts
    5

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

    I'm curious why the AclObjectIdenity interface does not provide

    getId()
    getClassname()

    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?

    thanks,

    Miguel

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.

Similar Threads

  1. Replies: 2
    Last Post: May 4th, 2005, 10:39 PM
  2. Implementing an Interface and read-only problems.
    By mrxtravis in forum Container
    Replies: 2
    Last Post: Apr 26th, 2005, 04:09 PM
  3. Replies: 29
    Last Post: Apr 12th, 2005, 05:24 PM
  4. Newbie's question: design interface for remote access
    By Savagearts in forum Architecture
    Replies: 2
    Last Post: Mar 17th, 2005, 12:02 AM
  5. Replies: 2
    Last Post: Nov 22nd, 2004, 04:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •