Package org.grails.core.legacy

Examples of org.grails.core.legacy.LegacyGrailsApplication


    public static void processAwareInterfaces(GrailsApplication grailsApplication, Object bean) {
        if (bean instanceof GrailsApplicationAware) {
            ((GrailsApplicationAware)bean).setGrailsApplication(grailsApplication);
        } else if(bean instanceof org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware) {
            ((org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware)bean).setGrailsApplication(new LegacyGrailsApplication(grailsApplication));
        }
        if (bean instanceof GrailsConfigurationAware) {
            ((GrailsConfigurationAware)bean).setConfiguration(grailsApplication.getConfig());
        }
    }
View Full Code Here


    public AbstractGrailsPlugin(Class<?> pluginClass, GrailsApplication application) {
        Assert.notNull(pluginClass, "Argument [pluginClass] cannot be null");
        Assert.isTrue(pluginClass.getName().endsWith(TRAILING_NAME),
                "Argument [pluginClass] with value [" + pluginClass +
                "] is not a Grails plugin (class name must end with 'GrailsPlugin')");
        this.application = new LegacyGrailsApplication(application);
        this.pluginClass = pluginClass;
    }
View Full Code Here

    /* (non-Javadoc)
     * @see grails.plugins.GrailsPlugin#setApplication(grails.core.GrailsApplication)
     */
    public void setApplication(GrailsApplication application) {
        this.application = new LegacyGrailsApplication(application);
    }
View Full Code Here

            }

            converterRegistry.addConverter(new Converter<GrailsApplication, org.codehaus.groovy.grails.commons.GrailsApplication>() {
                @Override
                public org.codehaus.groovy.grails.commons.GrailsApplication convert(GrailsApplication source) {
                    return new LegacyGrailsApplication(source);
                }
            });
            converterRegistry.addConverter(new Converter<ConfigMap.NullSafeNavigator, Object>() {
                @Override
                public Object convert(ConfigMap.NullSafeNavigator source) {
View Full Code Here

        this.grailsApplication = grailsApplication;
    }

    @Override
    public org.codehaus.groovy.grails.commons.GrailsApplication getGrailsApplication() {
        return new LegacyGrailsApplication(grailsApplication);
    }
View Full Code Here

TOP

Related Classes of org.grails.core.legacy.LegacyGrailsApplication

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.