Examples of IAssetSpecification


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

        new AssetAnnotationWorker().performEnhancement(op, spec, m, l);

        verifyControls();

        IAssetSpecification as = spec.getAsset("globalStylesheet");
        assertEquals("/style/global.css", as.getPath());
        assertEquals(new AnnotationLocation(r, l.toString()), as.getLocation());
        assertEquals("globalStylesheet", as.getPropertyName());
    }
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

        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 = names.iterator();

        while (i.hasNext())
        {
            String name = (String) i.next();
            IAssetSpecification assetSpec = specification.getAsset(name);
            IAsset asset = convert(name, component, assetSpec, specLocation);

            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

            Method method, Location location)
    {
        Asset asset = method.getAnnotation(Asset.class);
        String propertyName = AnnotationUtils.getPropertyName(method);

        IAssetSpecification as = new AssetSpecification();
        as.setPath(asset.value());
        as.setPropertyName(propertyName);

        // Very important for assets, as they need a location (really, the Resource
        // of a location) to figure out what kind of asset they are.

        Resource specResource = spec.getSpecificationLocation();
        Location assetLocation = new AnnotationLocation(specResource, location.toString());

        as.setLocation(assetLocation);

        spec.addAsset(propertyName, as);
    }
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

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

        __CLOVER_194_0.S[4645]++;while ((((i.hasNext()) && (++__CLOVER_194_0.CT[849] != 0)) || (++__CLOVER_194_0.CF[849] == 0))){
        {
            __CLOVER_194_0.S[4646]++;String name = (String) i.next();
            __CLOVER_194_0.S[4647]++;IAssetSpecification assetSpec = specification.getAsset(name);
            __CLOVER_194_0.S[4648]++;IAsset asset = convert(name, component, assetSpec, specLocation);

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