Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.ILibrarySpecification


     * @since 3.0
     */

    public void testConfigureValue() throws Exception
    {
        ILibrarySpecification spec = parseLib("ConfigureValue.library");

        checkLine(spec, 22);
        checkLine(spec.getExtensionSpecification("bedrock"), 24);

        Bedrock bedrock = (Bedrock) spec.getExtension("bedrock", Bedrock.class);

        assertEquals("flintstone", bedrock.getFred());
    }
View Full Code Here


    /** @since 4.0 */

    public void testLibraryDescription() throws Exception
    {
        ILibrarySpecification ls = parseLib("LibraryDescription.library");

        assertEquals("Often, these are just placeholders.", ls.getDescription());
    }
View Full Code Here

    }

    /** @since 4.0 */
    public void testMeta() throws Exception
    {
        ILibrarySpecification spec = parseLib("Meta.library");

        assertEquals("bar", spec.getProperty("foo"));
        assertEquals("long value", spec.getProperty("long"));
    }
View Full Code Here

    private ILibrarySpecification newLibrarySpec()
    {
        Resource resource = new ClasspathResource(new DefaultClassResolver(),
                "/org/apache/tapestry/junit/Library.library");

        ILibrarySpecification spec = new LibrarySpecification();
        spec.setSpecificationLocation(resource);

        return spec;
    }
View Full Code Here

        return result;
    }

    public synchronized ILibrarySpecification getLibrarySpecification(Resource resourceLocation)
    {
        ILibrarySpecification result = (LibrarySpecification) _libraryCache.get(resourceLocation);

        if (result == null)
        {
            result = parseLibrarySpecification(resourceLocation);
            _libraryCache.put(resourceLocation, result);
View Full Code Here

        if (_frameworkNamespace == null)
        {
            Resource resource = new ClasspathResource(_classResolver,
                    "/org/apache/tapestry/Framework.library");

            ILibrarySpecification ls = getLibrarySpecification(resource);

            _frameworkNamespace = new Namespace(INamespace.FRAMEWORK_NAMESPACE, null, ls,
                    _namespaceResources);
        }
View Full Code Here

    private void beginLibrarySpecificationInitial()
    {
        expectElement("library-specification");

        ILibrarySpecification ls = _factory.createLibrarySpecification();

        _rootObject = ls;

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

        setter.apply(description);
    }

    private void endLibrarySpecification()
    {
        ILibrarySpecification spec = (ILibrarySpecification) peekObject();

        spec.setSpecificationLocation(getResource());

        spec.instantiateImmediateExtensions();
    }
View Full Code Here

                "type",
                COMPONENT_ALIAS_PATTERN,
                "invalid-component-type");
        String path = getAttribute("specification-path");

        ILibrarySpecification ls = (ILibrarySpecification) peekObject();

        ls.setComponentSpecificationPath(type, path);

        push(_elementName, null, STATE_NO_CONTENT);
    }
View Full Code Here

                _valueConverter);

        es.setClassName(className);
        es.setImmediate(immediate);

        ILibrarySpecification ls = (ILibrarySpecification) peekObject();

        ls.addExtensionSpecification(name, es);

        push(_elementName, es, STATE_EXTENSION);
    }
View Full Code Here

TOP

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

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.