Examples of INamespace


Examples of org.apache.tapestry.INamespace

        verifyControls();
    }

    public void testFound()
    {
        INamespace namespace = newNamespace("org.foo");

        MockControl crc = newControl(ClassResolver.class);
        ClassResolver cr = (ClassResolver) crc.getMock();

        IComponentSpecification spec = newSpec();
View Full Code Here

Examples of org.apache.tapestry.INamespace

        verifyControls();
    }

    public void testNotFound()
    {
        INamespace namespace = newNamespace("org.foo");

        MockControl crc = newControl(ClassResolver.class);
        ClassResolver cr = (ClassResolver) crc.getMock();

        IComponentSpecification spec = newSpec();
View Full Code Here

Examples of org.apache.tapestry.INamespace

        MockControl logc = newControl(Log.class);
        Log log = (Log) logc.getMock();

        MockControl namespacec = newControl(INamespace.class);
        INamespace namespace = (INamespace) namespacec.getMock();

        MockControl frameworkc = newControl(INamespace.class);
        INamespace framework = (INamespace) frameworkc.getMock();

        ISpecificationResolverDelegate delegate = newDelegate(cycle, namespace, spec);

        Resource namespaceLocation = newResource("LibraryStandin.library");

        namespace.containsComponentType("DelegateComponent");
        namespacec.setReturnValue(false);

        train(log, logc, ResolverMessages.resolvingComponent("DelegateComponent", namespace));

        namespace.getSpecificationLocation();
        namespacec.setReturnValue(namespaceLocation);

        train(log, logc, ResolverMessages.checkingResource(namespaceLocation
                .getRelativeResource("DelegateComponent.jwc")));

        namespace.isApplicationNamespace();
        namespacec.setReturnValue(false);

        ISpecificationSource source = newSource(framework);

        framework.containsComponentType("DelegateComponent");
        frameworkc.setReturnValue(false);

        replayControls();

        ComponentSpecificationResolverImpl resolver = new ComponentSpecificationResolverImpl();
View Full Code Here

Examples of org.apache.tapestry.INamespace

        MockControl logc = newControl(Log.class);
        Log log = (Log) logc.getMock();

        MockControl namespacec = newControl(INamespace.class);
        INamespace namespace = (INamespace) namespacec.getMock();

        MockControl frameworkc = newControl(INamespace.class);
        INamespace framework = (INamespace) frameworkc.getMock();

        ISpecificationResolverDelegate delegate = newDelegate(cycle, namespace, null);

        Resource namespaceLocation = newResource("LibraryStandin.library");

        namespace.containsComponentType("DelegateComponent");
        namespacec.setReturnValue(false);

        train(log, logc, ResolverMessages.resolvingComponent("DelegateComponent", namespace));

        namespace.getSpecificationLocation();
        namespacec.setReturnValue(namespaceLocation);

        train(log, logc, ResolverMessages.checkingResource(namespaceLocation
                .getRelativeResource("DelegateComponent.jwc")));

        namespace.isApplicationNamespace();
        namespacec.setReturnValue(false);

        ISpecificationSource source = newSource(framework);

        framework.containsComponentType("DelegateComponent");
        frameworkc.setReturnValue(false);

        replayControls();

        ComponentSpecificationResolverImpl resolver = new ComponentSpecificationResolverImpl();
View Full Code Here

Examples of org.apache.tapestry.INamespace

        Log log = (Log) logc.getMock();

        Resource contextRoot = newResource("context/");

        MockControl namespacec = newControl(INamespace.class);
        INamespace namespace = (INamespace) namespacec.getMock();

        Resource namespaceLocation = newResource("LibraryStandin.library");
        Resource specLocation = contextRoot.getRelativeResource("WEB-INF/myapp/MyAppComponent.jwc");

        ISpecificationSource source = newSource(specLocation, spec);

        namespace.containsComponentType("MyAppComponent");
        namespacec.setReturnValue(false);

        train(log, logc, ResolverMessages.resolvingComponent("MyAppComponent", namespace));

        namespace.getSpecificationLocation();
        namespacec.setReturnValue(namespaceLocation);

        train(log, logc, ResolverMessages.checkingResource(namespaceLocation
                .getRelativeResource("MyAppComponent.jwc")));

        namespace.isApplicationNamespace();
        namespacec.setReturnValue(true);

        train(log, logc, ResolverMessages.checkingResource(specLocation));
        train(log, logc, ResolverMessages.installingComponent("MyAppComponent", namespace, spec));

        namespace.installComponentSpecification("MyAppComponent", spec);

        replayControls();

        ComponentSpecificationResolverImpl resolver = new ComponentSpecificationResolverImpl();
        resolver.setLog(log);
View Full Code Here

Examples of org.apache.tapestry.INamespace

    public abstract IEngineService getPageService();

    public ILink getLink(IRequestCycle cycle)
    {
        String parameter = null;
        INamespace namespace = getTargetNamespace();
        String targetPage = getTargetPage();

        if (namespace == null)
            parameter = targetPage;
        else
            parameter = namespace.constructQualifiedName(targetPage);

        return getPageService().getLink(cycle, parameter);
    }
View Full Code Here

Examples of org.apache.tapestry.INamespace

        return result;
    }

    private Properties getNamespaceProperties(IComponent component, Locale locale)
    {
        INamespace namespace = component.getNamespace();

        Resource namespaceLocation = namespace.getSpecificationLocation();

        Map propertiesMap = findPropertiesMapForResource(namespaceLocation);

        Properties result = (Properties) propertiesMap.get(locale);
View Full Code Here

Examples of org.apache.tapestry.INamespace

        return embedded.getSpecification().getAllowBody();
    }

    public boolean getAllowBody(String libraryId, String type, Location location)
    {
        INamespace namespace = _component.getNamespace();

        _resolver.resolve(_cycle, namespace, libraryId, type, location);

        IComponentSpecification spec = _resolver.getSpecification();
View Full Code Here

Examples of org.apache.tapestry.INamespace

    }

    private INamespace newNamespace(String id)
    {
        MockControl control = newControl(INamespace.class);
        INamespace ns = (INamespace) control.getMock();

        ns.getId();
        control.setReturnValue(id);

        return ns;
    }
View Full Code Here

Examples of org.apache.tapestry.INamespace

        verifyControls();
    }

    public void testNotApplicationNamespace()
    {
        INamespace ns = newNamespace("library");
        IPage page = newPage(ns, null);
        IRequestCycle cycle = newRequestCycle(page, "/");
        IMarkupWriter writer = newWriter("http://foo.com/context/");

        run(writer, cycle);
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.