Interface UserPortal

All Known Implementing Classes:
UserPortalImpl

public interface UserPortal
The user portal establish the relationship between a user and the portal.
Version:
$Revision$
Author:
Julien Viet
  • Method Details

    • getLocale

      Locale getLocale()
      Returns the portal locale.
      Returns:
      the portal locale
    • getUserName

      String getUserName()
      Returns:
      username
    • getNavigations

      List<UserNavigation> getNavigations() throws UserPortalException, org.exoplatform.portal.mop.navigation.NavigationServiceException
      Returns the sorted list of current user navigations.
      Returns:
      the current user navigations
      Throws:
      UserPortalException - any user portal exception
      org.exoplatform.portal.mop.navigation.NavigationServiceException - any navigation service exception
    • getNavigation

      UserNavigation getNavigation(org.exoplatform.portal.mop.SiteKey key) throws NullPointerException, UserPortalException, org.exoplatform.portal.mop.navigation.NavigationServiceException
      Returns a user navigation for a specified site key, null is returned when such navigation does not exist.
      Parameters:
      key - the site key
      Returns:
      the corresponding user navigation
      Throws:
      NullPointerException - when the provided key is null
      UserPortalException - any user portal exception
      org.exoplatform.portal.mop.navigation.NavigationServiceException - any navigation service exception
    • refresh

      void refresh()
      Refresh the current user portal.
    • getNode

      UserNode getNode(UserNavigation navigation, org.exoplatform.portal.mop.navigation.Scope scope, UserNodeFilterConfig filterConfig, org.exoplatform.portal.mop.navigation.NodeChangeListener<UserNode> listener)
      Load a user node from a specified user navigation with a custom scope. The returned node is the root node of the navigation.
      Parameters:
      navigation - the user navigation
      scope - an optional scope
      filterConfig - an optional filter
      listener - an optional listener @return the user node
      Returns:
      the user node
      Throws:
      NullPointerException - if the navigation argument is null
      UserPortalException - any user portal exception
      org.exoplatform.portal.mop.navigation.NavigationServiceException - any navigation service exception
    • getNodeById

      default UserNode getNodeById(String userNodeId, org.exoplatform.portal.mop.SiteKey siteKey, org.exoplatform.portal.mop.navigation.Scope scope, UserNodeFilterConfig filterConfig, org.exoplatform.portal.mop.navigation.NodeChangeListener<UserNode> listener) throws NullPointerException, UserPortalException, org.exoplatform.portal.mop.navigation.NavigationServiceException
      Load specific navigation node children
      Parameters:
      userNodeId - target userNode id
      siteKey - Site key
      scope - the scope
      filterConfig - an optional filter
      listener - an optional listener
      Returns:
      UserNode
      Throws:
      NullPointerException
      UserPortalException
      org.exoplatform.portal.mop.navigation.NavigationServiceException
    • getNodes

      Collection<UserNode> getNodes(org.exoplatform.portal.mop.SiteType siteType, org.exoplatform.portal.mop.navigation.Scope scope, UserNodeFilterConfig filterConfig)
      Load the list of user nodes computed from the list of UserNavigation of type siteType (PORTAL, GROUP or USER)
      Parameters:
      siteType - site type: PORTAL, GROUP or USER
      scope - an optional scope
      filterConfig - an optional filter
      Returns:
      a Collection of UserNode
    • getNodes

      Collection<UserNode> getNodes(org.exoplatform.portal.mop.SiteType siteType, org.exoplatform.portal.mop.navigation.Scope scope, UserNodeFilterConfig filterConfig, boolean includeGlobal)
      Load the list of user nodes computed from the list of UserNavigation of type siteType (PORTAL, GROUP or USER)
      Parameters:
      siteType - site type: PORTAL, GROUP or USER
      scope - an optional scope
      filterConfig - an optional filter
      includeGlobal - to include global nodes
      Returns:
      a Collection of UserNode
    • getNodes

      @Deprecated(forRemoval=true, since="6.5") default Collection<UserNode> getNodes(org.exoplatform.portal.mop.SiteType siteType, String excludedSiteName, org.exoplatform.portal.mop.navigation.Scope scope, UserNodeFilterConfig filterConfig)
      Deprecated, for removal: This API element is subject to removal in a future version.
      use getNodes(SiteType, Scope, UserNodeFilterConfig) instead since no need of filtering on Spaces nodes due to introduction of new SiteType.SPACE that allows to get space navigations
      Load the list of user nodes computed from the list of UserNavigation of type siteType (PORTAL, GROUP or USER)
      Parameters:
      siteType - site type: PORTAL, GROUP or USER
      excludedSiteName - site name regex to exclude
      scope - an optional scope
      filterConfig - an optional filter
      Returns:
      a Collection of UserNode
    • updateNode

      void updateNode(UserNode node, org.exoplatform.portal.mop.navigation.Scope scope, org.exoplatform.portal.mop.navigation.NodeChangeListener<UserNode> listener) throws NullPointerException, IllegalArgumentException, UserPortalException, org.exoplatform.portal.mop.navigation.NavigationServiceException
      Update the specified content with the most recent state.
      Parameters:
      node - the node to update
      scope - the optional scope
      listener - an optional listener
      Throws:
      NullPointerException - if the context argument is null
      IllegalArgumentException - if the node has pending changes
      UserPortalException - any user portal exception
      org.exoplatform.portal.mop.navigation.NavigationServiceException - anything that would prevent the operation to succeed
    • rebaseNode

      void rebaseNode(UserNode node, org.exoplatform.portal.mop.navigation.Scope scope, org.exoplatform.portal.mop.navigation.NodeChangeListener<UserNode> listener) throws NullPointerException, UserPortalException, org.exoplatform.portal.mop.navigation.NavigationServiceException
      Rebase the specified context with the most recent state.
      Parameters:
      node - the user node that will be rebased
      scope - the optional scope
      listener - the optional node change listener
      Throws:
      NullPointerException - if the context argument is null
      UserPortalException - any user portal exception
      org.exoplatform.portal.mop.navigation.NavigationServiceException - anything that would prevent the operation to succeed
    • saveNode

      void saveNode(UserNode node, org.exoplatform.portal.mop.navigation.NodeChangeListener<UserNode> listener) throws NullPointerException, UserPortalException, org.exoplatform.portal.mop.navigation.NavigationServiceException
      Save the specified context to the persistent storage.
      Parameters:
      node - the user node that will be rebased
      listener - the optional node change listener
      Throws:
      NullPointerException - if the node argument is null
      UserPortalException - any user portal exception
      org.exoplatform.portal.mop.navigation.NavigationServiceException - anything that would prevent the operation to succeed
    • getDefaultPath

      UserNode getDefaultPath(UserNodeFilterConfig filterConfig) throws UserPortalException, org.exoplatform.portal.mop.navigation.NavigationServiceException
      Returns the user node for the default path.
      Parameters:
      filterConfig - an optional filter
      Returns:
      the default navigation path
      Throws:
      UserPortalException - any user portal exception
      org.exoplatform.portal.mop.navigation.NavigationServiceException - any navigation service exception
    • getDefaultPath

      UserNode getDefaultPath(UserNavigation navigation, UserNodeFilterConfig filterConfig) throws UserPortalException, org.exoplatform.portal.mop.navigation.NavigationServiceException
      Returns the user node for the default path in specified navigation
      Parameters:
      navigation - the navigation
      filterConfig - an optional filter
      Returns:
      the default navigation path
      Throws:
      UserPortalException - any user portal exception
      org.exoplatform.portal.mop.navigation.NavigationServiceException - any navigation service exception
    • resolvePath

      @Deprecated UserNode resolvePath(UserNodeFilterConfig filterConfig, String path) throws NullPointerException, UserPortalException, org.exoplatform.portal.mop.navigation.NavigationServiceException
      Deprecated.
      Resolves and returns a node among all user navigations for a specified path.
      Parameters:
      filterConfig - an optional filter
      path - the path
      Returns:
      the navigation path
      Throws:
      NullPointerException - if the navigation or path argument is null
      UserPortalException - any user portal exception
      org.exoplatform.portal.mop.navigation.NavigationServiceException - any navigation service exception
    • resolvePath

      UserNode resolvePath(UserNavigation navigation, UserNodeFilterConfig filterConfig, String path) throws NullPointerException, UserPortalException, org.exoplatform.portal.mop.navigation.NavigationServiceException
      Resolves and returns a node for the specified navigation and for a specified path.
      Parameters:
      navigation - the navigation
      filterConfig - an optional filter
      path - the path @return the navigation path
      Returns:
      the navigation path
      Throws:
      NullPointerException - if the navigation or path argument is null
      UserPortalException - any user portal exception
      org.exoplatform.portal.mop.navigation.NavigationServiceException - any navigation service exception
    • getPortalLabel

      default String getPortalLabel(org.exoplatform.portal.mop.SiteKey siteKey)
      Parameters:
      siteKey - Site Key
      Returns:
      the PortalConfig label
    • getPortalLabel

      default String getPortalLabel(org.exoplatform.portal.mop.SiteKey siteKey, Locale locale)
      Parameters:
      siteKey - Site Key
      locale - Locale
      Returns:
      the PortalConfig label
    • getPortalDescription

      default String getPortalDescription(org.exoplatform.portal.mop.SiteKey siteKey)
      Parameters:
      siteKey - Site Key
      Returns:
      the PortalConfig description
    • getPortalDescription

      default String getPortalDescription(org.exoplatform.portal.mop.SiteKey siteKey, Locale locale)
      Parameters:
      siteKey - Site Key
      locale - Locale
      Returns:
      the PortalConfig description