Package org.apache.tapestry.services

Examples of org.apache.tapestry.services.ApplicationInitializerFilter


    public void contributeApplicationInitializer(
            OrderedConfiguration<ApplicationInitializerFilter> configuration,
            final ApplicationGlobals applicationGlobals, final PropertyAccess propertyAccess,
            final TypeCoercer typeCoercer)
    {
        ApplicationInitializerFilter setApplicationPackage = new ApplicationInitializerFilter()
        {
            public void initializeApplication(Context context, ApplicationInitializer initializer)
            {
                String packageName = context
                        .getInitParameter(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM);

                applicationGlobals.store(packageName);
                _componentClassResolver.setApplicationPackage(packageName);

                initializer.initializeApplication(context);
            }
        };

        configuration.add("SetApplicationPackage", setApplicationPackage, "before:*.*");

        final InvalidationListener listener = new InvalidationListener()
        {
            public void objectWasInvalidated()
            {
                propertyAccess.clearCache();
                typeCoercer.clearCache();
            }
        };

        ApplicationInitializerFilter clearCaches = new ApplicationInitializerFilter()
        {
            public void initializeApplication(Context context, ApplicationInitializer initializer)
            {
                // Snuck in here is the logic to clear the PropertyAccess service's cache whenever
                // the component class loader is invalidated.
View Full Code Here


            final PropertyAccess propertyAccess,

            @Inject("infrastructure:TypeCoercer")
            final TypeCoercer typeCoercer)
    {
        ApplicationInitializerFilter setApplicationPackage = new ApplicationInitializerFilter()
        {
            public void initializeApplication(Context context, ApplicationInitializer initializer)
            {
                String packageName = context
                        .getInitParameter(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM);

                _componentClassResolver.setApplicationPackage(packageName);

                initializer.initializeApplication(context);
            }
        };

        configuration.add("SetApplicationPackage", setApplicationPackage, "before:*.*");

        final InvalidationListener listener = new InvalidationListener()
        {
            public void objectWasInvalidated()
            {
                propertyAccess.clearCache();
                typeCoercer.clearCache();
            }
        };

        ApplicationInitializerFilter clearCaches = new ApplicationInitializerFilter()
        {
            public void initializeApplication(Context context, ApplicationInitializer initializer)
            {
                // Snuck in here is the logic to clear the PropertyAccess service's cache whenever
                // the component class loader is invalidated.
View Full Code Here

            final PropertyAccess propertyAccess,

            @Inject("alias:TypeCoercer")
            final TypeCoercer typeCoercer)
    {
        ApplicationInitializerFilter setApplicationPackage = new ApplicationInitializerFilter()
        {
            public void initializeApplication(Context context, ApplicationInitializer initializer)
            {
                String packageName = context
                        .getInitParameter(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM);

                applicationGlobals.store(packageName);
                _componentClassResolver.setApplicationPackage(packageName);

                initializer.initializeApplication(context);
            }
        };

        configuration.add("SetApplicationPackage", setApplicationPackage, "before:*.*");

        final InvalidationListener listener = new InvalidationListener()
        {
            public void objectWasInvalidated()
            {
                propertyAccess.clearCache();
                typeCoercer.clearCache();
            }
        };

        ApplicationInitializerFilter clearCaches = new ApplicationInitializerFilter()
        {
            public void initializeApplication(Context context, ApplicationInitializer initializer)
            {
                // Snuck in here is the logic to clear the PropertyAccess service's cache whenever
                // the component class loader is invalidated.
View Full Code Here

                propertyAccess.clearCache();
                typeCoercer.clearCache();
            }
        };

        ApplicationInitializerFilter clearCaches = new ApplicationInitializerFilter()
        {
            public void initializeApplication(Context context, ApplicationInitializer initializer)
            {
                // Snuck in here is the logic to clear the PropertyAccess service's cache whenever
                // the component class loader is invalidated.
View Full Code Here

            OrderedConfiguration<ApplicationInitializerFilter> configuration,
            @InjectService("tapestry.ioc.PropertyAccess")
            final PropertyAccess propertyAccess, @Inject("infrastructure:TypeCoercer")
            final TypeCoercer typeCoercer)
    {
        ApplicationInitializerFilter setApplicationPackage = new ApplicationInitializerFilter()
        {
            public void initializeApplication(Context context, ApplicationInitializer initializer)
            {
                String packageName = context
                        .getInitParameter(InternalConstants.TAPESTRY_APP_PACKAGE_PARAM);

                _componentClassResolver.setApplicationPackage(packageName);

                initializer.initializeApplication(context);
            }
        };

        configuration.add("SetApplicationPackage", setApplicationPackage, "before:*.*");

        final InvalidationListener listener = new InvalidationListener()
        {
            public void objectWasInvalidated()
            {
                propertyAccess.clearCache();
                typeCoercer.clearCache();
            }
        };

        ApplicationInitializerFilter clearCaches = new ApplicationInitializerFilter()
        {
            public void initializeApplication(Context context, ApplicationInitializer initializer)
            {
                // Snuck in here is the logic to clear the PropertyAccess service's cache whenever
                // the component class loader is invalidated.
View Full Code Here

                propertyAccess.clearCache();
                typeCoercer.clearCache();
            }
        };

        ApplicationInitializerFilter clearCaches = new ApplicationInitializerFilter()
        {
            public void initializeApplication(Context context, ApplicationInitializer initializer)
            {
                // Snuck in here is the logic to clear the PropertyAccess service's cache whenever
                // the component class loader is invalidated.
View Full Code Here

TOP

Related Classes of org.apache.tapestry.services.ApplicationInitializerFilter

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.