0N/A/*
2362N/A * Copyright (c) 2003, 2007, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
0N/A * This code is free software; you can redistribute it and/or modify it
0N/A * under the terms of the GNU General Public License version 2 only, as
2362N/A * published by the Free Software Foundation. Oracle designates this
0N/A * particular file as subject to the "Classpath" exception as provided
2362N/A * by Oracle in the LICENSE file that accompanied this code.
0N/A *
0N/A * This code is distributed in the hope that it will be useful, but WITHOUT
0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
0N/A * version 2 for more details (a copy is included in the LICENSE file that
0N/A * accompanied this code).
0N/A *
0N/A * You should have received a copy of the GNU General Public License version
0N/A * 2 along with this work; if not, write to the Free Software Foundation,
0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/Apackage javax.management.remote;
0N/A
0N/Aimport java.security.BasicPermission;
0N/A
0N/A/**
0N/A * <p>Permission required by an authentication identity to perform
0N/A * operations on behalf of an authorization identity.</p>
0N/A *
0N/A * <p>A SubjectDelegationPermission contains a name (also referred
0N/A * to as a "target name") but no actions list; you either have the
0N/A * named permission or you don't.</p>
0N/A *
0N/A * <p>The target name is the name of the authorization principal
0N/A * classname followed by a period and the authorization principal
0N/A * name, that is
0N/A * <code>"<em>PrincipalClassName</em>.<em>PrincipalName</em>"</code>.</p>
0N/A *
0N/A * <p>An asterisk may appear by itself, or if immediately preceded
0N/A * by a "." may appear at the end of the target name, to signify a
0N/A * wildcard match.</p>
0N/A *
0N/A * <p>For example, "*", "javax.management.remote.JMXPrincipal.*" and
0N/A * "javax.management.remote.JMXPrincipal.delegate" are valid target
0N/A * names. The first one denotes any principal name from any principal
0N/A * class, the second one denotes any principal name of the concrete
0N/A * principal class <code>javax.management.remote.JMXPrincipal</code>
0N/A * and the third one denotes a concrete principal name
0N/A * <code>delegate</code> of the concrete principal class
0N/A * <code>javax.management.remote.JMXPrincipal</code>.</p>
0N/A *
0N/A * @since 1.5
0N/A */
0N/Apublic final class SubjectDelegationPermission extends BasicPermission {
0N/A
0N/A private static final long serialVersionUID = 1481618113008682343L;
0N/A
0N/A /**
0N/A * Creates a new SubjectDelegationPermission with the specified name.
0N/A * The name is the symbolic name of the SubjectDelegationPermission.
0N/A *
0N/A * @param name the name of the SubjectDelegationPermission
0N/A *
0N/A * @throws NullPointerException if <code>name</code> is
0N/A * <code>null</code>.
0N/A * @throws IllegalArgumentException if <code>name</code> is empty.
0N/A */
0N/A public SubjectDelegationPermission(String name) {
0N/A super(name);
0N/A }
0N/A
0N/A /**
0N/A * Creates a new SubjectDelegationPermission object with the
0N/A * specified name. The name is the symbolic name of the
0N/A * SubjectDelegationPermission, and the actions String is
0N/A * currently unused and must be null.
0N/A *
0N/A * @param name the name of the SubjectDelegationPermission
0N/A * @param actions must be null.
0N/A *
0N/A * @throws NullPointerException if <code>name</code> is
0N/A * <code>null</code>.
0N/A * @throws IllegalArgumentException if <code>name</code> is empty
0N/A * or <code>actions</code> is not null.
0N/A */
0N/A public SubjectDelegationPermission(String name, String actions) {
0N/A super(name, actions);
0N/A
0N/A if (actions != null)
0N/A throw new IllegalArgumentException("Non-null actions");
0N/A }
0N/A}