wt.security
Class PropAccess

java.lang.Object
  extended bywt.security.Access
      extended bywt.security.PropAccess
Direct Known Subclasses:
PropAccess_plugin

public class PropAccess
extends Access

Class that provides wrappers to priviledged property methods using the wt.security package. This allows applets to perform property operations that are typically restricted by the sandbox.

Supported API: true


Field Summary
 
Fields inherited from class wt.security.Access
 
Constructor Summary
PropAccess()
           
 
Method Summary
 Properties getEnv()
          Retrieves the system environment properties as expected from the deprecated System.getenv().
 String getEnv(String key)
          Retrieves the system environment properties as expected from the deprecated System.getenv() for the given key.
(package private)  Properties getEnv0()
           
static PropAccess getPropAccess()
          Get instance of PropAccess.
static PropAccess getPropAccess(Frame parentFrame)
          Get instance of PropAccess.
 Properties getSystemProperties()
          Wrapper for System.getProperties()

Supported API: true
(package private)  Properties getSystemProperties0()
           
 String getSystemProperty(String key)
          Wrapper for System.getProperty()
(package private)  String getSystemProperty0(String key)
           
private  Properties oldGetEnv0()
           
 void setSystemProperties(Properties props)
          Wrapper for System.setProperties()
(package private)  void setSystemProperties0(Properties props)
           
 
Methods inherited from class wt.security.Access
checkAccess, checkAccessAll, checkClass, checkClass, checkClass, getAccessImpl, setParentFrame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropAccess

public PropAccess()
Method Detail

getPropAccess

public static PropAccess getPropAccess(Frame parentFrame)
Get instance of PropAccess. This instance can then be used to perform property operation that are typically restricted by the sandbox.

Parameters:
parentFrame - the parent frame for security dialog boxes that may be presented

Supported API: true

getPropAccess

public static PropAccess getPropAccess()
Get instance of PropAccess. This instance can then be used to perform property operation that are typically restricted by the sandbox.

Supported API: true


getSystemProperties

public Properties getSystemProperties()
                               throws WTSecurityException
Wrapper for System.getProperties()

Supported API: true

Throws:
WTSecurityException

getSystemProperties0

Properties getSystemProperties0()
                          throws WTSecurityException
Throws:
WTSecurityException

setSystemProperties

public void setSystemProperties(Properties props)
                         throws WTSecurityException
Wrapper for System.setProperties()

Parameters:
props - the Properties object used within the set

Supported API: true
Throws:
WTSecurityException

setSystemProperties0

void setSystemProperties0(Properties props)
                    throws WTSecurityException
Throws:
WTSecurityException

getSystemProperty

public String getSystemProperty(String key)
                         throws WTSecurityException
Wrapper for System.getProperty()

Parameters:
key - the key for the property being requested

Supported API: true
Throws:
WTSecurityException

getSystemProperty0

String getSystemProperty0(String key)
                    throws WTSecurityException
Throws:
WTSecurityException

getEnv

public Properties getEnv()
                  throws WTSecurityException,
                         IOException
Retrieves the system environment properties as expected from the deprecated System.getenv(). This method retrieves the output of the set command under Windows and env command on UNIX platforms. This method will return an empty Properties object if the command is not found on the user's system.

Supported API: true

Throws:
WTSecurityException
IOException

getEnv0

Properties getEnv0()
             throws WTSecurityException,
                    IOException
Throws:
WTSecurityException
IOException

oldGetEnv0

private Properties oldGetEnv0()
                       throws WTSecurityException,
                              IOException
Throws:
WTSecurityException
IOException

getEnv

public String getEnv(String key)
              throws WTSecurityException,
                     IOException
Retrieves the system environment properties as expected from the deprecated System.getenv() for the given key. This method uses the properties object returned by the getEnv() to retrieve a specific key value. If multiple values are being retrieved, it is recommended retrieve these values from the Properties instance returned by getEnv().

Supported API: true

Throws:
WTSecurityException
IOException