📄 policyconfiguration.html
字号:
void <B>addToRole</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> roleName, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/PermissionCollection.html" title="class or interface in java.security">PermissionCollection</A> permissions) throws <A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></PRE><DL><DD>Used to add permissions to a named role in this PolicyConfiguration. If the named Role does not exist in the PolicyConfiguration, it is created as a result of the call to this function. <P> It is the job of the Policy provider to ensure that all the permissions added to a role are granted to principals "mapped to the role". <P><P><DD><DL><DT><B>Parameters:</B><DD><CODE>roleName</CODE> - the name of the Role to which the permissions are to be added. <P><DD><CODE>permissions</CODE> - the collection of permissions to be added to the role. The collection may be either a homogenous or heterogenous collection.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if called by an AccessControlContext that has not been granted the "setPolicy" SecurityPermission.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the state of the policy context whose interface is this PolicyConfiguration Object is "deleted" or "inService" when this method is called.<DD><CODE><A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></CODE> - if the implementation throws a checked exception that has not been accounted for by the addToRole method signature. The exception thrown by the implementation class will be encapsulated (during construction) in the thrown PolicyContextException.</DL></DD></DL><HR><A NAME="addToRole(java.lang.String, java.security.Permission)"><!-- --></A><H3>addToRole</H3><PRE>void <B>addToRole</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> roleName, <A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/Permission.html" title="class or interface in java.security">Permission</A> permission) throws <A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></PRE><DL><DD>Used to add a single permission to a named role in this PolicyConfiguration. If the named Role does not exist in the PolicyConfiguration, it is created as a result of the call to this function. <P> It is the job of the Policy provider to ensure that all the permissions added to a role are granted to principals "mapped to the role". <P><P><DD><DL><DT><B>Parameters:</B><DD><CODE>roleName</CODE> - the name of the Role to which the permission is to be added. <P><DD><CODE>permission</CODE> - the permission to be added to the role.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if called by an AccessControlContext that has not been granted the "setPolicy" SecurityPermission.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the state of the policy context whose interface is this PolicyConfiguration Object is "deleted" or "inService" when this method is called.<DD><CODE><A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></CODE> - if the implementation throws a checked exception that has not been accounted for by the addToRole method signature. The exception thrown by the implementation class will be encapsulated (during construction) in the thrown PolicyContextException.</DL></DD></DL><HR><A NAME="addToUncheckedPolicy(java.security.PermissionCollection)"><!-- --></A><H3>addToUncheckedPolicy</H3><PRE>void <B>addToUncheckedPolicy</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/PermissionCollection.html" title="class or interface in java.security">PermissionCollection</A> permissions) throws <A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></PRE><DL><DD>Used to add unchecked policy statements to this PolicyConfiguration. <P><P><DD><DL><DT><B>Parameters:</B><DD><CODE>permissions</CODE> - the collection of permissions to be added as unchecked policy statements. The collection may be either a homogenous or heterogenous collection.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if called by an AccessControlContext that has not been granted the "setPolicy" SecurityPermission.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the state of the policy context whose interface is this PolicyConfiguration Object is "deleted" or "inService" when this method is called.<DD><CODE><A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></CODE> - if the implementation throws a checked exception that has not been accounted for by the addToUncheckedPolicy method signature. The exception thrown by the implementation class will be encapsulated (during construction) in the thrown PolicyContextException.</DL></DD></DL><HR><A NAME="addToUncheckedPolicy(java.security.Permission)"><!-- --></A><H3>addToUncheckedPolicy</H3><PRE>void <B>addToUncheckedPolicy</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> permission) throws <A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></PRE><DL><DD>Used to add a single unchecked policy statement to this PolicyConfiguration. <P><P><DD><DL><DT><B>Parameters:</B><DD><CODE>permission</CODE> - the permission to be added to the unchecked policy statements.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if called by an AccessControlContext that has not been granted the "setPolicy" SecurityPermission.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the state of the policy context whose interface is this PolicyConfiguration Object is "deleted" or "inService" when this method is called.<DD><CODE><A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></CODE> - if the implementation throws a checked exception that has not been accounted for by the addToUncheckedPolicy method signature. The exception thrown by the implementation class will be encapsulated (during construction) in the thrown PolicyContextException.</DL></DD></DL><HR><A NAME="addToExcludedPolicy(java.security.PermissionCollection)"><!-- --></A><H3>addToExcludedPolicy</H3><PRE>void <B>addToExcludedPolicy</B>(<A HREF="http://java.sun.com/j2se/1.5/docs/api/java/security/PermissionCollection.html" title="class or interface in java.security">PermissionCollection</A> permissions) throws <A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></PRE><DL><DD>Used to add excluded policy statements to this PolicyConfiguration. <P><P><DD><DL><DT><B>Parameters:</B><DD><CODE>permissions</CODE> - the collection of permissions to be added to the excluded policy statements. The collection may be either a homogenous or heterogenous collection.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if called by an AccessControlContext that has not been granted the "setPolicy" SecurityPermission.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the state of the policy context whose interface is this PolicyConfiguration Object is "deleted" or "inService" when this method is called.<DD><CODE><A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></CODE> - if the implementation throws a checked exception that has not been accounted for by the addToExcludedPolicy method signature. The exception thrown by the implementation class will be encapsulated (during construction) in the thrown PolicyContextException.</DL></DD></DL><HR><A NAME="addToExcludedPolicy(java.security.Permission)"><!-- --></A><H3>addToExcludedPolicy</H3><PRE>void <B>addToExcludedPolicy</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> permission) throws <A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></PRE><DL><DD>Used to add a single excluded policy statement to this PolicyConfiguration. <P><P><DD><DL><DT><B>Parameters:</B><DD><CODE>permission</CODE> - the permission to be added to the excluded policy statements.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if called by an AccessControlContext that has not been granted the "setPolicy" SecurityPermission.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the state of the policy context whose interface is this PolicyConfiguration Object is "deleted" or "inService" when this method is called.<DD><CODE><A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></CODE> - if the implementation throws a checked exception that has not been accounted for by the addToExcludedPolicy method signature. The exception thrown by the implementation class will be encapsulated (during construction) in the thrown PolicyContextException.</DL></DD></DL><HR><A NAME="removeRole(java.lang.String)"><!-- --></A><H3>removeRole</H3><PRE>void <B>removeRole</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> roleName) throws <A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></PRE><DL><DD>Used to remove a role and all its permissions from this PolicyConfiguration. <P><P><DD><DL><DT><B>Parameters:</B><DD><CODE>roleName</CODE> - the name of the Role to remove from this PolicyConfiguration.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if called by an AccessControlContext that has not been granted the "setPolicy" SecurityPermission.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the state of the policy context whose interface is this PolicyConfiguration Object is "deleted" or "inService" when this method is called.<DD><CODE><A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></CODE> - if the implementation throws a checked exception that has not been accounted for by the removeRole method signature. The exception thrown by the implementation class will be encapsulated (during construction) in the thrown PolicyContextException.</DL></DD></DL><HR><A NAME="removeUncheckedPolicy()"><!-- --></A><H3>removeUncheckedPolicy</H3><PRE>void <B>removeUncheckedPolicy</B>() throws <A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></PRE><DL><DD>Used to remove any unchecked policy statements from this PolicyConfiguration.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang">SecurityException</A></CODE> - if called by an AccessControlContext that has not been granted the "setPolicy" SecurityPermission.<DD><CODE><A HREF="http://java.sun.com/j2se/1.5/docs/api/java/lang/UnsupportedOperationException.html" title="class or interface in java.lang">UnsupportedOperationException</A></CODE> - if the state of the policy context whose interface is this PolicyConfiguration Object is "deleted" or "inService" when this method is called.<DD><CODE><A HREF="../../../javax/security/jacc/PolicyContextException.html" title="class in javax.security.jacc">PolicyContextException</A></CODE> - if the implementation throws a checked exception that has not been accounted for by the removeUncheckedPolicy method signature. The exception thrown
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -