Package org.apache.rave.portal.model.impl

Examples of org.apache.rave.portal.model.impl.PageTemplateWidgetImpl


    @Test
    public void convertValid() {
        JpaWidget widget = new JpaWidget();
        widget.setEntityId(1L);
        PageTemplateWidget template = new PageTemplateWidgetImpl("1");
        template.setLocked(true);
        template.setHideChrome(true);
        template.setPageTemplateRegion(new PageTemplateRegionImpl("1"));
        template.setRenderSeq(1);
        template.setWidgetId(widget.getId());

        JpaPageTemplateWidget jpaTemplate = converter.convert(template);

        assertThat(jpaTemplate, is(not(sameInstance(template))));
        assertThat(jpaTemplate, is(instanceOf(JpaPageTemplateWidget.class)));
        assertThat(jpaTemplate.isLocked(), is(equalTo(template.isLocked())));
        assertThat(jpaTemplate.getPageTemplateRegion(), is(instanceOf(JpaPageTemplateRegion.class)));
        assertThat(jpaTemplate.getRenderSeq(), is(equalTo(template.getRenderSeq())));
        assertThat(jpaTemplate.getWidgetId(), is(equalTo(template.getWidgetId())));
        assertThat(jpaTemplate.isLocked(), is(equalTo(template.isLocked())));
        assertThat(jpaTemplate.isHideChrome(), is(equalTo(template.isHideChrome())));
    }
View Full Code Here


        }
        return converted;
    }

    private PageTemplateWidget convert(PageTemplateWidget widget) {
        PageTemplateWidgetImpl converted = widget instanceof PageTemplateWidgetImpl ? ((PageTemplateWidgetImpl) widget) : new PageTemplateWidgetImpl();
        updateProperties(widget, converted);
        return converted;
    }
View Full Code Here


    @Test
    public void convertValid() {
        JpaWidget widget = new JpaWidget();
        PageTemplateWidget template = new PageTemplateWidgetImpl();
        template.setLocked(true);
        template.setHideChrome(true);
        template.setPageTemplateRegion(new PageTemplateRegionImpl());
        template.setRenderSeq(1);
        template.setWidget(widget);

        JpaPageTemplateWidget jpaTemplate = converter.convert(template);

        assertThat(jpaTemplate, is(not(sameInstance(template))));
        assertThat(jpaTemplate, is(instanceOf(JpaPageTemplateWidget.class)));
        assertThat(jpaTemplate.isLocked(), is(equalTo(template.isLocked())));
        assertThat(jpaTemplate.getPageTemplateRegion(), is(instanceOf(JpaPageTemplateRegion.class)));
        assertThat(jpaTemplate.getRenderSeq(), is(equalTo(template.getRenderSeq())));
        assertThat(jpaTemplate.getWidget(), is(equalTo(template.getWidget())));
        assertThat(jpaTemplate.isLocked(), is(equalTo(template.isLocked())));
        assertThat(jpaTemplate.isHideChrome(), is(equalTo(template.isHideChrome())));
    }
View Full Code Here

    @Test
    public void convertValid() {
        JpaWidget widget = new JpaWidget();
        widget.setEntityId(1L);
        PageTemplateWidget template = new PageTemplateWidgetImpl("1");
        template.setLocked(true);
        template.setHideChrome(true);
        template.setPageTemplateRegion(new PageTemplateRegionImpl("1"));
        template.setRenderSeq(1);
        template.setWidgetId(widget.getId());

        JpaPageTemplateWidget jpaTemplate = converter.convert(template);

        assertThat(jpaTemplate, is(not(sameInstance(template))));
        assertThat(jpaTemplate, is(instanceOf(JpaPageTemplateWidget.class)));
        assertThat(jpaTemplate.isLocked(), is(equalTo(template.isLocked())));
        assertThat(jpaTemplate.getPageTemplateRegion(), is(instanceOf(JpaPageTemplateRegion.class)));
        assertThat(jpaTemplate.getRenderSeq(), is(equalTo(template.getRenderSeq())));
        assertThat(jpaTemplate.getWidgetId(), is(equalTo(template.getWidgetId())));
        assertThat(jpaTemplate.isLocked(), is(equalTo(template.isLocked())));
        assertThat(jpaTemplate.isHideChrome(), is(equalTo(template.isHideChrome())));
    }
View Full Code Here

        }
        return converted;
    }

    private PageTemplateWidget convert(PageTemplateWidget widget) {
        PageTemplateWidgetImpl converted = widget instanceof PageTemplateWidgetImpl ? ((PageTemplateWidgetImpl) widget) : new PageTemplateWidgetImpl();
        updateProperties(widget, converted);
        return converted;
    }
View Full Code Here

        }
        return converted;
    }

    private PageTemplateWidget convert(PageTemplateWidget widget) {
        PageTemplateWidgetImpl converted = widget instanceof PageTemplateWidgetImpl ? ((PageTemplateWidgetImpl) widget) : new PageTemplateWidgetImpl();
        updateProperties(widget, converted);
        return converted;
    }
View Full Code Here

TOP

Related Classes of org.apache.rave.portal.model.impl.PageTemplateWidgetImpl

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.