Annotation Interface FilterContent


@Target({METHOD,ANNOTATION_TYPE}) @Retention(RUNTIME) public @interface FilterContent
Annotation to be placed on methods of values that need to be filtered before they're passed to a given User.

For a value to be filtered use ContentFilter.filterContent(Object, User). The user will be automatically injected into annotated methods.

Both root and nested values are filtered (including if the value is in an array). You can either return the current value (i.e. this) from the annotated method, or return a modified value if the user is not allowed to see all properties. You can also return null to remove the value for the user entirely.