Examples of AssetSpecification


Examples of org.apache.tapestry.spec.AssetSpecification

*/
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.AssetSpecification

            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 DescribedLocation(specResource, location.toString());
       
        as.setLocation(location);

        spec.addAsset(propertyName, as);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.AssetSpecification

*/
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.AssetSpecification

*/
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.AssetSpecification

*/
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.AssetSpecification

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

            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 DescribedLocation(specResource, location.toString());
       
        as.setLocation(location);

        spec.addAsset(propertyName, as);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.AssetSpecification

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

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

        spec.addAsset(propertyName, as);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.AssetSpecification

            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 DescribedLocation(specResource, location.toString());

        as.setLocation(assetLocation);

        spec.addAsset(propertyName, as);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.AssetSpecification

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

        IComponentSpecification spec = newSpec();

        spec.getAssetNames();
        setReturnValue(spec, Collections.singletonList(assetName));
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.