Module org.apache.wicket.auth.roles
Annotation Interface AuthorizeInstantiation
@Retention(RUNTIME)
@Target({PACKAGE,TYPE})
@Documented
@Inherited
public @interface AuthorizeInstantiation
Annotation for configuring what roles are allowed for instantiation the annotated component or
package. This annotation can be used for classes and packages. For classes it can be used like this:
// only users with role ADMIN are allowed to create instances of this page, whether it is // either bookmarkable or not @AuthorizeInstantiation("ADMIN") public class AdminAnnotationsBookmarkablePage extends WebPageFor packages the annotation needs to be specified in the
package-info.java
file:
// only users with role ADMIN are allowed to create instances of pages in this package @AuthorizeInstantiation("ADMIN") package package_name; import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation;
- Author:
- Eelco hillenius
- See Also:
-
Optional Element Summary
-
Element Details
-
value
Gets the roles that are allowed to take the action.- Returns:
- the roles that are allowed. Returns a zero length array by default
- Default:
- {}
-