📄 acl.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Thu Apr 27 23:36:08 PDT 2000 --><TITLE>Java 2 Platform SE v1.3: Interface Acl</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Acl.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="../../../java/security/acl/AclEntry.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Acl.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">java.security.acl</FONT><BR>Interface Acl</H2><DL><DT><B>All Superinterfaces:</B> <DD><A HREF="../../../java/security/acl/Owner.html">Owner</A></DD></DL><HR><DL><DT>public interface <B>Acl</B><DT>extends <A HREF="../../../java/security/acl/Owner.html">Owner</A></DL><P>Interface representing an Access Control List (ACL). An Access Control List is a data structure used to guard access to resources.<p> An ACL can be thought of as a data structure with multiple ACL entries. Each ACL entry, of interface type AclEntry, contains a set of permissions associated with a particular principal. (A principal represents an entity such as an individual user or a group). Additionally, each ACL entry is specified as being either positive or negative. If positive, the permissions are to be granted to the associated principal. If negative, the permissions are to be denied.<p> The ACL Entries in each ACL observe the following rules:<p> <ul> <li>Each principal can have at most one positive ACL entry and one negative entry; that is, multiple positive or negative ACL entries are not allowed for any principal. Each entry specifies the set of permissions that are to be granted (if positive) or denied (if negative). <p> <li>If there is no entry for a particular principal, then the principal is considered to have a null (empty) permission set.<p> <li>If there is a positive entry that grants a principal a particular permission, and a negative entry that denies the principal the same permission, the result is as though the permission was never granted or denied. <p> <li>Individual permissions always override permissions of the group(s) to which the individual belongs. That is, individual negative permissions (specific denial of permissions) override the groups' positive permissions. And individual positive permissions override the groups' negative permissions.<p> </ul> The <code> java.security.acl </code> package provides the interfaces to the ACL and related data structures (ACL entries, groups, permissions, etc.), and the <code> sun.security.acl </code> classes provide a default implementation of the interfaces. For example, <code> java.security.acl.Acl </code> provides the interface to an ACL and the <code> sun.security.acl.AclImpl </code> class provides the default implementation of the interface.<p> The <code> java.security.acl.Acl </code> interface extends the <code> java.security.acl.Owner </code> interface. The Owner interface is used to maintain a list of owners for each ACL. Only owners are allowed to modify an ACL. For example, only an owner can call the ACL's <code>addEntry</code> method to add a new ACL entry to the ACL.<P><DL><DT><B>See Also: </B><DD><A HREF="../../../java/security/acl/AclEntry.html"><CODE>AclEntry</CODE></A>, <A HREF="../../../java/security/acl/Owner.html"><CODE>Owner</CODE></A>, <A HREF="../../../java/security/acl/Acl.html#getPermissions(java.security.Principal)"><CODE>getPermissions(java.security.Principal)</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/acl/Acl.html#addEntry(java.security.Principal, java.security.acl.AclEntry)">addEntry</A></B>(<A HREF="../../../java/security/Principal.html">Principal</A> caller, <A HREF="../../../java/security/acl/AclEntry.html">AclEntry</A> entry)</CODE><BR> Adds an ACL entry to this ACL.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/acl/Acl.html#checkPermission(java.security.Principal, java.security.acl.Permission)">checkPermission</A></B>(<A HREF="../../../java/security/Principal.html">Principal</A> principal, <A HREF="../../../java/security/acl/Permission.html">Permission</A> permission)</CODE><BR> Checks whether or not the specified principal has the specified permission.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/util/Enumeration.html">Enumeration</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/acl/Acl.html#entries()">entries</A></B>()</CODE><BR> Returns an enumeration of the entries in this ACL.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/acl/Acl.html#getName()">getName</A></B>()</CODE><BR> Returns the name of this ACL.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/util/Enumeration.html">Enumeration</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/acl/Acl.html#getPermissions(java.security.Principal)">getPermissions</A></B>(<A HREF="../../../java/security/Principal.html">Principal</A> user)</CODE><BR> Returns an enumeration for the set of allowed permissions for the specified principal (representing an entity such as an individual or a group).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/acl/Acl.html#removeEntry(java.security.Principal, java.security.acl.AclEntry)">removeEntry</A></B>(<A HREF="../../../java/security/Principal.html">Principal</A> caller, <A HREF="../../../java/security/acl/AclEntry.html">AclEntry</A> entry)</CODE><BR> Removes an ACL entry from this ACL.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/acl/Acl.html#setName(java.security.Principal, java.lang.String)">setName</A></B>(<A HREF="../../../java/security/Principal.html">Principal</A> caller, <A HREF="../../../java/lang/String.html">String</A> name)</CODE><BR> Sets the name of this ACL.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../java/lang/String.html">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../java/security/acl/Acl.html#toString()">toString</A></B>()</CODE><BR> Returns a string representation of the ACL contents.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.security.acl.Owner"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from interface java.security.acl.<A HREF="../../../java/security/acl/Owner.html">Owner</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../java/security/acl/Owner.html#addOwner(java.security.Principal, java.security.Principal)">addOwner</A>, <A HREF="../../../java/security/acl/Owner.html#deleteOwner(java.security.Principal, java.security.Principal)">deleteOwner</A>, <A HREF="../../../java/security/acl/Owner.html#isOwner(java.security.Principal)">isOwner</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== -->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -