Package org.acegisecurity.annotation
Annotation Type Secured
-
@Target(METHOD) @Retention(RUNTIME) @Inherited @Documented public @interface Secured
Java 5 annotation for describing service layer security attributes.The
Secured
annotation is used to define a list of security configuration attributes for business methods. This annotation can be used as a Java 5 alternative to XML configuration.For example:
@Secured ({"ROLE_USER"}) public void create(Contact contact); @Secured ({"ROLE_USER", "ROLE_ADMIN"}) public void update(Contact contact); @Secured ({"ROLE_ADMIN"}) public void delete(Contact contact);
In TeamCity we had to move this annotation class into our code-base. Arguments are taken fromPermission
enum member names You must apply this annotation to implementation of the method, not to a method in interface- Author:
- Mark St.Godard, Eugene Petrenko
-
-
Element Detail
-
value
@NotNull String[] value
Returns the list of security configuration attributes (e.g. ROLE_USER, ROLE_ADMIN).- Returns:
- String[] The secure method attributes
-
-