class URLPatternSpec
extends java.lang.Object
Encapsulation of the URLPatternSpec defined in the WebResourcePermission
and WebUserDataPermission
classes.
WebResourcePermission}, {@link WebUserDataPermission}
Modifier and Type | Field and Description |
---|---|
(package private) URLPattern |
urlPattern
The first or only URLPattern in the specification
|
(package private) java.util.HashSet<URLPattern> |
urlPatternList |
Constructor and Description |
---|
URLPatternSpec(java.lang.String spec)
The specification contains a
URLPatternSpec that identifies the web resources to which the permissions
applies. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
int |
hashCode() |
(package private) boolean |
implies(URLPatternSpec spec)
Perform the permission
URLPattern matching:
the first URLPattern in the name of the argument permission is matched by the first URLPattern
in the name of this permission.
the first URLPattern in the name of the argument permission is NOT matched by any URLPattern
in the URLPatternList of the URLPatternSpec of this permission.
if the first URLPattern in the name of the argument permission matches the first URLPattern in
the URLPatternSpec of this permission, then every URLPattern in the URLPatternList of the
URLPatternSpec of this permission is matched by a URLPattern in the URLPatternList of the
argument permission.
|
URLPattern urlPattern
java.util.HashSet<URLPattern> urlPatternList
URLPatternSpec(java.lang.String spec)
The specification contains a URLPatternSpec
that identifies the web resources to which the permissions
applies. The syntax of a URLPatternSpec
is as follows:
URLPatternList ::= URLPattern | URLPatternList colon URLPattern URLPatternSpec ::= null | URLPattern | URLPattern colon URLPatternList
A null URLPatternSpec
is translated to the default URLPattern
, "/", by the permission constructor.
The empty string is an exact URLPattern
, and may occur anywhere in a URLPatternSpec
that an exact
URLPattern
may occur. The first URLPattern
in a URLPatternSpec
may be any of the pattern
types, exact, path-prefix, extension, or default as defined in the Java Servlet Specification). When a URLPatternSpec
includes a URLPatternList
, the patterns of the URLPatternList
identify the
resources to which the permission does NOT apply and depend on the pattern type and value of the first pattern as
follows:
URLPatternList
that matches the first pattern.URLPatternList
.URLPatternList
.URLPatternList
.URLPatternList
must not be present in the URLPatternSpec
.spec
- the String
representation of the URLPatternSpec
as defined by the JACC specification.boolean implies(URLPatternSpec spec)
Perform the permission URLPattern
matching:
URLPattern
in the name of the argument permission is matched by the first URLPattern
in the name of this permission.URLPattern
in the name of the argument permission is NOT matched by any URLPattern
in the URLPatternList
of the URLPatternSpec
of this permission.URLPattern
in the name of the argument permission matches the first URLPattern
in
the URLPatternSpec
of this permission, then every URLPattern
in the URLPatternList
of the
URLPatternSpec
of this permission is matched by a URLPattern
in the URLPatternList
of the
argument permission.
URLPattern
matching is performed using the Servlet matching rules where two URL
patterns match if
they are related as follows:
String
equivalent, orAll of the comparisons described above are case sensitive.
spec
- the URLPatternSpec
to which this URLPatternSpec
is to be compared.true
if this implies spec; false
otherwise.public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object