Class SandboxInterceptorFactory

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanClassLoaderAware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.FactoryBean<org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor>, org.springframework.beans.factory.InitializingBean

    public class SandboxInterceptorFactory
    extends org.springframework.beans.factory.config.AbstractFactoryBean<org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor>
    Implementation of FactoryBean for SandboxInterceptor
    Since:
    3.1.12
    Author:
    joseross
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.springframework.core.io.Resource blacklist
      Resource containing the restrictions
      protected boolean blacklistEnabled
      Indicates if the blacklist should be enabled
      protected boolean sandboxEnabled
      Indicates if the sandbox should be enabled
      • Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean

        logger
      • Fields inherited from interface org.springframework.beans.factory.FactoryBean

        OBJECT_TYPE_ATTRIBUTE
    • Constructor Summary

      Constructors 
      Constructor Description
      SandboxInterceptorFactory​(boolean sandboxEnabled, boolean blacklistEnabled, org.springframework.core.io.Resource blacklist)  
    • Field Detail

      • sandboxEnabled

        protected boolean sandboxEnabled
        Indicates if the sandbox should be enabled
      • blacklistEnabled

        protected final boolean blacklistEnabled
        Indicates if the blacklist should be enabled
      • blacklist

        protected org.springframework.core.io.Resource blacklist
        Resource containing the restrictions
    • Constructor Detail

      • SandboxInterceptorFactory

        @ConstructorProperties({"sandboxEnabled","blacklistEnabled","blacklist"})
        public SandboxInterceptorFactory​(boolean sandboxEnabled,
                                         boolean blacklistEnabled,
                                         org.springframework.core.io.Resource blacklist)
    • Method Detail

      • getObjectType

        public Class<?> getObjectType()
        Specified by:
        getObjectType in interface org.springframework.beans.factory.FactoryBean<org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor>
        Specified by:
        getObjectType in class org.springframework.beans.factory.config.AbstractFactoryBean<org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor>
      • createInstance

        protected org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor createInstance()
                                                                                                 throws Exception
        Specified by:
        createInstance in class org.springframework.beans.factory.config.AbstractFactoryBean<org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor>
        Throws:
        Exception