Package org.exoplatform.portal.mop

Examples of org.exoplatform.portal.mop.Described


        private PageInfo(Page page) {
            this.uuid = page.getObjectId();
            this.internalName = page.getName();

            Described described = page.adapt(Described.class);
            this.name = described.getName();

            this.id = getPageIdFor(page);
        }
View Full Code Here


            this.id = getPageIdFor(page);
        }

        static String getPageIdFor(Page page) {
            Described described = page.adapt(Described.class);
            return getPageIdFor(page.getSite().getName(), described.getName());
        }
View Full Code Here

    final List<String> moveContainersPermissions;

    public PageState(Page page) {

        Attributes attrs = page.getAttributes();
        Described described = page.adapt(Described.class);

        //
        List<String> accessPermissions = Collections.emptyList();
        String editPermission = null;
        if (page.isAdapted(ProtectedResource.class)) {
            ProtectedResource pr = page.adapt(ProtectedResource.class);
            accessPermissions = pr.getAccessPermissions();
            editPermission = pr.getEditPermission();
        }

        //
        this.factoryId = attrs.getValue(MappedAttributes.FACTORY_ID);
        this.displayName = described.getName();
        this.description = described.getDescription();
        this.accessPermissions = Utils.safeImmutableList(accessPermissions);
        this.editPermission = editPermission;
        this.showMaxWindow = attrs.getValue(MappedAttributes.SHOW_MAX_WINDOW, false);

        if (page.isAdapted(ProtectedContainer.class)) {
View Full Code Here

                PageLink link = sourceNav.linkTo(ObjectType.PAGE_LINK);
                link.setPage(null);
            }

            //
            Described described = sourceNav.adapt(Described.class);
            described.setName(state.getLabel());

            //
            if (!sourceNav.isAdapted(RestrictAccess.class)) {
                // if RestrictAccess is not on the node yet, then it has a legacy Visible
                // so, we remove the Visible and replace with a RestrictAccess
View Full Code Here

        }

        //
        String label = null;
        if (navigation.isAdapted(Described.class)) {
            Described described = navigation.adapt(Described.class);
            label = described.getName();
        }

        //
        Visibility visibility = Visibility.DISPLAYED;
        Date startPublicationDate = null;
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 src permissions to dst permission
         PageData srcPageData = new Mapper(session).load(srcPage);
         ProtectedResource pr = dstPage.adapt(ProtectedResource.class);
         pr.setAccessPermissions(srcPageData.getAccessPermissions());
View Full Code Here

            UIComponent dstChild = dst.add(srcChild.getObjectType(), srcChild.getObjectId());

            //
            if (srcChild.isAdapted(Described.class))
            {
               Described srcDescribed = srcChild.adapt(Described.class);
               Described dstDescribed = dstChild.adapt(Described.class);
               dstDescribed.setName(srcDescribed.getName());
               dstDescribed.setDescription(srcDescribed.getDescription());
            }

            //
            if (srcChild.isAdapted(ProtectedResource.class))
            {
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.