Package org.exoplatform.portal.mop

Examples of org.exoplatform.portal.mop.ProtectedResource


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

        //
        List<RedirectData> redirects = null;
        if (src.isAdapted(Redirectable.class)) {
View Full Code Here


            attrs.setValue(MappedAttributes.SKIN, src.getSkin());
            if (src.getProperties() != null) {
                save(src.getProperties(), attrs, portalPropertiesBlackList);
            }

            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());
View Full Code Here

    private ContainerData load(UIContainer src, List<ComponentData> children) {
        //
        List<String> accessPermissions = Collections.emptyList();
        if (src.isAdapted(ProtectedResource.class)) {
            ProtectedResource pr = src.adapt(ProtectedResource.class);
            accessPermissions = pr.getAccessPermissions();
        }

        //
        Described described = src.adapt(Described.class);
View Full Code Here

                    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,
View Full Code Here

        return changes;
    }

    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());
View Full Code Here

        load(attrs, properties, windowPropertiesBlackList);

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

        //
        Described described = src.adapt(Described.class);
View Full Code Here

                Utils.safeImmutableMap(properties), Utils.safeImmutableList(accessPermissions));
    }

    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());
View Full Code Here

    public DashboardData loadDashboard(UIContainer container) {

        List<String> accessPermissions = Collections.emptyList();
        if (container.isAdapted(ProtectedResource.class)) {
            ProtectedResource pr = container.adapt(ProtectedResource.class);
            accessPermissions = pr.getAccessPermissions();
        }

        //
        Described described = container.adapt(Described.class);
View Full Code Here

        }

        //
        PageState state = page.state;
        if (state != null) {
            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);
View Full Code Here

        Described dstDescribed = dstPage.adapt(Described.class);
        dstDescribed.setName(srcDescribed.getName());
        dstDescribed.setDescription(srcDescribed.getDescription());

        // Copy src permissions to dst permission
        ProtectedResource srcPR = srcPage.adapt(ProtectedResource.class);
        ProtectedResource dstPR = dstPage.adapt(ProtectedResource.class);
        dstPR.setAccessPermissions(srcPR.getAccessPermissions());
        dstPR.setEditPermission(srcPR.getEditPermission());

        // Need to clone page data structure as well
        copy(srcPage, dstPage, srcPage.getRootComponent(), dstPage.getRootComponent());

        // Remove
View Full Code Here

TOP

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

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.