Examples of IApplicationSpecification


Examples of org.apache.tapestry.spec.IApplicationSpecification

    protected IPropertySource createPropertySource(RequestContext context)
    {
        DelegatingPropertySource result = new DelegatingPropertySource();

        ApplicationServlet servlet = context.getServlet();
        IApplicationSpecification spec = servlet.getApplicationSpecification();

        result.addSource(new PropertyHolderPropertySource(spec));
        result.addSource(new ServletPropertySource(servlet.getServletConfig()));
        result.addSource(new ServletContextPropertySource(servlet.getServletContext()));

        if (spec.checkExtension(EXTENSION_PROPERTY_SOURCE_NAME))
        {
            IPropertySource source =
                (IPropertySource) spec.getExtension(
                    EXTENSION_PROPERTY_SOURCE_NAME,
                    IPropertySource.class);

            result.addSource(source);
        }
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

        Locale locale)
    {
        if (_delegate == null)
        {
            IEngine engine = cycle.getEngine();
            IApplicationSpecification spec = engine.getSpecification();

            if (spec.checkExtension(Tapestry.TEMPLATE_SOURCE_DELEGATE_EXTENSION_NAME))
                _delegate =
                    (ITemplateSourceDelegate) spec.getExtension(
                        Tapestry.TEMPLATE_SOURCE_DELEGATE_EXTENSION_NAME,
                        ITemplateSourceDelegate.class);
            else
                _delegate = NullTemplateSourceDelegate.getSharedInstance();
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

        if (_root.getPage() != null)
        {
            if (_root.getPage().getEngine() != null)
            {
                IApplicationSpecification appSpec = _root.getPage().getEngine().getSpecification();

                if (appSpec != null && appSpec.checkExtension(Tapestry.OGNL_TYPE_CONVERTER))
                {
                    TypeConverter typeConverter =
                        (TypeConverter) appSpec.getExtension(
                            Tapestry.OGNL_TYPE_CONVERTER,
                            TypeConverter.class);

                    Ognl.setTypeConverter(_context, typeConverter);
                }
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

        _webInfLocation = _applicationRootLocation.getRelativeLocation("/WEB-INF/");

        _webInfAppLocation = _webInfLocation.getRelativeLocation(servletName + "/");

        IApplicationSpecification specification = engine.getSpecification();

        if (specification.checkExtension(Tapestry.SPECIFICATION_RESOLVER_DELEGATE_EXTENSION_NAME))
            _delegate =
                (ISpecificationResolverDelegate) engine.getSpecification().getExtension(
                    Tapestry.SPECIFICATION_RESOLVER_DELEGATE_EXTENSION_NAME,
                    ISpecificationResolverDelegate.class);
        else
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

    {

        // Use a one-shot digester, because you only parse the app spec
        // once.

        IApplicationSpecification result =
            (IApplicationSpecification) parse(constructApplicationDigester(), resourceLocation);

        result.setResourceResolver(_resolver);
        result.setSpecificationLocation(resourceLocation);
        result.instantiateImmediateExtensions();

        return result;
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

    protected IMultipartDecoder obtainMultipartDecoder(
        ApplicationServlet servlet,
        HttpServletRequest request)
        throws IOException
    {
        IApplicationSpecification spec = servlet.getApplicationSpecification();

        if (spec.checkExtension(Tapestry.MULTIPART_DECODER_EXTENSION_NAME))
            return (IMultipartDecoder) spec.getExtension(
                Tapestry.MULTIPART_DECODER_EXTENSION_NAME,
                IMultipartDecoder.class);

        return DefaultMultipartDecoder.getSharedInstance();
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

    private DecodedRequest getDecodedRequest()
    {
        if (_decodedRequest != null)
            return _decodedRequest;

        IApplicationSpecification spec = _servlet.getApplicationSpecification();
        IRequestDecoder decoder = null;

        if (!spec.checkExtension(Tapestry.REQUEST_DECODER_EXTENSION_NAME))
            decoder = new DefaultRequestDecoder();
        else
            decoder =
                (IRequestDecoder) spec.getExtension(
                    Tapestry.REQUEST_DECODER_EXTENSION_NAME,
                    IRequestDecoder.class);

        _decodedRequest = decoder.decodeRequest(_request);
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

    protected IPropertySource createPropertySource(RequestContext context)
    {
        DelegatingPropertySource result = new DelegatingPropertySource();

        ApplicationServlet servlet = context.getServlet();
        IApplicationSpecification spec = servlet.getApplicationSpecification();

        result.addSource(new PropertyHolderPropertySource(spec));
        result.addSource(new ServletPropertySource(servlet.getServletConfig()));
        result.addSource(new ServletContextPropertySource(servlet.getServletContext()));

        if (spec.checkExtension(EXTENSION_PROPERTY_SOURCE_NAME))
        {
            IPropertySource source =
                (IPropertySource) spec.getExtension(
                    EXTENSION_PROPERTY_SOURCE_NAME,
                    IPropertySource.class);

            result.addSource(source);
        }
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

        expectElement("application");

        String name = getAttribute("name");
        String engineClassName = getAttribute("engine-class");

        IApplicationSpecification as = _factory.createApplicationSpecification();

        as.setName(name);

        if (HiveMind.isNonBlank(engineClassName))
            as.setEngineClassName(engineClassName);

        _rootObject = as;

        push(_elementName, as, STATE_LIBRARY_SPECIFICATION);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

        expectElement("application");

        String name = getAttribute("name");
        String engineClassName = getAttribute("engine-class");

        IApplicationSpecification as = _factory.createApplicationSpecification();

        as.setName(name);

        if (HiveMind.isNonBlank(engineClassName))
            as.setEngineClassName(engineClassName);

        _rootObject = as;

        push(_elementName, as, STATE_LIBRARY_SPECIFICATION);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.