I am using 0.9.2 but worked well on 0.9.1 as well. Although, i moved on
from this to a different solution where in i am deciding the view on basis
of the user role.



On Tue, Jun 21, 2016 at 8:31 PM, Ashish <[email protected]> wrote:

> What drop wizard version are you using  ?,  It is  not working for me
>  with 0.9.3
>
>
> On Friday, January 29, 2016 at 11:06:44 AM UTC-5, Vaibhav Dhawan wrote:
>>
>> I was able to get through this. Jersey entity filter dependency was
>> missing from my pom and i though dw core would have it covered.
>>
>> Still surprised why wont it throw a compilation error.
>>
>> On Friday, 29 January 2016 13:48:14 UTC+5:30, Vaibhav Dhawan wrote:
>>>
>>> Hello,
>>>
>>> I am trying to configure EntityFilteringFeature in my DW application but
>>> it doesnt seem to filter out fields. here is what i have done
>>>
>>> *Entity is listed as *
>>>
>>> public class Cities {
>>>
>>> private int cityId;
>>> private String cityName;
>>> @ProjectDetailedView
>>> private int cityStatus;
>>>
>>> //.. setters and getters
>>>
>>> *ProjectDetailedView is listed as *
>>>
>>> @Target({ElementType.TYPE, ElementType.METHOD, ElementType.FIELD})
>>> @Retention(RetentionPolicy.RUNTIME)
>>> @Documented
>>> @EntityFiltering
>>> public @interface ProjectDetailedView {
>>>
>>> public static class Factory extends
>>> AnnotationLiteral<ProjectDetailedView> implements ProjectDetailedView {
>>>        private Factory() {
>>>        }
>>>        public static ProjectDetailedView get() {
>>>            return new Factory();
>>>        }}}
>>>
>>> *Added following lines in app *
>>>
>>> environment.jersey().register(EntityFilteringFeature.class);
>>> environment.jersey().register(JacksonFeatures.class); //Probably not
>>> needed
>>>
>>> *Resource is listed as following. *
>>>
>>> GET
>>> @UnitOfWork
>>>    @Produces(MediaType.APPLICATION_JSON)
>>> //@ProjectDetailedView
>>>    public List<Cities> getCities() {
>>> return citiesDAO.findAll();
>>>    }
>>>
>>> I am expecting limited response when the annotation is commented out.
>>> However i get the full response in both the cases.
>>>
>>> Am i missing anything. Any pointers are much appreciated.
>>>
>>> Thanks
>>> Vaibhav
>>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "dropwizard-user" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/dropwizard-user/9i5tdMHUDk0/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Thanks

Vaibhav Dhawan
+919871488896

-- 
You received this message because you are subscribed to the Google Groups 
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to