Package org.eurekastreams.server.domain.dto

Examples of org.eurekastreams.server.domain.dto.MembershipCriteriaDTO


                                            .getEventBus()
                                            .notifyObservers(
                                                    new ShowNotificationEvent(new Notification("Access List Saved")));
                                    History.newItem(History.getToken());

                                    MembershipCriteriaDTO result = event.getMembershipCriteria();
                                    result.setId(persistedItemId);
                                    Session.getInstance().getEventBus()
                                            .notifyObservers(new MembershipCriteriaPersistedEvent(result));
                                }
                            });
                }
View Full Code Here


        final Set<PersonModelView> adminsSet = new HashSet<PersonModelView>();
        adminsSet.add(admin);

        final List<MembershipCriteriaDTO> mcdtos = new ArrayList<MembershipCriteriaDTO>(Arrays
                .asList(new MembershipCriteriaDTO(5L, "foo", null, null, null, null)));

        final PagedSet<GalleryTabTemplateDTO> gtts = new PagedSet<GalleryTabTemplateDTO>(0, 50, 0,
                new ArrayList<GalleryTabTemplateDTO>(0));
        final PagedSet<Theme> themes = new PagedSet<Theme>(0, 50, 0, new ArrayList<Theme>(0));
        final List<ThemeDTO> themeDTOs = new ArrayList<ThemeDTO>(0);
View Full Code Here

        final Set<PersonModelView> adminsSet = new HashSet<PersonModelView>();
        adminsSet.add(admin);

        final List<MembershipCriteriaDTO> mcdtos = new ArrayList<MembershipCriteriaDTO>(Arrays
                .asList(new MembershipCriteriaDTO(5L, "foo", null, null, null, null)));

        final PagedSet<GalleryTabTemplateDTO> gtts = new PagedSet<GalleryTabTemplateDTO>(0, 50, 0,
                new ArrayList<GalleryTabTemplateDTO>(0));
        final PagedSet<Theme> themes = new PagedSet<Theme>(0, 50, 0, new ArrayList<Theme>(0));
        final List<ThemeDTO> themeDTOs = new ArrayList<ThemeDTO>(0);
View Full Code Here

        final Set<PersonModelView> adminsSet = new HashSet<PersonModelView>();
        adminsSet.add(admin);

        final List<MembershipCriteriaDTO> mcdtos = new ArrayList<MembershipCriteriaDTO>(Arrays
                .asList(new MembershipCriteriaDTO(5L, "foo", null, null, null, null)));

        final PagedSet<GalleryTabTemplateDTO> gtts = new PagedSet<GalleryTabTemplateDTO>(0, 50, 0,
                new ArrayList<GalleryTabTemplateDTO>(0));
        final PagedSet<Theme> themes = new PagedSet<Theme>(0, 50, 0, new ArrayList<Theme>(0));
        final List<ThemeDTO> themeDTOs = new ArrayList<ThemeDTO>(0);
View Full Code Here

     * Test.
     */
    @Test
    public void testNullThemeAndGttIds()
    {
        final MembershipCriteriaDTO mcdto = new MembershipCriteriaDTO();
        mcdto.setCriteria(criteria);

        context.checking(new Expectations()
        {
            {
                oneOf(ac).getParams();
View Full Code Here

     */
    @Test
    public void testDefaultThemeAndGttIds()
    {
        final Long defaultId = -1L;
        final MembershipCriteriaDTO mcdto = new MembershipCriteriaDTO();
        mcdto.setCriteria(criteria);
        mcdto.setThemeId(defaultId);
        mcdto.setGalleryTabTemplateId(defaultId);

        context.checking(new Expectations()
        {
            {
                oneOf(ac).getParams();
View Full Code Here

    @Test
    public void testWithThemeAndGttIds()
    {
        final Long themeId = 5L;
        final Long gttId = 6L;
        final MembershipCriteriaDTO mcdto = new MembershipCriteriaDTO();
        mcdto.setCriteria(criteria);
        mcdto.setThemeId(themeId);
        mcdto.setGalleryTabTemplateId(gttId);

        context.checking(new Expectations()
        {
            {
                oneOf(ac).getParams();
View Full Code Here

    {
        List<MembershipCriteriaDTO> results = new ArrayList<MembershipCriteriaDTO>();

        for (MembershipCriteria mc : inTransformType)
        {
            MembershipCriteriaDTO mcdto = new MembershipCriteriaDTO();
            mcdto.setId(mc.getId());
            mcdto.setCriteria(mc.getCriteria());

            GalleryTabTemplate mcgtt = mc.getGalleryTabTemplate();
            if (mcgtt != null)
            {
                mcdto.setGalleryTabTemplateId(mcgtt.getId());
                mcdto.setGalleryTabTemplateName(mcgtt.getTitle());
            }

            Theme mct = mc.getTheme();
            if (mct != null)
            {
                mcdto.setThemeId(mct.getId());
                mcdto.setThemeName(mct.getName());
            }

            results.add(mcdto);
        }
View Full Code Here

     * @return PersistenceRequest for MembershipCriteria.
     */
    @Override
    public PersistenceRequest<MembershipCriteria> transform(final ActionContext inTransformType)
    {
        MembershipCriteriaDTO mcdto = (MembershipCriteriaDTO) inTransformType.getParams();
        Long themeId = mcdto.getThemeId();
        Long gttId = mcdto.getGalleryTabTemplateId();

        MembershipCriteria mc = new MembershipCriteria();

        mc.setTheme(themeId == null || themeId == -1 ? null : themeProxyMapper.execute(themeId));
        mc.setGalleryTabTemplate(gttId == null || gttId == -1 ? null : galleryTabTemplateProxyMapper.execute(gttId));
        mc.setCriteria(mcdto.getCriteria());

        return new PersistenceRequest<MembershipCriteria>(mc);
    }
View Full Code Here

        verifying.setVisible(true);
        verifyButton.setVisible(false);
        requiredLabel.setVisible(false);
        results.setVisible(false);

        MembershipCriteriaDTO mcdto = new MembershipCriteriaDTO();

        // set criteria string.
        mcdto.setCriteria(membershipCriteria.getText());

        // set theme id/name
        String themeIdSelectedValue = themeDropDown.getValue();
        mcdto.setThemeId(Long.valueOf(themeIdSelectedValue));
        if (mcdto.getThemeId() != -1)
        {
            mcdto.setThemeName(themeDropDownValues.get(themeIdSelectedValue));
        }

        // set gallery tab template id/name
        String gttIdSelectedValue = tabDropDown.getValue();
        mcdto.setGalleryTabTemplateId(Long.valueOf(gttIdSelectedValue));
        if (mcdto.getGalleryTabTemplateId() != -1)
        {
            mcdto.setGalleryTabTemplateName(galleryTabTemplateDropDownValues.get(gttIdSelectedValue));
        }

        MembershipCriteriaVerificationModel.getInstance().fetch(
                new MembershipCriteriaVerificationRequest(mcdto, group.getValue()), false);
    }
View Full Code Here

TOP

Related Classes of org.eurekastreams.server.domain.dto.MembershipCriteriaDTO

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.