RolesAllowed (Java EE 5)

Java EE API


javax.annotation.security Annotation Type RolesAllowed


@Documented
@Retention(value=RUNTIME)
@Target(value={TYPE,METHOD})
public @interface RolesAllowed

Implements: Annotation
@Documented
@Retention(value=RUNTIME)
@Target(value={TYPE, METHOD})

指定允许访问应用程序中的方法的角色列表。RolesAllowed 注释的值是一个安全角色名称的列表。可以对类或方法指定此注释。在类级别上指定表示它应用于该类的所有方法。对方法指定表示它仅适用于该方法。如果同时应用于类级别和方法级别,存在冲突时方法值将重写类值。
英文文档:

Specifies the list of roles permitted to access method(s) in an application. The value of the RolesAllowed annotation is a list of security role names. This annotation can be specified on a class or on method(s). Specifying it at a class level means that it applies to all the methods in the class. Specifying it on a method means that it is applicable to that method only. If applied at both the class and methods level , the method value overrides the class value if the two conflict.

Since:
1.0

Required Element Summary
 String[]
 

Element Detail

abstract public String[] value()
英文文档:

value

public abstract String[] value


Submit a bug or feature

Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.

一看就知道只有菜鸟才干这么无知的事啦。

PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!