1 /* 2 * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 27 package java.sql; 28 29 import java.security.*; 30 31 /** 32 * The permission for which the <code>SecurityManager</code> will check 33 * when code that is running an application with a 34 * <code>SecurityManager</code> enabled, calls the 35 * {@code DriverManager.deregisterDriver} method, 36 * <code>DriverManager.setLogWriter</code> method, 37 * <code>DriverManager.setLogStream</code> (deprecated) method, 38 * {@code SyncFactory.setJNDIContext} method, 39 * {@code SyncFactory.setLogger} method, 40 * {@code Connection.setNetworktimeout} method, 41 * or the <code>Connection.abort</code> method. 42 * If there is no <code>SQLPermission</code> object, these methods 43 * throw a <code>java.lang.SecurityException</code> as a runtime exception. 44 * <P> 45 * A <code>SQLPermission</code> object contains 46 * a name (also referred to as a "target name") but no actions 47 * list; there is either a named permission or there is not. 48 * The target name is the name of the permission (see below). The 49 * naming convention follows the hierarchical property naming convention. 50 * In addition, an asterisk 51 * may appear at the end of the name, following a ".", or by itself, to 52 * signify a wildcard match. For example: <code>loadLibrary.*</code> 53 * and <code>*</code> signify a wildcard match, 54 * while <code>*loadLibrary</code> and <code>a*b</code> do not. 55 * <P> 56 * The following table lists all the possible <code>SQLPermission</code> target names. 57 * The table gives a description of what the permission allows 58 * and a discussion of the risks of granting code the permission. 59 * 60 * | 1 /* 2 * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 27 package java.sql; 28 29 import java.security.*; 30 31 /** 32 * The permission for which the <code>SecurityManager</code> will check 33 * when code that is running an application with a 34 * <code>SecurityManager</code> enabled, calls the 35 * {@code DriverManager.deregisterDriver} method, 36 * <code>DriverManager.setLogWriter</code> method, 37 * <code>DriverManager.setLogStream</code> (deprecated) method, 38 * {@code SyncFactory.setJNDIContext} method, 39 * {@code SyncFactory.setLogger} method, 40 * {@code Connection.setNetworkTimeout} method, 41 * or the <code>Connection.abort</code> method. 42 * If there is no <code>SQLPermission</code> object, these methods 43 * throw a <code>java.lang.SecurityException</code> as a runtime exception. 44 * <P> 45 * A <code>SQLPermission</code> object contains 46 * a name (also referred to as a "target name") but no actions 47 * list; there is either a named permission or there is not. 48 * The target name is the name of the permission (see below). The 49 * naming convention follows the hierarchical property naming convention. 50 * In addition, an asterisk 51 * may appear at the end of the name, following a ".", or by itself, to 52 * signify a wildcard match. For example: <code>loadLibrary.*</code> 53 * and <code>*</code> signify a wildcard match, 54 * while <code>*loadLibrary</code> and <code>a*b</code> do not. 55 * <P> 56 * The following table lists all the possible <code>SQLPermission</code> target names. 57 * The table gives a description of what the permission allows 58 * and a discussion of the risks of granting code the permission. 59 * 60 * |