Annotation Interface ProtectedResourceId


@Inherited @Target({PARAMETER,ANNOTATION_TYPE}) @Retention(RUNTIME) public @interface ProtectedResourceId
Used in a method parameter to indicate an ID (of several) of the resource to be protected. Multiple annotations of this type can be used on the same method, but they can't be used in conjunction with ProtectedResource.

This annotation is preferred in cases where permission evaluation is being done on a resource that has multiple IDs. For example, to secure a file in a site you probably need the name of the site and then the path of the file in the site.

When using this annotation, an map with key = ID name => value = ID value is passed to the PermissionEvaluator instead of a single object.

Author:
avasquez
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    The name of the ID, e.g.
  • Element Details

    • value

      String value
      The name of the ID, e.g. site, path, etc.