Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.InjectSpecification


    }

    public void testSuccess()
    {
        Location l = newLocation();
        InjectSpecification spec = newSpec("fred", "barney", l);
       
        EnhancementOperation op = newMock(EnhancementOperation.class);

        ApplicationStateManager asm = newASM();
View Full Code Here


        expect(op.getPropertyType("somePage")).andReturn(int.class);

        replay();

        InjectSpecification is = newSpec(l);

        try
        {
            new InjectPageWorker().performEnhancement(op, is);
            unreachable();
View Full Code Here

        verify();
    }

    private InjectSpecification newSpec(Location l)
    {
        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty("somePage");
        is.setObject("SomePage");
        is.setLocation(l);

        return is;
    }
View Full Code Here

                "return getPage().getRequestCycle().getPage(\"SomePage\");",
                l);

        replay();

        InjectSpecification is = newSpec(l);

        new InjectPageWorker().performEnhancement(op, is);

        verify();
    }
View Full Code Here

                        "return (org.apache.tapestry.html.BasePage)getPage().getRequestCycle().getPage(\"SomePage\");",
                        l);

        replay();

        InjectSpecification is = newSpec(l);

        new InjectPageWorker().performEnhancement(op, is);

        verify();
    }
View Full Code Here

        String keyName = annotation.value();

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

        InjectSpecification is = new InjectSpecificationImpl();
        is.setProperty(propertyName);
        is.setType("meta");
        is.setObject(keyName);
        is.setLocation(location);
       
        spec.addInjectSpecification(is);
    }
View Full Code Here

            }
        }

        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

        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

    {
        Iterator i = spec.getInjectSpecifications().iterator();

        while (i.hasNext())
        {
            InjectSpecification is = (InjectSpecification) i.next();

            invokeWorker(op, is);
        }
    }
View Full Code Here

    }

    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

TOP

Related Classes of org.apache.tapestry.spec.InjectSpecification

Copyright © 2018 www.massapicom. 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.