Defines a logical security
Privilege
, that a caller must have in
order to access a resource.
A caller is deemed to have a
Privilege
IFF they have at least one of
the roles enumerated by the
roles()
property.
A
Privilege
must be defined at the package level in
package-info.java
. If more than one
Privilege
is to be
defined per package then wrapper it in a
Security
annotation.
If a
Privilege
must be defined dynamically (i.e. at run-time), rather
than statically via a package annotation, then implement a
HasPrivileges
provider that can map privilege names to
Privilege
instances.