Examples of IAssetSpecification


Examples of org.apache.tapestry.spec.IAssetSpecification

        while (i.hasNext())
        {
            String name = (String) i.next();

            IAssetSpecification assetSpec = specification.getAsset(name);

            IAsset asset = convertAsset(assetSpec);

            component.addAsset(name, asset);
        }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

        String propertyName = getValidatedAttribute(
                "property",
                PROPERTY_NAME_PATTERN,
                "invalid-property-name");

        IAssetSpecification ia = _factory.createAssetSpecification();

        ia.setPath(prefix == null ? path : prefix + path);
        ia.setPropertyName(propertyName);

        IComponentSpecification cs = (IComponentSpecification) peekObject();

        cs.addAsset(name, ia);
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

        String propertyName = getValidatedAttribute(
                "property",
                PROPERTY_NAME_PATTERN,
                "invalid-property-name");

        IAssetSpecification ia = _factory.createAssetSpecification();

        ia.setPath(prefix == null ? path : prefix + path);
        ia.setPropertyName(propertyName);

        IComponentSpecification cs = (IComponentSpecification) peekObject();

        cs.addAsset(name, ia);
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

        while(i.hasNext())
        {
            String name = (String) i.next();

            IAssetSpecification assetSpec = specification.getAsset(name);

            IAsset asset = convertAsset(assetSpec);

            component.addAsset(name, asset);
        }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

        while (i.hasNext())
        {
            String name = (String) i.next();

            IAssetSpecification assetSpec = specification.getAsset(name);

            IAsset asset = convertAsset(assetSpec);

            component.addAsset(name, asset);
        }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

        Iterator i = spec.getAssetNames().iterator();
        while (i.hasNext())
        {
            String name = (String) i.next();

            IAssetSpecification as = spec.getAsset(name);

            String propertyName = as.getPropertyName();

            if (propertyName != null)
            {
                try
                {
                    injectAsset(op, name, propertyName);
                }
                catch (Exception ex)
                {
                    _errorLog.error(EnhanceMessages.errorAddingProperty(propertyName, op
                            .getBaseClass(), ex), as.getLocation(), ex);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

        Iterator i = spec.getAssetNames().iterator();
        while(i.hasNext())
        {
            String name = (String) i.next();

            IAssetSpecification as = spec.getAsset(name);

            String propertyName = as.getPropertyName();

            if (propertyName != null)
            {
                try
                {
                    injectAsset(op, name, propertyName, as.getLocation());
                }
                catch (Exception ex)
                {
                    _errorLog.error(EnhanceMessages.errorAddingProperty(
                            propertyName, op.getBaseClass(), ex), as
                            .getLocation(), ex);
                }
            }
        }
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

     */
    public void testAssets_3_0() throws Exception
    {
        IComponentSpecification cs = parsePage("Assets_3_0.page");

        IAssetSpecification as = cs.getAsset("mycontext");

        assertEquals("context:path/to/context", as.getPath());

        as = cs.getAsset("myprivate");

        assertEquals("classpath:path/to/private", as.getPath());

        as = cs.getAsset("myexternal");

        assertEquals("http://myexternal/asset", as.getPath());

        assertListsEqual(new String[]
        { "mycontext", "myexternal", "myprivate" }, cs.getAssetNames());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

    public void testAssets() throws Exception
    {
        IComponentSpecification cs = parsePage("Assets.page");

        IAssetSpecification as = cs.getAsset("myasset");

        assertEquals("path/to/asset", as.getPath());
        assertEquals("myProperty", as.getPropertyName());
    }
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

*/
public class TestInjectAssetWorker extends HiveMindTestCase
{
    private IComponentSpecification newSpec(String assetName, String propertyName, Location location)
    {
        IAssetSpecification as = new AssetSpecification();
        as.setPropertyName(propertyName);
        as.setLocation(location);

        MockControl control = newControl(IComponentSpecification.class);
        IComponentSpecification spec = (IComponentSpecification) control.getMock();

        spec.getAssetNames();
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.