Examples of DescribedLocation


Examples of org.apache.tapestry.util.DescribedLocation

        EnhancementOperation op = newOp(DeprecatedBean.class);
        IComponentSpecification spec = newSpec();

        ClassAnnotationEnhancementWorker classWorker = newMock(ClassAnnotationEnhancementWorker.class);

        DescribedLocation location = newClassLocation(DeprecatedBean.class, Deprecated.class);

        classWorker.performEnhancement(op, spec, DeprecatedBean.class, location);

        replay();
View Full Code Here

Examples of org.apache.tapestry.util.DescribedLocation

        ClassAnnotationEnhancementWorker classWorker = newMock(ClassAnnotationEnhancementWorker.class);

        Throwable t = new RuntimeException("Simulated failure.");

        DescribedLocation location = newClassLocation(DeprecatedBean.class, Deprecated.class);

        classWorker.performEnhancement(op, spec, DeprecatedBean.class, location);
        expectLastCall().andThrow(t);

        log.error("An error occured processing annotation @java.lang.Deprecated() of "
View Full Code Here

Examples of org.apache.tapestry.util.DescribedLocation

        // 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.util.DescribedLocation

        verifyControls();

        IAssetSpecification as = spec.getAsset("globalStylesheet");
        assertEquals("/style/global.css", as.getPath());
        assertEquals(new DescribedLocation(r, l.toString()), as.getLocation());
        assertEquals("globalStylesheet", as.getPropertyName());
    }
View Full Code Here

Examples of org.apache.tapestry.util.DescribedLocation

        if (worker == null)
            return;

        try
        {
            Location location = new DescribedLocation(classResource, AnnotationMessages
                    .classAnnotation(annotation, clazz));

            worker.performEnhancement(op, spec, clazz, location);
        }
        catch (Exception ex)
View Full Code Here

Examples of org.apache.tapestry.util.DescribedLocation

    private DescribedLocation newClassLocation(Class baseClass, Class annotationClass)
    {
        Resource classResource = newResource(baseClass);
        Annotation annotation = baseClass.getAnnotation(annotationClass);

        return new DescribedLocation(classResource, AnnotationMessages.classAnnotation(
                annotation,
                baseClass));
    }
View Full Code Here

Examples of org.apache.tapestry.util.DescribedLocation

        EnhancementOperation op = newOp(DeprecatedBean.class);
        IComponentSpecification spec = newSpec();

        ClassAnnotationEnhancementWorker classWorker = (ClassAnnotationEnhancementWorker) newMock(ClassAnnotationEnhancementWorker.class);

        DescribedLocation location = newClassLocation(DeprecatedBean.class, Deprecated.class);

        classWorker.performEnhancement(op, spec, DeprecatedBean.class, location);

        replayControls();
View Full Code Here

Examples of org.apache.tapestry.util.DescribedLocation

        ClassAnnotationEnhancementWorker classWorker = (ClassAnnotationEnhancementWorker) newMock(ClassAnnotationEnhancementWorker.class);

        Throwable t = new RuntimeException("Simulated failure.");

        DescribedLocation location = newClassLocation(DeprecatedBean.class, Deprecated.class);

        classWorker.performEnhancement(op, spec, DeprecatedBean.class, location);
        setThrowable(classWorker, t);

        log
View Full Code Here

Examples of org.apache.tapestry.util.DescribedLocation

    }

    public static Location buildLocationForAnnotation(Method method, Annotation annotation,
            Resource classResource)
    {
        return new DescribedLocation(classResource, AnnotationMessages.methodAnnotation(
                annotation,
                method));
    }
View Full Code Here

Examples of org.apache.tapestry.util.DescribedLocation

    protected IAsset findAsset(String path, String description)
    {
        IAsset asset = null;
        if ( !HiveMind.isBlank(path) )
        {
            Location location = new DescribedLocation(new URLResource(path), description);
            asset = _assetSource.findAsset(null, path, null, location);
        }
        return asset;
    }
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.