public final class EJBMethodPermission extends Permission implements Serializable
Constructor and Description |
---|
EJBMethodPermission(String name,
String actions)
Creates a new EJBMethodPermission with the specified name and actions.
|
EJBMethodPermission(String ejbName,
String methodInterface,
Method method)
Creates a new EJBMethodPermission with name corresponding to the EJBName
and actions composed from methodInterface, and the Method object.
|
EJBMethodPermission(String ejbName,
String methodName,
String methodInterface,
String[] methodParams)
Creates a new EJBMethodPermission with name corresponding to the EJBName
and actions composed from methodName, methodInterface, and methodParams.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object p)
Compare two EJBMethodPermissions.
|
String |
getActions()
Returns a String containing a canonical representation of the actions of
this EJBMethodPermission.
|
int |
hashCode()
Calculates the hash code as the hash of the methodName,
methodInterface and methodSig for each that is non-null.
|
boolean |
implies(Permission p)
Determines if the argument Permission is "implied by" this
EJBMethodPermission.
|
String |
toString()
Method string represented by this permission
|
checkGuard, getName, newPermissionCollection
public EJBMethodPermission(String name, String actions)
name
- - the ejb-name to which the permission pertains.actions
- - identifies the methods of the EJB to which the permission
pertains.public EJBMethodPermission(String ejbName, String methodInterface, Method method)
ejbName
- - the ejb-name of the target EJBmethodInterface
- - A string that may be used to specify the EJB
interface to which the permission pertains. A value of null or "",
indicates that the permission pertains to all methods that match the other
parameters of the permission specification without consideration of the
interface they occur on.method
- - an instance of the Java.lang.reflect.Method class
corresponding to the method that the container is trying to determine
whether the caller has permission to access. This value must not be null.public EJBMethodPermission(String ejbName, String methodName, String methodInterface, String[] methodParams)
ejbName
- - the ejb-name of the target EJBmethodName
- - A string that may be used to indicate the method of the
EJB to which the permission pertains. A value of null or "" indicates that
the permission pertains to all methods that match the other parameters of
the permission specification without consideration of method name.methodInterface
- - A string that may be used to specify the EJB
interface to which the permission pertains. A value of null or "",
indicates that the permission pertains to all methods that match the
other parameters of the permission specification without consideration of
the interface they occur on.methodParams
- - An array of strings that may be used to specify
(by typeNames) the parameter signature of the target methods. The order of
the typeNames in methodParams array must match the order of occurence of
the corresponding parameters in the method signature of the target
method(s). Each typeName in the methodParams array must contain the
canonical form of the corresponding parameter's typeName as defined by the
getActions method. An empty methodParams array is used to represent a
method signature with no arguments. A value of null indicates that the
permission pertains to all methods that match the other parameters of the
permission specification without consideration of method signature.public boolean equals(Object p)
equals
in class Permission
p
- the EJBMethodPermission instance to compare againstpublic int hashCode()
hashCode
in class Permission
public String getActions()
getActions
in class Permission
public boolean implies(Permission p)
implies
in class Permission
p
- the EJBMethodPermission checked to see if it this.public String toString()
toString
in class Permission
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.