Package org.exoplatform.portal.mop

Examples of org.exoplatform.portal.mop.Described


        if (src.isAdapted(Redirectable.class)) {
            Redirectable redirectAble = src.adapt(Redirectable.class);
            redirects = loadRedirects(src, redirectAble.getRedirects());
        }

        Described described = src.adapt(Described.class);

        //
        return new PortalData(src.getObjectId(), src.getName(), type, attrs.getValue(MappedAttributes.LOCALE),
                described.getName(), described.getDescription(), accessPermissions, editPermission,
                Collections.unmodifiableMap(properties), attrs.getValue(MappedAttributes.SKIN), layout, redirects);
    }
View Full Code Here


            ProtectedResource pr = dst.adapt(ProtectedResource.class);
            pr.setAccessPermissions(src.getAccessPermissions());
            pr.setEditPermission(src.getEditPermission());

            Described described = dst.adapt(Described.class);
            described.setName(src.getLabel());
            described.setDescription(src.getDescription());

            Redirectable redirectable = dst.adapt(Redirectable.class);
            Map<String, Redirect> redirects = redirectable.getRedirects();

            List<RedirectData> redirectsData = src.getRedirects();
View Full Code Here

            ProtectedResource pr = src.adapt(ProtectedResource.class);
            accessPermissions = pr.getAccessPermissions();
        }

        //
        Described described = src.adapt(Described.class);

        Attributes attrs = src.getAttributes();
        return new ContainerData(src.getObjectId(), attrs.getValue(MappedAttributes.ID), attrs.getValue(MappedAttributes.NAME),
                attrs.getValue(MappedAttributes.ICON), attrs.getValue(MappedAttributes.TEMPLATE),
                attrs.getValue(MappedAttributes.FACTORY_ID), described.getName(), described.getDescription(),
                attrs.getValue(MappedAttributes.WIDTH), attrs.getValue(MappedAttributes.HEIGHT),
                Utils.safeImmutableList(accessPermissions), children);
    }
View Full Code Here

                    boolean showInfoBar = attrs.getValue(MappedAttributes.SHOW_INFO_BAR, false);
                    boolean showMode = attrs.getValue(MappedAttributes.SHOW_MODE, false);
                    boolean showWindowState = attrs.getValue(MappedAttributes.SHOW_WINDOW_STATE, false);
                    String theme = attrs.getValue(MappedAttributes.THEME, null);

                    Described described = srcContainer.adapt(Described.class);

                    String id = attrs.getValue(MappedAttributes.ID, null);
                    String icon = attrs.getValue(MappedAttributes.ICON, null);
                    String width = attrs.getValue(MappedAttributes.WIDTH, null);
                    String height = attrs.getValue(MappedAttributes.HEIGHT, null);

                    //
                    List<String> a = Collections.singletonList(UserACL.EVERYONE);
                    if (srcContainer.isAdapted(ProtectedResource.class)) {
                        ProtectedResource pr = srcContainer.adapt(ProtectedResource.class);
                        a = pr.getAccessPermissions();
                    }

                    //
                    mo = new ApplicationData<Portlet>(srcContainer.getObjectId(), component.getName(), ApplicationType.PORTLET,
                            state, id, described.getName(), icon, described.getDescription(), showInfoBar, showWindowState,
                            showMode, theme, width, height, Collections.<String, String> emptyMap(), a);
                } else {
                    List<ComponentData> dstChildren = loadChildren(srcContainer);
                    mo = load(srcContainer, dstChildren);
                }
