Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.ComponentSpecification


    private void setupImplicitPage(IResourceLocation location)
    {
        if (LOG.isDebugEnabled())
            LOG.debug("Found HTML template at " + location);
    // TODO The SpecFactory in Specification parser should be used in some way to create an IComponentSpecifciation!
        IComponentSpecification specification = new ComponentSpecification();
        specification.setPageSpecification(true);
        specification.setSpecificationLocation(location);

        setSpecification(specification);

        install();
    }
View Full Code Here


    {
        if (inputClass.isInterface() || inputClass.isPrimitive() || inputClass.isArray())
            throw new IllegalArgumentException(ScriptMessages.wrongTypeForEnhancement(inputClass));

        EnhancementOperationImpl op = new EnhancementOperationImpl(_classResolver,
                new ComponentSpecification(), inputClass, _classFactory, null);

        IComponentSpecification spec = new ComponentSpecification();
        spec.setLocation(_creatorLocation);

        Iterator i = _workers.iterator();
        while (i.hasNext())
        {
            EnhancementWorker worker = (EnhancementWorker) i.next();
View Full Code Here

            _log.debug(ResolverMessages.foundHTMLTemplate(resource));

        // TODO The SpecFactory in Specification parser should be used in some way to
        // create an IComponentSpecification!

        IComponentSpecification specification = new ComponentSpecification();
        specification.setPageSpecification(true);
        specification.setSpecificationLocation(resource);

        setSpecification(specification);

        install();
    }
View Full Code Here

        Class componentClass = _classFinder.findClass(packages, className);

        if (componentClass == null)
            return null;

        IComponentSpecification spec = new ComponentSpecification();

        Resource namespaceResource = namespace.getSpecificationLocation();

        Resource componentResource = namespaceResource.getRelativeResource(type + ".jwc");

        Location location = new LocationImpl(componentResource);

        spec.setLocation(location);
        spec.setSpecificationLocation(componentResource);
        spec.setComponentClassName(componentClass.getName());

        return spec;
    }
View Full Code Here

    {
        if (inputClass.isInterface() || inputClass.isPrimitive() || inputClass.isArray())
            throw new IllegalArgumentException(ScriptMessages.wrongTypeForEnhancement(inputClass));

        EnhancementOperationImpl op = new EnhancementOperationImpl(_classResolver,
                new ComponentSpecification(), inputClass, _classFactory);

        Iterator i = _workers.iterator();
        while (i.hasNext())
        {
            EnhancementWorker worker = (EnhancementWorker) i.next();
View Full Code Here

        // searching for the page's message catalog or other related assets.

        Resource pageResource = namespaceLocation
                .getRelativeResource(_simpleName + ".page");

        IComponentSpecification specification = new ComponentSpecification();
        specification.setPageSpecification(true);
        specification.setSpecificationLocation(pageResource);
        specification.setLocation(new LocationImpl(resource));

        setSpecification(specification);

        install();
    }
View Full Code Here

    private IComponentSpecification newSpec(String path)
    {
        Resource resource = new ClasspathResource(new DefaultClassResolver(), path);

        IComponentSpecification spec = new ComponentSpecification();
        spec.setSpecificationLocation(resource);

        return spec;
    }
View Full Code Here

        train(log, logc, ResolverMessages.checkingResource(contextRoot
                .getRelativeResource("TemplatePage.html")));

        train(log, logc, ResolverMessages.foundHTMLTemplate(resource));

        IComponentSpecification expectedSpec = new ComponentSpecification();
        expectedSpec.setPageSpecification(true);
        expectedSpec.setSpecificationLocation(resource);

        // The toString() on ComponentSpecification means we can't predict
        // what the string would be.

        log.isDebugEnabled();
View Full Code Here

@Test
public class TestComponentAnnotationWorker extends BaseAnnotationTestCase
{
    private IContainedComponent run(String id, String methodName, Location location)
    {
        IComponentSpecification spec = new ComponentSpecification();
       
        return run(spec, id, methodName, location);
    }
View Full Code Here

    }     
   
    public void test_CopyOf()
    {
        Location l = newLocation();
        IComponentSpecification spec = new ComponentSpecification();
        run(spec, "componentWithBindings", "getComponentWithBindings", l);
        IContainedComponent cc = run(spec, "aComponentCopy", "getComponentWithBindingsCopy", l);
       
        IBindingSpecification bs1 = cc.getBinding("condition");
        assertSame(l, bs1.getLocation());
View Full Code Here

TOP

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

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.