|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
javax.security.jacc Class EJBRoleRefPermission
java.lang.Object java.security.Permission javax.security.jacc.EJBRoleRefPermission
- All Implemented Interfaces:
- Serializable, Guard
public final class EJBRoleRefPermission
- extends Permission
- implements Serializable
EJB
isCallerInRole (String reference)
权限的类。EJBRoleRefPermission 是一个指定的权限,它具有各种操作。
EJBRoleRefPermission 的名称包含在应用程序部署描述符中标识 EJB(在其上下文中获得权限)的 ejb-name 元素的值。
EJBRoleRefPermission 的 actions 标识权限所应用到的角色引用。检查 EJBRoleRefPermission 以确定主体是否是引用所标识的角色的成员。
此类的实现可能实现 newPermissionCollection,也可能从超类继承其实现。
See also | java.security.Permission |
Class for EJB isCallerInRole (String reference)
permissions. An EJBRoleRefPermission is a named permission and has actions.
The name of an EJBRoleRefPermission contains the value of the ejb-name element in the application's deployment descriptor that identifies the EJB in whose context the permission is being evalutated.
the actions of an EJBRoleRefPermission identifies the role reference to which the permission applies. An EJBRoleRefPermission is checked to determine if the subject is a member of the role identified by the reference.
Implementations of this class MAY implement newPermissionCollection or inherit its implementation from the super class.
- Author:
- Ron Monzillo, Gary Ellison
- See Also:
Permission
, Serialized Form
Constructor Summary | |
---|---|
EJBRoleRefPermission(String name,
String actions)
Creates a new EJBRoleRefPermission with the specified name and actions. |
Method Summary | |
---|---|
boolean |
equals(Object o)
Checks two EJBRoleRefPermission objects for equality. |
String |
getActions()
Returns a canonical String representation of the actions of this EJBRoleRefPermission. |
int |
hashCode()
Returns the hash code value for this EJBRoleRefPermission. |
boolean |
implies(Permission permission)
Determines if the argument Permission is "implied by" this EJBRoleRefPermission. |
Methods inherited from class java.security.Permission |
---|
checkGuard, getName, newPermissionCollection, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public
EJBRoleRefPermission(String name, String actions)
使用指定名称和操作创建新的 EJBRoleRefPermission。
name | 标识在其上下文中获得角色引用的 EJB 的 ejb-name。 |
actions |
标识应用权限的角色引用。角色引用的范围限定为在名称参数中标识的 EJB。角色引用的值不得为 null 或空字符串。 |
EJBRoleRefPermission
public EJBRoleRefPermission(String name, String actions)
- Creates a new EJBRoleRefPermission with the specified name and actions.
- Parameters:
name
- the ejb-name that identifies the EJB in whose context the role references are to be evaluated.actions
- identifies the role reference to which the permission pertains. The role reference is scoped to the EJB identified in the name parameter. The value of the role reference must not benull
or the empty string.
Method Detail |
---|
public boolean
equals(Object o)
检查两个 EJBRoleRefPermission 对象是否相等。如果 EJBRoleRefPermission 对象具有相同的名称和 actions 值(区分大小写),则它们相等。
当且仅当 P1.implies(P2) && P2.implies(P1) 时,这两个 Permission 对象(P1 和 P2)才是相等的。
o | 要测试是否与此 EJBRoleRefPermission 相等的 EJBRoleRefPermission 对象 |
return | 如果参数 EJBRoleRefPermission 对象与此 EJBRoleRefPermission 相等,则返回 true。 |
equals
public boolean equals(Object o)
- Checks two EJBRoleRefPermission objects for equality.
EJBRoleRefPermission objects are equivalent if they have case
equivalent name and actions values.
Two Permission objects, P1 and P2, are equivalent if and only if P1.implies(P2) && P2.implies(P1).
- Specified by:
equals
in classPermission
- Parameters:
o
- the EJBRoleRefPermission object being tested for equality with this EJBRoleRefPermission.- Returns:
- true if the argument EJBRoleRefPermission object is equivalent to this EJBRoleRefPermission.
public String
getActions()
返回此 EJBRoleRefPermission 的 actions 的规范 String 表示形式。
return | 包含此 EJBRoleRefPermission 的规范化 actions 的 String。 |
getActions
public String getActions()
- Returns a canonical String representation of the actions of this
EJBRoleRefPermission.
- Specified by:
getActions
in classPermission
- Returns:
- a String containing the canonicalized actions of this EJBRoleRefPermission.
public int
hashCode()
返回此 EJBRoleRefPermission 的哈希码值。所返回哈希码的属性必须如下所示:
- 在 Java 应用程序的生命周期中,每次对 EJBRoleRefPermission 对象调用 hashCode 方法,该方法都必须返回相同的整数值。应用程序每次对特定 EJBRoleRefPermission 对象执行 hashCode 调用所返回的值不必保持一致。
- 如果根据 equals 方法,两个 EJBRoleRefPermission 对象是相等的,那么对两个 Permission 对象中每个对象调用 hashCode 方法必须生成相同的整数结果(在应用程序内)。
return | 此对象的整数哈希码值。 |
hashCode
public int hashCode()
- Returns the hash code value for this EJBRoleRefPermission. The properties
of the returned hash code must be as follows:
- During the lifetime of a Java application, the hashCode method must return the same integer value, every time it is called on a EJBRoleRefPermission object. The value returned by hashCode for a particular EJBRoleRefPermission need not remain consistent from one execution of an application to another.
- If two EJBRoleRefPermission objects are equal according to the equals method, then calling the hashCode method on each of the two Permission objects must produce the same integer result (within an application).
- Specified by:
hashCode
in classPermission
- Returns:
- the integer hash code value for this object.
public boolean
implies(java.security.Permission permission)
确定此 EJBRoleRefPermission 是否“隐含有”参数 Permission。要实现这一点:
上述名称和 actions 比较是区分大小写的。
permission | 检查“此”EJBRoleRefPermission,了解它是否隐含有参数 Permission。 |
return | 如果此对象隐含指定的权限,则返回 true;否则返回 false。 |
implies
public boolean implies(Permission permission)
- Determines if the argument Permission is "implied by" this
EJBRoleRefPermission. For this to be the case,
- The argument must be an instanceof EJBRoleRefPermission
- with name equivalent to that of this EJBRoleRefPermission, and
- with the role reference equivalent to that of this EJBRoleRefPermission applies.
The name and actions comparisons described above are case sensitive.
- Specified by:
implies
in classPermission
- Parameters:
permission
- "this" EJBRoleRefPermission is checked to see if it implies the argument permission.- Returns:
- true if the specified permission is implied by this object, false if not.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Submit a bug or feature
Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.
PS : 未经我党受权你也可自由散发此文档。 如有任何错误请自行修正;若因此而造成任何损失请直接找人民主席,请勿与本人联系。谢谢!