Class ScriptingServiceInternalImpl

  • All Implemented Interfaces:
    ScriptingServiceInternal, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware

    public class ScriptingServiceInternalImpl
    extends Object
    implements ScriptingServiceInternal, org.springframework.context.ApplicationContextAware, org.springframework.beans.factory.InitializingBean
    Default implementation of ScriptingServiceInternal
    Since:
    4.0
    Author:
    joseross
    • Constructor Detail

      • ScriptingServiceInternalImpl

        @ConstructorProperties({"scriptEngineManager","sandboxInterceptor","scriptExtension","scriptPathFormat","enableVariableRestrictions","allowedBeans","marketplaceService","contentService","studioConfiguration"})
        public ScriptingServiceInternalImpl​(ScriptEngineManager scriptEngineManager,
                                            org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor sandboxInterceptor,
                                            String scriptExtension,
                                            String scriptPathFormat,
                                            boolean enableVariableRestrictions,
                                            String[] allowedBeans,
                                            MarketplaceService marketplaceService,
                                            ContentService contentService,
                                            StudioConfiguration studioConfiguration)
    • Method Detail

      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        Specified by:
        setApplicationContext in interface org.springframework.context.ApplicationContextAware
        Throws:
        org.springframework.beans.BeansException
      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      • executeRestScript

        public Object executeRestScript​(String siteId,
                                        String scriptUrl,
                                        javax.servlet.http.HttpServletRequest request,
                                        javax.servlet.http.HttpServletResponse response)
                                 throws groovy.util.ResourceException,
                                        groovy.util.ScriptException,
                                        ConfigurationException
        Description copied from interface: ScriptingServiceInternal
        Executes a REST script from the site repository
        Specified by:
        executeRestScript in interface ScriptingServiceInternal
        Parameters:
        siteId - the id of the site
        scriptUrl - the path of the script
        request - the current request
        response - the current response
        Returns:
        the value returned by the script
        Throws:
        groovy.util.ResourceException - if there is any error loading the script
        groovy.util.ScriptException - if there is any error executing the script
        ConfigurationException