i would try to solve the problem in your domain layer, not in the
marshaling layer.
you could use a FilteredDirectoryEntry implementing the same interface
as DirectoryEntry
(using a decorator pattern)
Michael Brackx
On Fri, Nov 14, 2008 at 12:21 AM, Mike Chack (mchack) <mc...@ci...> wrote:
> Would like to see if anyone has an idea as to how to produce conditional
> output.
>
>
>
> Problem: We have an application that has a directory function that returns
> say a Directory Entry (DE). Users can specify privacy options on a per
> property basis. So when returning the results of a directory search, the
> response will depend upon who is doing the search as well as the visibility
> of the properties. I can envision a number of potential solutions.
>
>
>
> 1. Custom producer.
>
> 2. Enhance the getters of my DE class to filter (return null on a
> conditional basis).
>
> 3. Have an enhanced annotation such as @XmlTransient that could also take
> into account a custom condition.
>
>
>
> Would like to hear if this is a pattern that anyone has thought about as
> well as thoughts on the best method going forward. Should it be part of the
> RestEasy Framework or is this custom enough that it really needs to be
> handled on a per case basis?
>
>
>
> Thanks
>
>
>
> Mike Chack
> O: +1 408.526.4639
> M: +1 408.504.6594
> mc...@ci...
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Resteasy-developers mailing list
> Res...@li...
> https://lists.sourceforge.net/lists/listinfo/resteasy-developers
>
>
|