View Full Code Here

    private void save(ContainerData src, UIContainer dst) {

        ProtectedResource pr = dst.adapt(ProtectedResource.class);
        pr.setAccessPermissions(src.getAccessPermissions());

        Described described = dst.adapt(Described.class);
        described.setName(src.getTitle());
        described.setDescription(src.getDescription());

        Attributes dstAttrs = dst.getAttributes();
        dstAttrs.setValue(MappedAttributes.ID, src.getId());
        dstAttrs.setValue(MappedAttributes.TYPE, src instanceof DashboardData ? "dashboard" : null);
        dstAttrs.setValue(MappedAttributes.ICON, src.getIcon());
View Full Code Here

            ProtectedResource pr = src.adapt(ProtectedResource.class);
            accessPermissions = pr.getAccessPermissions();
        }

        //
        Described described = src.adapt(Described.class);

        //
        boolean showInfoBar = attrs.getValue(MappedAttributes.SHOW_INFO_BAR, false);
        boolean showWindowState = attrs.getValue(MappedAttributes.SHOW_WINDOW_STATE, false);
        boolean showMode = attrs.getValue(MappedAttributes.SHOW_MODE, false);
        String theme = attrs.getValue(MappedAttributes.THEME, null);

        //
        return new ApplicationData<S>(src.getObjectId(), src.getName(), type, instanceState, null, described.getName(),
                attrs.getValue(MappedAttributes.ICON), described.getDescription(), showInfoBar, showWindowState, showMode,
                theme, attrs.getValue(MappedAttributes.WIDTH), attrs.getValue(MappedAttributes.HEIGHT),
                Utils.safeImmutableMap(properties), Utils.safeImmutableList(accessPermissions));
    }
View Full Code Here

    public <S> void save(ApplicationData<S> src, UIWindow dst) {

        ProtectedResource pr = dst.adapt(ProtectedResource.class);
        pr.setAccessPermissions(src.getAccessPermissions());

        Described described = dst.adapt(Described.class);
        described.setName(src.getTitle());
        described.setDescription(src.getDescription());

        //
        Attributes attrs = dst.getAttributes();
        attrs.setValue(MappedAttributes.SHOW_INFO_BAR, src.isShowInfoBar());
        attrs.setValue(MappedAttributes.SHOW_WINDOW_STATE, src.isShowApplicationState());
View Full Code Here

            ProtectedResource pr = container.adapt(ProtectedResource.class);
            accessPermissions = pr.getAccessPermissions();
        }

        //
        Described described = container.adapt(Described.class);

        //
        Attributes attrs = container.getAttributes();
        List<ComponentData> children = loadChildren(container);
        return new DashboardData(container.getObjectId(), attrs.getValue(MappedAttributes.ID),
                attrs.getValue(MappedAttributes.NAME), attrs.getValue(MappedAttributes.ICON),
                attrs.getValue(MappedAttributes.TEMPLATE), attrs.getValue(MappedAttributes.FACTORY_ID), described.getName(),
                described.getDescription(), attrs.getValue(MappedAttributes.WIDTH), attrs.getValue(MappedAttributes.HEIGHT),
                Utils.safeImmutableList(accessPermissions), children);
    }
View Full Code Here

            Object value = srcAttrs.getObject(key);
            dstAttrs.setObject(key, value);
         }

         // Copy described
         Described srcDescribed = srcPage.adapt(Described.class);
         Described dstDescribed = dstPage.adapt(Described.class);
         dstDescribed.setName(srcDescribed.getName());
         dstDescribed.setDescription(srcDescribed.getDescription());

         copy(srcPage, dstPage, srcPage.getRootComponent(), dstPage.getRootComponent());

         //
         return new Mapper(session).load(dstPage);
View Full Code Here

            ProtectedResource pr = dst.adapt(ProtectedResource.class);
            pr.setAccessPermissions(page.state.accessPermissions);
            pr.setEditPermission(page.state.editPermission);

            //
            Described described = dst.adapt(Described.class);
            described.setName(page.state.displayName);
            described.setDescription(page.state.description);

            //
            Attributes attrs = dst.getAttributes();
            attrs.setValue(MappedAttributes.FACTORY_ID, page.state.factoryId);
            attrs.setValue(MappedAttributes.SHOW_MAX_WINDOW, page.state.showMaxWindow);
View Full Code Here

TOP

Related Classes of org.exoplatform.portal.mop.Described

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.