Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.batik.script.rhino
Class BatikSecurityController  view BatikSecurityController download BatikSecurityController.java

java.lang.Object
  extended bySecurityController
      extended byorg.apache.batik.script.rhino.BatikSecurityController

public class BatikSecurityController
extends SecurityController

This implementation of the Rhino SecurityController interface is meant for use within the context of Batik only. It is a partial implementation of the interface that does what is needed by Batik and no more.

Version:
$Id: BatikSecurityController.java,v 1.6 2004/08/18 07:14:57 vhardy Exp $

Constructor Summary
BatikSecurityController()
           
 
Method Summary
 GeneratedClassLoader createClassLoader(java.lang.ClassLoader parentLoader, java.lang.Object securityDomain)
          Default constructor
 java.lang.Object execWithDomain(Context cx, Scriptable scope, Script script, java.lang.Object securityDomain)
          Call Script#exec(Context cx, Scriptable scope) of script under restricted security domain where an action is allowed only if it is allowed according to the Java stack on the moment of the execWithDomain call and securityDomain.
 java.lang.Object getDynamicSecurityDomain(java.lang.Object securityDomain)
          Get dynamic security domain that allows an action only if it is allowed by the current Java stack and securityDomain.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BatikSecurityController

public BatikSecurityController()
Method Detail

createClassLoader

public GeneratedClassLoader createClassLoader(java.lang.ClassLoader parentLoader,
                                              java.lang.Object securityDomain)
Default constructor


getDynamicSecurityDomain

public java.lang.Object getDynamicSecurityDomain(java.lang.Object securityDomain)
Get dynamic security domain that allows an action only if it is allowed by the current Java stack and securityDomain. If securityDomain is null, return domain representing permissions allowed by the current stack.


execWithDomain

public java.lang.Object execWithDomain(Context cx,
                                       Scriptable scope,
                                       Script script,
                                       java.lang.Object securityDomain)
                                throws JavaScriptException
Call Script#exec(Context cx, Scriptable scope) of script under restricted security domain where an action is allowed only if it is allowed according to the Java stack on the moment of the execWithDomain call and securityDomain. Any call to getDynamicSecurityDomain(Object) 55 during execution of Script#exec(Context cx, Scriptable scope) should return a domain incorporate restrictions imposed by securityDomain.