org.apache.batik.util
public class ApplicationSecurityEnforcer extends Object
Field Summary | |
---|---|
static String | APP_MAIN_CLASS_DIR
Directory where classes are expanded in the development
version |
protected Class | appMainClass
The application's main entry point |
protected String | appMainClassRelativeURL
The resource name for the application's main class |
static String | EXCEPTION_ALIEN_SECURITY_MANAGER
Message for the SecurityException thrown when there is already
a SecurityManager installed at the time Squiggle tries
to install its own security settings. |
static String | EXCEPTION_NO_POLICY_FILE
Message for the NullPointerException thrown when no policy
file can be found. |
static String | JAR_PROTOCOL
Files in a jar file have a URL with the jar protocol |
static String | JAR_URL_FILE_SEPARATOR
Used in jar file urls to separate the jar file name
from the referenced file |
protected BatikSecurityManager | lastSecurityManagerInstalled
Keeps track of the last SecurityManager installed |
static String | PROPERTY_APP_DEV_BASE
System property for App's development base directory |
static String | PROPERTY_APP_JAR_BASE
System property for App's jars base directory |
static String | PROPERTY_JAVA_SECURITY_POLICY
System property for specifying an additional policy file. |
protected String | securityPolicy
The application's security policy |
Constructor Summary | |
---|---|
ApplicationSecurityEnforcer(Class appMainClass, String securityPolicy, String appJarFile)
Creates a new ApplicationSecurityEnforcer. | |
ApplicationSecurityEnforcer(Class appMainClass, String securityPolicy)
Creates a new ApplicationSecurityEnforcer. |
Method Summary | |
---|---|
void | enforceSecurity(boolean enforce)
Enforces security by installing a SecurityManager.
|
URL | getPolicyURL()
Returns the url for the default policy. |
void | installSecurityManager()
Installs a SecurityManager on behalf of the application |
Deprecated: This constructor is now deprecated. Use the two argument constructor instead as this version will be removed after the 1.5beta4 release.
Creates a new ApplicationSecurityEnforcer.Parameters: appMainClass class of the applications's main entry point securityPolicy resource for the security policy which should be enforced for the application. appJarFile the Jar file into which the application is packaged.
Parameters: appMainClass class of the applications's main entry point securityPolicy resource for the security policy which should be enforced for the application.