Class ContextValidatingPortalMode

    • Constructor Detail

      • ContextValidatingPortalMode

        public ContextValidatingPortalMode​(int id,
                                           java.lang.String name,
                                           java.lang.String description,
                                           IPermissionProvider permissionProvider,
                                           java.lang.Class<? extends HTMLFragmentComponent> renderComponentClass,
                                           java.lang.String[] attributeNames,
                                           java.lang.Class<? extends AbstractLayoutFileMarkupFilter> markupFilterClass,
                                           java.lang.String modeRootUrl)
        Constructor for the class.
        Parameters:
        id - the id of the current PortalMode
        name - the name of the current PortalMode.
        description - the description of the current PortalMode.
        the - portal mode url provider of the current PortalMode.
        attributeNames - attribute names for the current PortalMode.
        markupFilterClass - markup filter class for the current PortalMode.
        Since:
        7.1.0
    • Method Detail

      • validateAccess

        public boolean validateAccess​(IPortalMode currentMode,
                                      javax.servlet.http.HttpServletRequest httpServletRequest,
                                      IPageWebResourceRequest webResourceRequest)
                               throws PortalException
        Description copied from interface: IPortalModeSPI
        Checks whether the current user has access to the given portal mode.
        Parameters:
        currentMode - the portal mode.
        httpServletRequest - the HTTP servlet request.
        webResourceRequest - the page web resource request
        Returns:
        whether the current user has access to the given portal mode.
        Throws:
        PortalException
      • webResourceExists

        protected boolean webResourceExists​(NavigationContext.WebResourceResume webResourceResume)
        Verifies that the page and channel referenced by the specified web resource exists.
        Parameters:
        webResourceResume - the web resource.
        Returns:
        true if page and channel exists, false otherwise.
        Since:
        7.1.1