Package org.springframework.scripting

Examples of org.springframework.scripting.ScriptSource


      String scriptFactoryBeanName = SCRIPT_FACTORY_NAME_PREFIX + beanName;
      String scriptedObjectBeanName = SCRIPTED_OBJECT_NAME_PREFIX + beanName;
      prepareScriptBeans(bd, scriptFactoryBeanName, scriptedObjectBeanName);

      ScriptFactory scriptFactory = this.scriptBeanFactory.getBean(scriptFactoryBeanName, ScriptFactory.class);
      ScriptSource scriptSource =
          getScriptSource(scriptFactoryBeanName, scriptFactory.getScriptSourceLocator());
      Class[] interfaces = scriptFactory.getScriptInterfaces();

      Class scriptedType = scriptFactory.getScriptedObjectType(scriptSource);
      if (scriptedType != null) {
View Full Code Here


    String scriptFactoryBeanName = SCRIPT_FACTORY_NAME_PREFIX + beanName;
    String scriptedObjectBeanName = SCRIPTED_OBJECT_NAME_PREFIX + beanName;
    prepareScriptBeans(bd, scriptFactoryBeanName, scriptedObjectBeanName);

    ScriptFactory scriptFactory = this.scriptBeanFactory.getBean(scriptFactoryBeanName, ScriptFactory.class);
    ScriptSource scriptSource =
        getScriptSource(scriptFactoryBeanName, scriptFactory.getScriptSourceLocator());
    boolean isFactoryBean = false;
    try {
      Class scriptedObjectType = scriptFactory.getScriptedObjectType(scriptSource);
      // Returned type may be null if the factory is unable to determine the type.
View Full Code Here

      if (!this.scriptBeanFactory.containsBeanDefinition(scriptedObjectBeanName)) {

        this.scriptBeanFactory.registerBeanDefinition(
            scriptFactoryBeanName, createScriptFactoryBeanDefinition(bd));
        ScriptFactory scriptFactory = this.scriptBeanFactory.getBean(scriptFactoryBeanName, ScriptFactory.class);
        ScriptSource scriptSource =
            getScriptSource(scriptFactoryBeanName, scriptFactory.getScriptSourceLocator());
        Class[] interfaces = scriptFactory.getScriptInterfaces();

        Class[] scriptedInterfaces = interfaces;
        if (scriptFactory.requiresConfigInterface() && !bd.getPropertyValues().isEmpty()) {
View Full Code Here

   * @return the corresponding ScriptSource instance
   * @see #convertToScriptSource
   */
  protected ScriptSource getScriptSource(String beanName, String scriptSourceLocator) {
    synchronized (this.scriptSourceCache) {
      ScriptSource scriptSource = this.scriptSourceCache.get(beanName);
      if (scriptSource == null) {
        scriptSource = convertToScriptSource(beanName, scriptSourceLocator, this.resourceLoader);
        this.scriptSourceCache.put(beanName, scriptSource);
      }
      return scriptSource;
View Full Code Here

    String scriptedObjectBeanName = SCRIPTED_OBJECT_NAME_PREFIX + beanName;
    prepareScriptBeans(bd, scriptFactoryBeanName, scriptedObjectBeanName);

    ScriptFactory scriptFactory =
        (ScriptFactory) this.scriptBeanFactory.getBean(scriptFactoryBeanName, ScriptFactory.class);
    ScriptSource scriptSource =
        getScriptSource(scriptFactoryBeanName, scriptFactory.getScriptSourceLocator());
    Class[] interfaces = scriptFactory.getScriptInterfaces();

    Class scriptedType = null;
    try {
View Full Code Here

    String scriptedObjectBeanName = SCRIPTED_OBJECT_NAME_PREFIX + beanName;
    prepareScriptBeans(bd, scriptFactoryBeanName, scriptedObjectBeanName);

    ScriptFactory scriptFactory =
        (ScriptFactory) this.scriptBeanFactory.getBean(scriptFactoryBeanName, ScriptFactory.class);
    ScriptSource scriptSource =
        getScriptSource(scriptFactoryBeanName, scriptFactory.getScriptSourceLocator());
    boolean isFactoryBean = false;
    try {
      Class scriptedObjectType = scriptFactory.getScriptedObjectType(scriptSource);
      // Returned type may be null if the factory is unable to determine the type.
View Full Code Here

        this.scriptBeanFactory.registerBeanDefinition(
            scriptFactoryBeanName, createScriptFactoryBeanDefinition(bd));
        ScriptFactory scriptFactory =
            (ScriptFactory) this.scriptBeanFactory.getBean(scriptFactoryBeanName, ScriptFactory.class);
        ScriptSource scriptSource =
            getScriptSource(scriptFactoryBeanName, scriptFactory.getScriptSourceLocator());
        Class[] interfaces = scriptFactory.getScriptInterfaces();

        Class[] scriptedInterfaces = interfaces;
        if (scriptFactory.requiresConfigInterface() && !bd.getPropertyValues().isEmpty()) {
View Full Code Here

   * @return the corresponding ScriptSource instance
   * @see #convertToScriptSource
   */
  protected ScriptSource getScriptSource(String beanName, String scriptSourceLocator) {
    synchronized (this.scriptSourceCache) {
      ScriptSource scriptSource = (ScriptSource) this.scriptSourceCache.get(beanName);
      if (scriptSource == null) {
        scriptSource = convertToScriptSource(beanName, scriptSourceLocator, this.resourceLoader);
        this.scriptSourceCache.put(beanName, scriptSource);
      }
      return scriptSource;
View Full Code Here

TOP

Related Classes of org.springframework.scripting.ScriptSource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.