Package org.apache.hivemind.util

Examples of org.apache.hivemind.util.ClasspathResource


        INamespace namespace = newMock(INamespace.class);
        IRequestCycle cycle = newMock(IRequestCycle.class);

        IComponentSpecification spec = new ComponentSpecification();
        ClasspathResource base = new ClasspathResource(new DefaultClassResolver(), "/org/apache/tapestry/resolver/MyComponent.jwc");
        spec.setSpecificationLocation(base);
        spec.setComponentClassName("org.apache.tapestry.resolver.MyComponent");

        AssetFactory classpathFactory = newMock(AssetFactory.class);
        AssetFactory contextFactory = newMock(AssetFactory.class);
View Full Code Here


        INamespace namespace = newMock(INamespace.class);
        IRequestCycle cycle = newMock(IRequestCycle.class);

        IComponentSpecification spec = new ComponentSpecification();
        ClasspathResource base = new ClasspathResource(new DefaultClassResolver(), "/org/apache/tapestry/resolver/MyComponent.jwc");
        spec.setSpecificationLocation(base);
        spec.setComponentClassName("org.apache.tapestry.resolver.MyComponent");

        AssetFactory classpathFactory = newMock(AssetFactory.class);
        AssetFactory contextFactory = newMock(AssetFactory.class);
View Full Code Here

        INamespace namespace = newMock(INamespace.class);
        IRequestCycle cycle = newMock(IRequestCycle.class);

        IComponentSpecification spec = new ComponentSpecification();
        ClasspathResource base = new ClasspathResource(new DefaultClassResolver(), "/org/apache/tapestry/resolver/MyComponent.jwc");
        spec.setSpecificationLocation(base);
        spec.setComponentClassName("org.apache.tapestry.resolver.MyComponent");

        AssetFactory classpathFactory = newMock(AssetFactory.class);
        AssetFactory contextFactory = newMock(AssetFactory.class);
View Full Code Here

    private static final String MOCK1 = "/org/apache/tapestry/junit/MockPage1.page";

    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

        return spec;
    }

    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

       
        String elemScript = "/org/apache/tapestry/html/ElementEvent.script";
        String compScript = "/org/apache/tapestry/ComponentEvent.script";
        String widScript = "/org/apache/tapestry/dojo/html/WidgetEvent.script";
       
        Resource compScriptResource = new ClasspathResource(resolver, compScript);
        Resource widScriptResource = new ClasspathResource(resolver, widScript);
        Resource elemScriptResource = new ClasspathResource(resolver, elemScript);
       
        ComponentEventConnectionWorker worker = new ComponentEventConnectionWorker();
        worker.setClassResolver(resolver);
        worker.setEventInvoker(invoker);
        worker.setComponentScript(compScript);
View Full Code Here

        IScript script = newMock(IScript.class);
       
        PageRenderSupport prs = newPageRenderSupport();
       
        String compScript = "/org/apache/tapestry/ComponentEvent.script";
        Resource compScriptResource = new ClasspathResource(resolver, compScript);
       
        ComponentEventConnectionWorker worker = new ComponentEventConnectionWorker();
        worker.setClassResolver(resolver);
        worker.setEventInvoker(invoker);
        worker.setComponentScript(compScript);
View Full Code Here

    Resource getScript(IComponent component)
    {
        if (IWidget.class.isInstance(component)) {

            if (_widgetResource == null)
                _widgetResource = new ClasspathResource(_resolver, _widgetScript);

            return _widgetResource;
        }

        if (_componentResource == null)
            _componentResource = new ClasspathResource(_resolver, _componentScript);

        return _componentResource;
    }
View Full Code Here

    }

    Resource getElementScript()
    {
        if (_elementResource == null)
            _elementResource = new ClasspathResource(_resolver, _elementScript);

        return _elementResource;
    }
View Full Code Here

            throws TemplateParseException
    {
        String thisClassName = getClass().getName();
        String thisPath = "/" + thisClassName.replace('.', '/') + "/" + file;

        Resource location = new ClasspathResource(new DefaultClassResolver(), thisPath);

        InputStream stream = getClass().getResourceAsStream(file);

        if (stream == null)
            throw new TemplateParseException("File " + file + " not found.");
View Full Code Here

TOP

Related Classes of org.apache.hivemind.util.ClasspathResource

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.