In this section, you’ll see how you can supply your own permission class that users can refer to in their policy files.
To implement your permission class, extend the
Permission class and supply the following methods:
• A constructor with two
String parameters, for the target and the action list
boolean implies(Permission other)
The last method is the most important. Permissions have an ordering, in which more general permissions imply more specific ones. Consider the file permission
p1 = new FilePermission("/tmp/-", "read, write");
This permission allows reading and writing of any file in the
/tmp directory and any of its subdirectories.
This permission implies ...