OSDN Git Service

1e95f0a813c9b1ea9600d6ec6d8b06b7c7c76237
[pf3gnuchains/gcc-fork.git] / libjava / java / security / SecurityPermission.java
1 /* SecurityPermission.java -- Class for named security permissions
2    Copyright (C) 1998 Free Software Foundation, Inc.
3
4 This file is part of GNU Classpath.
5
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING.  If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
20
21 As a special exception, if you link this library with other files to
22 produce an executable, this library does not by itself cause the
23 resulting executable to be covered by the GNU General Public License.
24 This exception does not however invalidate any other reasons why the
25 executable file might be covered by the GNU General Public License. */
26
27 package java.security;
28
29 /**
30  * This class provides a mechanism for specified named permissions 
31  * related to the Java security framework.  These permissions have no
32  * associated actions list.  They are either granted or no granted.
33  * <p>
34  * The list of valid permission names is:
35  * <p><ul>
36  * <li>getPolicy - Allows retrieval of the system security policy.
37  * <li>setPolicy - Allows the security policy to be changed.
38  * <li>getProperty.&lt;key&gt; - Allows retrieval of the value of the named
39  * property or all properties if &lt;key&gt is a '*'.
40  * <li>setProperty.&lt;key&gt; - Allows changing of the value of the named
41  * property or all properties if &lt;key&gt is a '*'.
42  * <li>insertProvider.&lt;key&gt; - Allows the named provider to be added,
43  * or any provide if the key is '*'.
44  * <li>removeProvider.&lt;key&gt; - Allows the named provider to be removed,
45  * or any provide if the key is '*'.
46  * <li>setSystemScope - Allows the system identity scope to be set.
47  * <li>setIdentityPublicKey - Allows the public key of an Identity to be set.
48  * <li>SetIdentityInfo - Allows the description of an Identity to be set.
49  * <li>addIdentityCertificate - Allows a certificate to be set for the public
50  * key of an identity.
51  * <li>removeIdentityCertificate - Allows a certificate to be removed from the 
52  * public key of an identity.
53  * <li>clearProviderProperties.&lt;key%gt; - Allows the properties of the
54  * named provider to be cleared, or all providers if key is '*'.
55  * <li>putProviderProperty.&lt;key%gt; - Allows the properties of the
56  * named provider to be changed, or all providers if key is '*'.
57  * <li>removeProviderProperty.&lt;key%gt; - Allows the properties of the
58  * named provider to be deleted, or all providers if key is '*'.
59  * <li>getSignerPrivateKey - Allows the retrieval of the private key for
60  * a signer.
61  * <li>setSignerKeyPair - Allows the public and private key of a Signer to
62  * be changed.
63  * </ul>
64  * <p>
65  * There is some degree of security risk in granting any of these permissions.
66  * Some of them can completely compromise system security.  Please exercise
67  * extreme caution in granting these permissions.
68  *
69  * @version 0.0
70  *
71  * @author Aaron M. Renn (arenn@urbanophile.com)
72  */
73 public final class SecurityPermission extends BasicPermission
74 {
75   /**
76    * This method initializes a new instance of <code>SecurityPermission</code>
77    * to have the specified name.
78    *
79    * @param name The name to assign to this permission.
80    */
81   public SecurityPermission(String name)
82   {
83     super(name);
84   }
85
86   /**
87    * This method initializes a new instance of <code>SecurityPermission</code>
88    * to have the specified name.  The actions parameter is ignored in this
89    * class.
90    *
91    * @param name The name to assign to this permission.
92    * @param actions The action list for this permission - ignored.
93    */
94   public SecurityPermission(String name, String actions)
95   {
96     super(name, actions);
97   }
98 }