Examples of IApplicationSpecification


Examples of org.apache.tapestry.spec.IApplicationSpecification

    void trainIntialize(ExpressionEvaluator evaluator)
    {
        ExpressionEvaluatorImpl impl = (ExpressionEvaluatorImpl)evaluator;
       
        IApplicationSpecification as = newMock(IApplicationSpecification.class);

        expect(as.checkExtension(Tapestry.OGNL_TYPE_CONVERTER)).andReturn(false);

        impl.setApplicationSpecification(as);
        impl.setContributions(Collections.EMPTY_LIST);
        impl.setNullHandlerContributions(Collections.EMPTY_LIST);
        impl.setClassFactory(new ClassFactoryImpl());
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

        verify();
    }

    public void test_Type_Converter() throws Exception
    {
        IApplicationSpecification as = newMock(IApplicationSpecification.class);
       
        TypeConverter tc = newMock(TypeConverter.class);

        // Training

        expect(as.checkExtension(Tapestry.OGNL_TYPE_CONVERTER)).andReturn(true);

        expect(as.getExtension(Tapestry.OGNL_TYPE_CONVERTER, TypeConverter.class)).andReturn(tc);

        replay();

        ExpressionCacheImpl cache = new ExpressionCacheImpl();
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

    public IMonitor getMonitor(RequestContext context)
    {
        if (_monitorFactory == null)
        {
            IApplicationSpecification spec = getSpecification();

            if (spec.checkExtension(Tapestry.MONITOR_FACTORY_EXTENSION_NAME))
                _monitorFactory = (IMonitorFactory) spec.getExtension(
                        Tapestry.MONITOR_FACTORY_EXTENSION_NAME,
                        IMonitorFactory.class);
            else
                _monitorFactory = DefaultMonitorFactory.SHARED;
        }
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

    public static final String APP_SPEC_PATH_PARAM = "org.apache.tapestry.application-specification";

    public void initialize(HttpServlet servlet)
    {
        IApplicationSpecification spec = null;

        Resource specResource = findApplicationSpecification(servlet);

        if (specResource == null)
        {
View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

     * @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

Examples of org.apache.tapestry.spec.IApplicationSpecification

     * @since 3.0
     */

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

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

Examples of org.apache.tapestry.spec.IApplicationSpecification

    /** @since 3.1 */

    public void testConfigureExtension() throws Exception
    {
        IApplicationSpecification spec = parseApp("ConfigureExtension.application");
        IExtensionSpecification es = spec.getExtensionSpecification("my-extension");

        // Note: this is in transition; under 3.0 and earlier, the spec parser was
        // responsible for converting values into object types ... that is now
        // done futher down stream.

View Full Code Here

Examples of org.apache.tapestry.spec.IApplicationSpecification

        assertEquals("An extended string.", es.getConfiguration().get("string"));
    }

    public void testConfigureExtensionProperty() throws Exception
    {
        IApplicationSpecification spec = parseApp("ConfigureExtension.application");
        IExtensionSpecification es = spec.getExtensionSpecification("my-extension");

        assertEquals("my-value", es.getProperty("my-property"));
    }
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

        trainForServletInit(configControl, config);

        config.getInitParameter(ApplicationSpecificationInitializer.APP_SPEC_PATH_PARAM);
        configControl.setReturnValue(appSpecResource.getPath());

        IApplicationSpecification as = new ApplicationSpecification();

        MockControl parserControl = newControl(ISpecificationParser.class);
        ISpecificationParser parser = (ISpecificationParser) parserControl.getMock();

        i.setParser(parser);
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.