Examples of IAssetSpecification


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

        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

    private void enterAsset(String pathAttributeName, AssetType type)
    {try { __CLOVER_225_0.M[2783]++;
        __CLOVER_225_0.S[11365]++;String name = getValidatedAttribute("name", ASSET_NAME_PATTERN, "invalid-asset-name");
        __CLOVER_225_0.S[11366]++;String path = getAttribute(pathAttributeName);

        __CLOVER_225_0.S[11367]++;IAssetSpecification ia = _factory.createAssetSpecification();

        __CLOVER_225_0.S[11368]++;ia.setType(type);
        __CLOVER_225_0.S[11369]++;ia.setPath(path);

        __CLOVER_225_0.S[11370]++;IComponentSpecification cs = (IComponentSpecification) peekObject();

        __CLOVER_225_0.S[11371]++;cs.addAsset(name, ia);
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

    private void enterAsset(String pathAttributeName, AssetType type)
    {try { __CLOVER_225_0.M[1133]++;
        __CLOVER_225_0.S[5292]++;String name = getValidatedAttribute("name", ASSET_NAME_PATTERN, "invalid-asset-name");
        __CLOVER_225_0.S[5293]++;String path = getAttribute(pathAttributeName);

        __CLOVER_225_0.S[5294]++;IAssetSpecification ia = _factory.createAssetSpecification();

        __CLOVER_225_0.S[5295]++;ia.setType(type);
        __CLOVER_225_0.S[5296]++;ia.setPath(path);

        __CLOVER_225_0.S[5297]++;IComponentSpecification cs = (IComponentSpecification) peekObject();

        __CLOVER_225_0.S[5298]++;cs.addAsset(name, ia);
View Full Code Here

Examples of org.apache.tapestry.spec.IAssetSpecification

        __CLOVER_194_0.S[12814]++;Iterator i = names.iterator();

        __CLOVER_194_0.S[12815]++;while ((((i.hasNext()) && (++__CLOVER_194_0.CT[2182] != 0)) || (++__CLOVER_194_0.CF[2182] == 0))){
        {
            __CLOVER_194_0.S[12816]++;String name = (String) i.next();
            __CLOVER_194_0.S[12817]++;IAssetSpecification assetSpec = specification.getAsset(name);
            __CLOVER_194_0.S[12818]++;IAsset asset = convert(name, component, assetSpec, specLocation);

            __CLOVER_194_0.S[12819]++;component.addAsset(name, asset);
        }}
    } finally { }}
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

Examples of org.apache.tapestry.spec.IAssetSpecification

    private void enterAsset(String pathAttributeName, AssetType type)
    {try { __CLOVER_225_0.M[3137]++;
        __CLOVER_225_0.S[13170]++;String name = getValidatedAttribute("name", ASSET_NAME_PATTERN, "invalid-asset-name");
        __CLOVER_225_0.S[13171]++;String path = getAttribute(pathAttributeName);

        __CLOVER_225_0.S[13172]++;IAssetSpecification ia = _factory.createAssetSpecification();

        __CLOVER_225_0.S[13173]++;ia.setType(type);
        __CLOVER_225_0.S[13174]++;ia.setPath(path);

        __CLOVER_225_0.S[13175]++;IComponentSpecification cs = (IComponentSpecification) peekObject();

        __CLOVER_225_0.S[13176]++;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

        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
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.