2362N/A * Copyright (c) 2000, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 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 * 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 * 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. 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 0N/A * The ExecPermission class represents permission for rmid to execute 0N/A * a specific command to launch an activation group. An ExecPermission 0N/A * consists of a pathname of a command to launch an activation group. 0N/A * Pathname is the pathname of the file or directory to grant rmid 0N/A * execute permission. A pathname that ends in "/*" (where "/" is 0N/A * the file separator character, <code>File.separatorChar</code>) indicates 0N/A * all the files and directories contained in that directory. A pathname 0N/A * that ends with "/-" indicates (recursively) all files 0N/A * and subdirectories contained in that directory. A pathname consisting of 0N/A * the special token "<<ALL FILES>>" matches <bold>any</bold> file. 0N/A * Note: A pathname consisting of a single "*" indicates all the files 0N/A * in the current directory, while a pathname consisting of a single "-" 0N/A * indicates all the files in the current directory and 0N/A * (recursively) all files and subdirectories contained in the current 0N/A * @author Ann Wollrath 0N/A * UID for serialization 0N/A * Creates a new ExecPermission object with the specified path. 0N/A * <i>path</i> is the pathname of a file or directory. 0N/A * <p>A pathname that ends in "/*" (where "/" is 0N/A * the file separator character, <code>File.separatorChar</code>) indicates 0N/A * a directory and all the files contained in that directory. A pathname 0N/A * that ends with "/-" indicates a directory and (recursively) all files 0N/A * and subdirectories contained in that directory. The special pathname 0N/A * "<<ALL FILES>>" matches all files. 0N/A * <p>A pathname consisting of a single "*" indicates all the files 0N/A * in the current directory, while a pathname consisting of a single "-" 0N/A * indicates all the files in the current directory and 0N/A * (recursively) all files and subdirectories contained in the current 0N/A * Creates a new ExecPermission object with the specified path. 0N/A * <i>path</i> is the pathname of a file or directory. 0N/A * <p>A pathname that ends in "/*" (where "/" is 0N/A * the file separator character, <code>File.separatorChar</code>) indicates 0N/A * a directory and all the files contained in that directory. A pathname 0N/A * that ends with "/-" indicates a directory and (recursively) all files 0N/A * and subdirectories contained in that directory. The special pathname 0N/A * "<<ALL FILES>>" matches all files. 0N/A * <p>A pathname consisting of a single "*" indicates all the files 0N/A * in the current directory, while a pathname consisting of a single "-" 0N/A * indicates all the files in the current directory and 0N/A * (recursively) all files and subdirectories contained in the current 0N/A * @param actions the action string (unused) 0N/A * Checks if this ExecPermission object "implies" the specified permission. 0N/A * More specifically, this method returns true if:<p> 0N/A * <li> <i>p</i> is an instanceof ExecPermission,<p> and 0N/A * <li> <i>p</i>'s pathname is implied by this object's 0N/A * pathname. For example, "/tmp/*" implies "/tmp/foo", since 0N/A * "/tmp/*" encompasses the "/tmp" directory and all files in that 0N/A * directory, including the one named "foo". 0N/A * @param p the permission to check against. 0N/A * @return true if the specified permission is implied by this object, 0N/A * Checks two ExecPermission objects for equality. 0N/A * Checks that <i>obj</i>'s class is the same as this object's class 0N/A * and has the same name as this object. 0N/A * @param obj the object we are testing for equality with this object. 0N/A * @return true if <i>obj</i> is an ExecPermission, and has the same 0N/A * pathname as this ExecPermission object, false otherwise. 0N/A * Returns the hash code value for this object. 0N/A * @return a hash code value for this object. 0N/A * Returns the canonical string representation of the actions. 0N/A * @return the canonical string representation of the actions. 0N/A * Returns a new PermissionCollection object for storing 0N/A * ExecPermission objects. 0N/A * A ExecPermissionCollection stores a collection of 0N/A * ExecPermission permissions. 0N/A * <p>ExecPermission objects must be stored in a manner that allows 0N/A * them to be inserted in any order, but that also enables the 0N/A * PermissionCollection <code>implies</code> method 0N/A * to be implemented in an efficient (and consistent) manner. 0N/A * @return a new PermissionCollection object suitable for 0N/A * storing ExecPermissions. 0N/A * readObject is called to restore the state of the ExecPermission 0N/A // init is called to initialize the rest of the values. 0N/A * Initialize a ExecPermission object. Common to all constructors. 0N/A * Also called during de-serialization. 0N/A * A ExecPermissionCollection stores a collection 0N/A * of ExecPermission permissions. ExecPermission objects 0N/A * must be stored in a manner that allows them to be inserted in any 0N/A * order, but enable the implies function to evaluate the implies 0N/A * method in an efficient (and consistent) manner. 0N/A * Create an empty ExecPermissionCollection. 0N/A * Adds a permission to the collection. 0N/A * @param permission the Permission object to add. 0N/A * @exception IllegalArgumentException - if the permission is not a 0N/A * @exception SecurityException - if this ExecPermissionCollection 0N/A * object has been marked readonly 0N/A * Check and see if this set of permissions implies the permissions 0N/A * expressed in "permission". 0N/A * @param p the Permission object to compare 0N/A * @return true if "permission" is a proper subset of a permission in 0N/A * the set, false if not. 0N/A * Returns an enumeration of all the ExecPermission objects in the 0N/A * @return an enumeration of all the ExecPermission objects.