Package org.apache.tapestry.spec

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


    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

        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

        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

    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

    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

        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

        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

     * @since 3.0
     */

    public void testNulledApplication() throws Exception
    {
        IApplicationSpecification spec = parseApp("NulledApplication.application");

        assertNull(spec.getEngineClassName());
        assertNull(spec.getName());
        checkLine(spec, 25);

        assertNotNull(spec.getSpecificationLocation());
    }
View Full Code Here

     * @since 3.0
     */

    public void testComponentType() throws Exception
    {
        IApplicationSpecification spec = parseApp("ComponentType.application");

        assertEquals("/path/Fred.jwc", spec.getComponentSpecificationPath("Fred"));
    }
View Full Code Here

TOP

Related Classes of org.apache.tapestry.spec.IApplicationSpecification

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.