Package org.apache.tapestry.spec

Examples of org.apache.tapestry.spec.IPropertySpecification


        worker.performEnhancement(op, spec);

        verify();

        IPropertySpecification prop = spec.getPropertySpecification("object");

        assert prop != null;
        assert prop.isPersistent();
        assert prop.isProxyChecked();
        assert prop.canProxy();
    }
View Full Code Here


        ComponentPropertyProxyWorker worker = new ComponentPropertyProxyWorker();
        List<String> exclude = new ArrayList<String>();
        exclude.add("Entity");
        worker.setExcludedPackages(exclude);
       
        IPropertySpecification prop = new PropertySpecification();
        prop.setName("value");
        prop.setPersistence("session");
       
        assertEquals(worker.extractPropertyType(AnnotatedGenericPersistentPage.class, "value", prop), Persistent.class);
       
        prop.setGeneric(false);
        prop.setType(null);
        prop.setName("secondValue");
       
        Class type = worker.extractPropertyType(AnnotatedGenericPersistentPage.class, "secondValue", prop);
       
        assert type != null;
        assert prop.isGeneric();
       
        assertEquals(type, Persistent.class);
    }
View Full Code Here

        expect(op.getBaseClass()).andReturn(AnnotatedGenericPersistentPage.class).anyTimes();

        ComponentPropertyProxyWorker worker = new ComponentPropertyProxyWorker();
       
        IPropertySpecification p = addProperty(op, spec, l, "listValue");

        List<String> exclude = new ArrayList<String>();
        exclude.add("Entity");
        worker.setExcludedPackages(exclude);

        replay();

        worker.performEnhancement(op, spec);

        verify();

        IPropertySpecification prop = spec.getPropertySpecification("listValue");

        assert prop != null;
        assert prop.isPersistent();
        assert prop.isProxyChecked();
        assert prop.canProxy();
       
        assertEquals(p.getType(), "java.util.List");
    }
View Full Code Here

        expect(op.getBaseClass()).andReturn(AnnotatedGenericPersistentPage.class).anyTimes();

        ComponentPropertyProxyWorker worker = new ComponentPropertyProxyWorker();
       
        IPropertySpecification p = addProperty(op, spec, l, "secondValue");

        List<String> exclude = new ArrayList<String>();
        exclude.add("Entity");
        worker.setExcludedPackages(exclude);

        replay();

        worker.performEnhancement(op, spec);

        verify();

        IPropertySpecification prop = spec.getPropertySpecification("secondValue");
       
        assert prop != null;
        assert prop.isPersistent();
        assert prop.isProxyChecked();
        assert !prop.canProxy();
       
        assertEquals(p.getType(), Persistent.class.getName());
    }
View Full Code Here

       
        worker.performEnhancement(op, spec);
       
        verify();
       
        IPropertySpecification prop = spec.getPropertySpecification("bean");
       
        assert prop != null;
        assert prop.isPersistent();
        assert prop.isProxyChecked();
        assert !prop.canProxy();
    }
View Full Code Here

       
        worker.performEnhancement(op, spec);
       
        verify();
       
        IPropertySpecification prop = spec.getPropertySpecification("subBean");
       
        assert prop != null;
        assert prop.isPersistent();
        assert prop.isProxyChecked();
        assert !prop.canProxy();
    }
View Full Code Here

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

        verifyControls();

        IPropertySpecification ps = spec.getPropertySpecification("persistentProperty");

        assertEquals("session", ps.getPersistence());
        assertEquals("persistentProperty", ps.getName());
        assertSame(l, ps.getLocation());
        assertNull(ps.getInitialValue());
    }
View Full Code Here

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

        verifyControls();

        IPropertySpecification ps = spec.getPropertySpecification("clientPersistentProperty");

        assertEquals("client", ps.getPersistence());
        assertEquals("clientPersistentProperty", ps.getName());
        assertSame(l, ps.getLocation());
        assertNull(ps.getInitialValue());
    }
View Full Code Here

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

        verifyControls();

        IPropertySpecification ps = spec
                .getPropertySpecification("persistentPropertyWithInitialValue");

        assertEquals("session", ps.getPersistence());
        assertEquals("persistentPropertyWithInitialValue", ps.getName());
        assertSame(l, ps.getLocation());
        assertEquals("user.naturalName", ps.getInitialValue());
    }
View Full Code Here

        InitialValue iv = method.getAnnotation(InitialValue.class);

        String propertyName = AnnotationUtils.getPropertyName(method);
        String stategy = p.value();

        IPropertySpecification pspec = new PropertySpecification();

        pspec.setName(propertyName);
        pspec.setPersistence(stategy);
        pspec.setLocation(location);
        pspec.setInitialValue(iv == null ? null : iv.value());

        spec.addPropertySpecification(pspec);
    }
View Full Code Here

TOP

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

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.