Package org.exoplatform.portal.mop

Examples of org.exoplatform.portal.mop.RestrictAccess


                // so, we remove the Visible and replace with a RestrictAccess
                ChromatticSession chromatticSession = session.getManager().getLifeCycle().getContext().getSession();
                if (sourceNav.isAdapted(Visible.class)) {
                    chromatticSession.remove(sourceNav.adapt(Visible.class));
                }
                RestrictAccess restrictAccess = chromatticSession.create(RestrictAccess.class);
                chromatticSession.setEmbedded(sourceNav, RestrictAccess.class, restrictAccess);
            }

            //
            RestrictAccess restrictAccess = sourceNav.adapt(RestrictAccess.class);
            restrictAccess.setVisibility(state.getVisibility());
            restrictAccess.setStartPublicationDate(state.getStartPublicationDate());
            restrictAccess.setEndPublicationDate(state.getEndPublicationDate());
            restrictAccess.setRestrictOutsidePublicationWindow(state.isRestrictOutsidePublicationWindow());

            // Sync the attributes
            Attributes attrs = sourceNav.getAttributes();
            AttributesState.sync(state.getAttributesState(), CUSTOM_NODE_ATTRIBUTE_PREFIX, attrs);
            attrs.setValue(MappedAttributes.ICON, state.getIcon());
View Full Code Here


        Visibility visibility = Visibility.DISPLAYED;
        Date startPublicationDate = null;
        Date endPublicationDate = null;
        boolean restrictOutsidePublicationWindow = false;
        if (navigation.isAdapted(RestrictAccess.class)) {
            RestrictAccess restrictAccess = navigation.adapt(RestrictAccess.class);
            restrictOutsidePublicationWindow = restrictAccess.isRestrictOutsidePublicationWindow();
            visibility = restrictAccess.getVisibility();
            startPublicationDate = restrictAccess.getStartPublicationDate();
            endPublicationDate = restrictAccess.getEndPublicationDate();
        }

        //
        PageKey pageRef = null;
        Link link = navigation.getLink();
View Full Code Here

TOP

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

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.