⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 webresourcepermission.html

📁 j2ee帮助文档软件设计/软件工程 文件格式
💻 HTML
📖 第 1 页 / 共 2 页
字号:
          HTTPMethodSpec ::= null | HTTPMethodExceptionList |                    HTTPMethodList </Pre><P> If duplicates occur in the HTTPMethodSpec  they must be eliminated by the permission constructor. <P> A null or empty string HTTPMethodSpec indicates that the permission applies to all HTTP methods at the resources identified by the URL pattern. <P> If the HTTPMethodSpec contains an HTTPMethodExceptionList (i.e.,  it begins with an exclaimationPoint), the permission pertains to all  methods except those occuring in the exception list. <P><P><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - 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. <P><DD><CODE>actions</CODE> - identifies the HTTP methods to which the permission pertains. If the value passed through this parameter is null or the empty string, then the permission pertains to all the possible  HTTP methods.</DL></DL><HR><A NAME="WebResourcePermission(java.lang.String, java.lang.String[])"><!-- --></A><H3>WebResourcePermission</H3><PRE>public <B>WebResourcePermission</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;urlPatternSpec,                             <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]&nbsp;HTTPMethods)</PRE><DL><DD>Creates a new WebResourcePermission with name corresponding to the URLPatternSpec, and actions composed from the array of HTTP methods. <P><P><DL><DT><B>Parameters:</B><DD><CODE>urlPatternSpec</CODE> - 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. <P><DD><CODE>HTTPMethods</CODE> - 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 pertains to all the possible HTTP methods.</DL></DL><HR><A NAME="WebResourcePermission(javax.servlet.http.HttpServletRequest)"><!-- --></A><H3>WebResourcePermission</H3><PRE>public <B>WebResourcePermission</B>(<A HREF="../../../javax/servlet/http/HttpServletRequest.html" title="interface in javax.servlet.http">HttpServletRequest</A>&nbsp;request)</PRE><DL><DD>Creates a new WebResourcePermission from the HttpServletRequest object. <P><P><DL><DT><B>Parameters:</B><DD><CODE>request</CODE> - 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 permission's actions field is obtained from  HttpServletRequest.getMethod().</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A>&nbsp;o)</PRE><DL><DD>Checks two WebResourcePermission objects for equality. WebResourcePermission objects are equivalent if their  URLPatternSpec and (canonicalized) actions values are equivalent. The URLPatternSpec of a reference permission is equivalent to that of an argument permission if their first patterns are equivalent, and the patterns of the URLPatternList of the reference permission collectively match exactly the same set of patterns as are matched by the patterns of the URLPatternList of the  argument permission. <P> Two Permission objects, P1 and P2, are equivalent if and only if P1.implies(P2) && P2.implies(P1). <P><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/Permission.html#equals(java.lang.Object)" title="class or interface in java.security">equals</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/Permission.html" title="class or interface in java.security">Permission</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>o</CODE> - the WebResourcePermission object being tested for equality with this WebResourcePermission. <P><DT><B>Returns:</B><DD>true if the argument WebResourcePermission object is equivalent to this WebResourcePermission.</DL></DD></DL><HR><A NAME="getActions()"><!-- --></A><H3>getActions</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getActions</B>()</PRE><DL><DD>Returns a canonical String representation of the actions of this WebResourcePermission. In the canonical form, predefined methods preceed extension methods, and within each method classification the corresponding methods occur in ascending lexical order. There may be  no duplicate HTTP methods in the canonical form, and the canonical  form of the set of all HTTP methods is the value null. <P><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/Permission.html#getActions()" title="class or interface in java.security">getActions</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/Permission.html" title="class or interface in java.security">Permission</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a String containing the canonicalized actions of this WebResourcePermission (or the null value).</DL></DD></DL><HR><A NAME="hashCode()"><!-- --></A><H3>hashCode</H3><PRE>public int <B>hashCode</B>()</PRE><DL><DD>Returns the hash code value for this WebResourcePermission. The properties of the returned hash code must be as follows: <p> <ul> <li> During the lifetime of a Java application, the hashCode method      must return the same integer value, every time it is called on a      WebResourcePermission object. The value returned by hashCode for a      particular WebResourcePermission need not remain consistent from      one execution of an application to another. <li> If two WebResourcePermission 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). </ul> <P><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/Permission.html#hashCode()" title="class or interface in java.security">hashCode</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/Permission.html" title="class or interface in java.security">Permission</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the integer hash code value for this object.</DL></DD></DL><HR><A NAME="implies(java.security.Permission)"><!-- --></A><H3>implies</H3><PRE>public boolean <B>implies</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/Permission.html" title="class or interface in java.security">Permission</A>&nbsp;permission)</PRE><DL><DD>Determines if the argument Permission is "implied by" this WebResourcePermission. For this to be the case, all of the following must be true: <p><ul> <li> The argument is an instanceof WebResourcePermission <li> The first URLPattern in the name of the argument permission      is matched by the first URLPattern in the name of this permission. <li> 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. <li> 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. <li> The HTTP methods represented by the actions of the argument       permission are a subset of the HTTP methods represented by the      actions of this permission. </ul> <P> URLPattern matching is performed using the <i>Servlet matching  rules</i> where two URL patterns match if they are related as follows: <p><ul> <li> their pattern values are String equivalent, or <li> this pattern is the path-prefix pattern "/*", or <li> this pattern is a path-prefix pattern (that is, it starts with       "/" and ends with "/*") and the argument pattern starts with the       substring of this pattern, minus its last 2 characters, and the      next character of the argument pattern, if there is one, is "/", or <li> this pattern is an extension pattern (that is, it starts with       "*.") and the argument pattern ends with this pattern, or <li> the reference pattern is the special default pattern, "/",      which matches all argument patterns. </ul> <P> All of the comparisons described above are case sensitive. <P><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/Permission.html#implies(java.security.Permission)" title="class or interface in java.security">implies</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/Permission.html" title="class or interface in java.security">Permission</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>permission</CODE> - "this" WebResourcePermission is checked to see if it implies the argument permission. <P><DT><B>Returns:</B><DD>true if the specified permission is implied by this object, false if not.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../javax/security/jacc/PolicyContextHandler.html" title="interface in javax.security.jacc"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../javax/security/jacc/WebRoleRefPermission.html" title="class in javax.security.jacc"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?javax/security/jacc/WebResourcePermission.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="WebResourcePermission.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2007 Sun Microsystems, Inc. All rights reserved. Use is subject to <a href="../legal/license.html" target="_top">license terms.</a></font></BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -