Results 1 to 2 of 2

Thread: filtering search results with AfterInvocationProvider

  1. #1
    Join Date
    Sep 2005
    Posts
    8

    Default filtering search results with AfterInvocationProvider

    Hi,

    I am planning to implement a simple search engine with iBatis. You can search against a single table at a time and the search results are a list of maps, basically I don't want to return complete domain objects or have to call subsystemManager.getAll(). Essentially its a high level view, so not all details are required.

    So I have 2 questions:
    Can AfterInvocationProvider filter this type of collection properly or is the domain specific object required?

    Given that I will have the users id before I make the request, should I be looking to implement this differently?

    Appreciate any suggestions,
    Thanks,
    Conor.

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

    Default

    Search engines are always interesting from an ACL perspective, as generally it's non-performant to use an AfterInvocationManager or AfterInvocationProvider (such as BasicAclEntryAfterInvocationCollectionFilteringPro vider or BasicAclEntryAfterInvocationProvider) for filtering a potentially large resultset down to those results to which the user has permission.

    Generally the best approach is to make your search tool Acegi Security SecurityContextHolder.getContext().getAuthenticati on() aware. This obviously doesn't give the full benefit of AOP removing security concerns from your business logic, but in the case of large resultsets it is a reasonable trade-off.

    If you're only dealing with small resultsets, or you are happy to return paginated resultsets, by all means use the aforementioned ACL classes to achieve your goal. In that case each of the elements in your Map would need to equate to something that an AclObjectIdentity instance could be obtained for (eg they implement AclObjectIdentityAware or NamedEntityObjectIdentity). In this case each object will need an ACL entry in your ACL table.
    Ben Alex
    Project Founder, Spring UAA, Spring Roo and Spring Security

Similar Threads

  1. Replies: 3
    Last Post: Jul 3rd, 2006, 12:27 PM
  2. Replies: 2
    Last Post: Sep 20th, 2005, 12:59 AM
  3. Search and results flow problem
    By lnader in forum Web
    Replies: 0
    Last Post: Jun 5th, 2005, 08:46 PM
  4. Table framework filtering -first cut
    By snpe in forum Swing
    Replies: 2
    Last Post: Nov 15th, 2004, 12:17 AM
  5. Project that uses Spring: Zilverline search engine
    By jbetancourt in forum Architecture
    Replies: 0
    Last Post: Oct 19th, 2004, 06:49 AM

Posting Permissions

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