public final class WebUserDataPermission extends Permission implements Serializable
Constructor and Description |
---|
WebUserDataPermission(javax.servlet.http.HttpServletRequest request)
Creates a new WebUserDataPermission from the HttpServletRequest object.
|
WebUserDataPermission(String name,
String actions)
Creates a new WebUserDataPermission with the specified name and actions.
|
WebUserDataPermission(String urlPatternSpec,
String[] httpMethods,
String transportType)
Creates a new WebUserDataPermission with name corresponding to the
URLPatternSpec, and actions composed from the array of HTTP methods and
the transport type.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object p)
Checks two WebUserDataPermission objects for equality.
|
String |
getActions()
Returns a canonical String representation of the actions of this
WebUserDataPermission.
|
int |
hashCode()
Returns the hash code value for this WebUserDataPermission.
|
boolean |
implies(Permission p)
Determines if the argument Permission is "implied by" this
WebUserDataPermission.
|
checkGuard, getName, newPermissionCollection, toString
public WebUserDataPermission(javax.servlet.http.HttpServletRequest request)
request
- - the HttpServletRequest object corresponding to the
Servlet operation to which the permission pertains. The permission name is
the substring of the requestURI (HttpServletRequest.getRequestURI()) that
begins after the contextPath (HttpServletRequest.getContextPath()). When
the substring operation yields the string "/", the permission is
constructed with the empty string as its name. The HTTP method component
of the permission's actions is as obtained from HttpServletRequest.getMethod().
The TransportType component of the permission's actions is determined by
calling HttpServletRequest.isSecure().public WebUserDataPermission(String name, String actions)
name
- - the URLPatternSpec that identifies the application specific
web resources to which the permission pertains. All URLPatterns in the
URLPatternSpec are relative to the context path of the deployed web
application module, and the same URLPattern must not occur more than once
in a URLPatternSpec. A null URLPatternSpec is translated to the default
URLPattern, "/", by the permission constructor.actions
- - identifies the HTTP methods and transport type to which
the permission pertains. If the value passed through this parameter is
null or the empty string, then the permission is constructed with actions
corresponding to all the possible HTTP methods and transportType "NONE".public WebUserDataPermission(String urlPatternSpec, String[] httpMethods, String transportType)
urlPatternSpec
- - the URLPatternSpec that identifies the application
specific web resources to which the permission pertains. All URLPatterns
in the URLPatternSpec are relative to the context path of the deployed web
application module, and the same URLPattern must not occur more than once
in a URLPatternSpec. A null URLPatternSpec is translated to the default
URLPattern, "/", by the permission constructor.httpMethods
- - an array of strings each element of which contains
the value of an HTTP method. If the value passed through this parameter is
null or is an array with no elements, then the permission is constructed
with actions containing all the possible HTTP methods.transportType
- - a String whose value is a transportType. If the
value passed through this parameter is null, then the permission is
constructed with actions containing transportType "NONE".public boolean equals(Object p)
equals
in class Permission
p
- - the WebUserDataPermission object being tested for equality.public String getActions()
getActions
in class Permission
public int hashCode()
hashCode
in class Permission
public boolean implies(Permission p)
implies
in class Permission
p
- - the WebUserDataPermission to testCopyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.