KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > javax > management > remote > SubjectDelegationPermission


1 /*
2  * @(#)SubjectDelegationPermission.java 1.9 03/12/19
3  *
4  * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
5  * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
6  */

7
8 package javax.management.remote;
9
10 import java.security.BasicPermission JavaDoc;
11
12 /**
13  * <p>Permission required by an authentication identity to perform
14  * operations on behalf of an authorization identity.</p>
15  *
16  * <p>A SubjectDelegationPermission contains a name (also referred
17  * to as a "target name") but no actions list; you either have the
18  * named permission or you don't.</p>
19  *
20  * <p>The target name is the name of the authorization principal
21  * classname followed by a period and the authorization principal
22  * name, that is
23  * <code>"<em>PrincipalClassName</em>.<em>PrincipalName</em>"</code>.</p>
24  *
25  * <p>An asterisk may appear by itself, or if immediately preceded
26  * by a "." may appear at the end of the target name, to signify a
27  * wildcard match.</p>
28  *
29  * <p>For example, "*", "javax.management.remote.JMXPrincipal.*" and
30  * "javax.management.remote.JMXPrincipal.delegate" are valid target
31  * names. The first one denotes any principal name from any principal
32  * class, the second one denotes any principal name of the concrete
33  * principal class <code>javax.management.remote.JMXPrincipal</code>
34  * and the third one denotes a concrete principal name
35  * <code>delegate</code> of the concrete principal class
36  * <code>javax.management.remote.JMXPrincipal</code>.</p>
37  *
38  * @since 1.5
39  * @since.unbundled 1.0
40  */

41 public final class SubjectDelegationPermission extends BasicPermission JavaDoc {
42
43     private static final long serialVersionUID = 1481618113008682343L;
44
45     /**
46      * Creates a new SubjectDelegationPermission with the specified name.
47      * The name is the symbolic name of the SubjectDelegationPermission.
48      *
49      * @param name the name of the SubjectDelegationPermission
50      *
51      * @throws NullPointerException if <code>name</code> is
52      * <code>null</code>.
53      * @throws IllegalArgumentException if <code>name</code> is empty.
54      */

55     public SubjectDelegationPermission(String JavaDoc name) {
56         super(name);
57     }
58
59     /**
60      * Creates a new SubjectDelegationPermission object with the
61      * specified name. The name is the symbolic name of the
62      * SubjectDelegationPermission, and the actions String is
63      * currently unused and must be null.
64      *
65      * @param name the name of the SubjectDelegationPermission
66      * @param actions must be null.
67      *
68      * @throws NullPointerException if <code>name</code> is
69      * <code>null</code>.
70      * @throws IllegalArgumentException if <code>name</code> is empty
71      * or <code>actions</code> is not null.
72      */

73     public SubjectDelegationPermission(String JavaDoc name, String JavaDoc actions) {
74         super(name, actions);
75
76     if (actions != null)
77         throw new IllegalArgumentException JavaDoc("Non-null actions");
78     }
79 }
80
Popular Tags