01: /*
02: * LoaderPermission.java September 2002
03: *
04: * Copyright (C) 2002, Niall Gallagher <niallg@users.sf.net>
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation.
09: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13: * GNU Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General
16: * Public License along with this library; if not, write to the
17: * Free Software Foundation, Inc., 59 Temple Place, Suite 330,
18: * Boston, MA 02111-1307 USA
19: */
20:
21: package simple.http.load;
22:
23: import java.security.BasicPermission;
24:
25: /**
26: * The <code>LoaderPermission</code> is used to provide access to
27: * the functions of the <code>LoaderManager</code>. This will
28: * grant permission to use the methods provided the correct
29: * actions strings are given. The permissions that can be granted
30: * are the "load", "update", and "link" actions.
31: * <p>
32: * This is required because the <code>LoaderManager</code> is
33: * given to the <code>Service</code> instances on creation. This
34: * ensures that loaded code can be restricted from changing the
35: * configuration of the <code>LoaderManager</code>.
36: *
37: * @author Niall Gallagher
38: */
39: public final class LoaderPermission extends BasicPermission {
40:
41: /**
42: * Constructor fot the <code>LoaderPermission</code> requires
43: * an action string. The actions that can be granted are the
44: * "load", "update" and, "link" actions. This can be used
45: * within security policy files as it follows the same naming
46: * scheme as the <code>BasicPermission</code>.
47: *
48: * @param action this is the action that is to be granted
49: */
50: public LoaderPermission(String action) {
51: super(action);
52: }
53: }
|