Class SettingsPortalMode

    • Constructor Detail

      • SettingsPortalMode

        public SettingsPortalMode​(int id,
                                  String name,
                                  String description,
                                  IPermissionProvider permissionProvider,
                                  Class<? extends HTMLFragmentComponent> renderComponentClass,
                                  String[] attributeNames,
                                  Class<? extends AbstractLayoutFileMarkupFilter> markupFilterClass,
                                  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,
                                      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
      • isAccessWithWebResourceWebsiteRequired

        public boolean isAccessWithWebResourceWebsiteRequired​(WebResource webResource,
                                                              ChannelConfig rootChannel)
        Description copied from interface: IPortalModeSPI
        Returns whether the given web resource in the this mode may only be accessed using the web resource's website.
        Parameters:
        webResource - the web resource being requested. May be null if no web resource was discovered for the current request.
        rootChannel - the web resource's root channel. May be null if no web resource was discovered for the current request.
        Returns:
        true if the access requires the use of the web resource's website, false otherwise.