Examples of InjectSpecificationImpl


Examples of org.apache.tapestry.spec.InjectSpecificationImpl

            }
        }

        String propertyName = AnnotationUtils.getPropertyName(method);

        InjectSpecification inject = new InjectSpecificationImpl();

        inject.setType("state-flag");
        inject.setProperty(propertyName);
        inject.setObject(keyName);
        inject.setLocation(location);

        spec.addInjectSpecification(inject);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

        if (keyName.equals(""))
            keyName = AnnotationUtils.convertMethodNameToKeyName(method.getName());

        String propertyName = AnnotationUtils.getPropertyName(method);

        InjectSpecification inject = new InjectSpecificationImpl();

        inject.setType("state");
        inject.setProperty(propertyName);
        inject.setObject(keyName);
        inject.setLocation(location);

        spec.addInjectSpecification(inject);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

        op.addMethod(Modifier.PUBLIC, sig, "return _script.getScript();", injectSpecLocation);

        replay();

        InjectSpecificationImpl is = new InjectSpecificationImpl();
        is.setProperty("foo");
        is.setObject("bar.script");
        is.setLocation(injectSpecLocation);

        InjectScriptWorker worker = new InjectScriptWorker();
        worker.setSource(source);

        worker.performEnhancement(op, is);
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

    }

    private InjectSpecification newInjectSpecification(String propertyName, String type,
                                                       String object, Location location)
    {
        InjectSpecification result = new InjectSpecificationImpl();
        result.setProperty(propertyName);
        result.setType(type);
        result.setObject(object);
        result.setLocation(location);

        return result;
    }
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

    public void testWithExistingPropertyWrongType()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);

        EnhancementOperation op = newOp();

        trainGetPropertyType(op, "fred", int.class);
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

    public void testNoExistingProperty()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);

        EnhancementOperation op = newOp();

        trainGetPropertyType(op, "fred", null);
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

    public void testWithExistingProperty()
    {
        Location l = newLocation();
        ApplicationStateManager asm = newApplicationStateManager();

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("fred");
        is.setObject("fredASO");
        is.setLocation(l);

        EnhancementOperation op = newOp();

        trainGetPropertyType(op, "fred", boolean.class);
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

    {
        InjectPage injectPage = method.getAnnotation(InjectPage.class);

        String propertyName = AnnotationUtils.getPropertyName(method);

        InjectSpecification is = new InjectSpecificationImpl();

        is.setProperty(propertyName);
        is.setType("page");
        is.setObject(injectPage.value());

        spec.addInjectSpecification(is);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

    {
        InjectScript annotation = method.getAnnotation(InjectScript.class);

        String propertyName = AnnotationUtils.getPropertyName(method);

        InjectSpecification is = new InjectSpecificationImpl();

        is.setProperty(propertyName);
        is.setType("script");
        is.setObject(annotation.value());

        spec.addInjectSpecification(is);
    }
View Full Code Here

Examples of org.apache.tapestry.spec.InjectSpecificationImpl

    {
        String propertyName = AnnotationUtils.getPropertyName(method);

        InjectMeta annotation = method.getAnnotation(InjectMeta.class);

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty(propertyName);
        is.setType("meta");
        is.setObject(annotation.value());

        spec.addInjectSpecification(is);
    }
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.