Interface IPageLinkManager

  • All Known Subinterfaces:
    IPageLinkManagerSPI
    All Known Implementing Classes:
    PageLinkManager

    @StableMinor(version="15.0",
                 sinceVersion="4.0")
    public interface IPageLinkManager
    This interface provides the actions that the Page Link Manager offers to manipulate PageLinks in the LumisXP.
    Since:
    4.0.0
    Version:
    $Revision: 25303 $ $Date: 2022-10-22 22:48:02 -0300 (Sat, 22 Oct 2022) $
    • Method Detail

      • add

        java.lang.String add​(SessionConfig sessionConfig,
                             PageLinkConfig pageLinkConfig,
                             ITransaction transaction)
                      throws ManagerException,
                             PortalException
        Add a page link.
        Parameters:
        sessionConfig - the session identifier of the current user.
        pageLinkConfig - the page link configuration.
        transaction - the current transaction.
        Returns:
        the ID of the Page Link.
        Throws:
        ManagerException - if any error occurs during the persisting process.
        PortalException - if any other error occurs during the process.
      • get

        PageLinkConfig get​(SessionConfig sessionConfig,
                           java.lang.String pageLinkId,
                           ITransaction transaction)
                    throws ManagerException,
                           PortalException
        Get the page link configuraton.
        Parameters:
        sessionConfig - the session identifier of the current user.
        pageLinkId - id of the page link target.
        transaction - the current transaction.
        Returns:
        a PageLinkConfig.
        Throws:
        ManagerException - if any error occurs during the persisting process.
        PortalException - if any other error occurs during the process.
      • getByPageId

        java.util.Collection<java.lang.String> getByPageId​(SessionConfig sessionConfig,
                                                           java.lang.String pageId,
                                                           ITransaction transaction)
                                                    throws ManagerException,
                                                           PortalException
        Get the page link ids associated to a page
        Parameters:
        sessionConfig - the session identifier of the current user.
        pageId - id of the page target.
        transaction - the current transaction.
        Returns:
        a list of page link ids associated to a page.
        Throws:
        ManagerException - if any error occurs during the persisting process.
        PortalException - if any other error occurs during the process.
      • getByTypeWebsiteAndChannelId

        @Deprecated
        PageLinkConfig getByTypeWebsiteAndChannelId​(SessionConfig sessionConfig,
                                                    int type,
                                                    java.lang.String website,
                                                    java.lang.String channelId,
                                                    ITransaction transaction)
                                             throws ManagerException,
                                                    PortalException
        The most appropriate page link is identified based on the website (or URL Rules of the website), type, priority and destination channelId. In order to calculate the page link the following criteria are used:
        • First consider a list of all page links that match the given website (or URL Rules of the website), type and priority.
        • For pages type Login:
          • Within the list if there are links with channelId specified, prioritize them.
          • If a link's channel is not within the list of parent channels of the destination channel, do not consider it. Else prioritize the closest to the destination channel.
          • Among the links with no channel specified, prioritize the one whose page has a common ancestor with the destination channel closest to the destination channel. Finally consider the distance between this common ancestor and the page link's page.
        • For pages type Home Page:
          • Within the list, prioritize the page with the biggest priority.
        If no matching pagelink is found return null.
        Parameters:
        sessionConfig - the session identifier of the current user.
        type - the page link type.
        website - the website base URL that the user is accessing.
        channelId - The destination channel identifier.
        transaction - the current transaction.
        Returns:
        The calculated page link.
        Throws:
        ManagerException - if any error occurs during the persisting process.
        PortalException - if any other error occurs during the process.
        Since:
        5.0.0
      • delete

        void delete​(SessionConfig sessionConfig,
                    java.lang.String pageLinkId,
                    ITransaction transaction)
             throws ManagerException,
                    PortalException
        Delete a page link.
        Parameters:
        sessionConfig - the session identifier of the current user.
        pageLinkId - id of the page link target.
        transaction - the current transaction.
        Throws:
        ManagerException - if any error occurs during the persisting process.
        PortalException - if any other error occurs during the process.
      • getDefaultLoginPage

        PageLinkConfig getDefaultLoginPage​(SessionConfig sessionConfig,
                                           IWebsiteBaseURL websiteBaseURL,
                                           java.lang.String channelId,
                                           ITransaction transaction)
                                    throws PortalException
        Returns the most appropriate login page, based on the given website base URL and destination channel identifier.

        In order to choose the page link the following criteria are used:

        • The page link must be associated with the corresponding website.
        • If the page link's channel is specified, it must reside in or be equal to the channel corresponding to the channelId argument.
        • The page link rules must be fulfilled.
        • If multiple page links could be matched, the most priority one is used.

        If no matching page link is found, return null.

        Parameters:
        sessionConfig - the session identifier of the current user.
        websiteBaseURL - the IWebsiteBaseURL that the user is accessing.
        channelId - The destination channel identifier.
        transaction - the current transaction.
        Returns:
        The calculated page link.
        Throws:
        PortalException - if any error occurs during the persisting process.
        Since:
        6.2.0
      • getDefaultHomePage

        PageLinkConfig getDefaultHomePage​(SessionConfig sessionConfig,
                                          IWebsiteBaseURL websiteBaseURL,
                                          ITransaction transaction)
                                   throws PortalException
        Returns the most appropriate home page, based on the given website base URL.

        In order to choose the page link the following criteria are used:

        • The page link must be associated with the corresponding website.
        • The page link rules must be fulfilled.
        • If multiple page links could be matched, the most priority one is used.

        If no matching page link is found, return null.

        Parameters:
        sessionConfig - the session identifier of the current user.
        websiteBaseURL - the IWebsiteBaseURL that the user is accessing.
        transaction - the current transaction.
        Returns:
        The calculated page link, or null if none matches the search criteria.
        Throws:
        PortalException - if any error occurs during the persisting process.
        Since:
        6.2.0