Class A_CmsWorkplaceApp

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  A_CmsWorkplaceApp.NavEntry
      An app navigation entry.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected A_CmsWorkplaceApp()
      Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String addParamToState​(java.lang.String state, java.lang.String paramName, java.lang.String value)
      Adds a parameter value to the given state.
      protected void addSubNavEntry​(A_CmsWorkplaceApp.NavEntry navEntry)
      Adds a navigation entry.
      protected abstract java.util.LinkedHashMap<java.lang.String,​java.lang.String> getBreadCrumbForState​(java.lang.String state)
      Returns the current bread crumb entries in an ordered map.
      protected abstract com.vaadin.ui.Component getComponentForState​(java.lang.String state)
      Returns the app component for the given state.
      protected java.lang.String getLastPathLevel​(java.lang.String path)
      Returns the last path level.
      CmsObject getOfflineCmsObject​(CmsObject cms)
      Gets an offline version of the cms object.
      static java.lang.String getParamFromState​(java.lang.String state, java.lang.String paramName)
      Parses the requested parameter from the given state.
      static java.util.Map<java.lang.String,​java.lang.String> getParamsFromState​(java.lang.String state)
      Returns the parameters contained in the state string.
      protected abstract java.util.List<A_CmsWorkplaceApp.NavEntry> getSubNavEntries​(java.lang.String state)
      Returns the sub navigation entries.
      void initUI​(I_CmsAppUIContext context)
      Within this method the app UI should be initialized.
      void onStateChange​(java.lang.String state)
      Called on navigation events.
      void openSubView​(java.lang.String state, boolean updateState)
      Opens the requested sub view.
      static java.lang.String removeParamsFromState​(java.lang.String state)
      Removes all parameter from given state.
      protected void setBreadCrumbEntries​(java.util.LinkedHashMap<java.lang.String,​java.lang.String> entries)
      Method to set bread crumb entries.
      protected void updateBreadCrumb​(java.util.Map<java.lang.String,​java.lang.String> breadCrumbEntries)
      Updates the bread crumb navigation.
      protected void updateSubNav​(java.util.List<A_CmsWorkplaceApp.NavEntry> subEntries)
      Updates the sub navigation with the given entries.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • addParamToState

        public static java.lang.String addParamToState​(java.lang.String state,
                                                       java.lang.String paramName,
                                                       java.lang.String value)
        Adds a parameter value to the given state.

        Parameters:
        state - the state
        paramName - the parameter name
        value - the parameter value
        Returns:
        the state
      • getParamFromState

        public static java.lang.String getParamFromState​(java.lang.String state,
                                                         java.lang.String paramName)
        Parses the requested parameter from the given state.

        Parameters:
        state - the state
        paramName - the parameter name
        Returns:
        the parameter value
      • getParamsFromState

        public static java.util.Map<java.lang.String,​java.lang.String> getParamsFromState​(java.lang.String state)
        Returns the parameters contained in the state string.

        Parameters:
        state - the state
        Returns:
        the parameters
      • removeParamsFromState

        public static java.lang.String removeParamsFromState​(java.lang.String state)
        Removes all parameter from given state.

        Parameters:
        state - state to be cleaned from parameter
        Returns:
        given state without parameter
      • getOfflineCmsObject

        public CmsObject getOfflineCmsObject​(CmsObject cms)
        Gets an offline version of the cms object.

        Parameters:
        cms - initial CmsObject
        Returns:
        CmsObject adjusted to offline project (cloned)
      • openSubView

        public void openSubView​(java.lang.String state,
                                boolean updateState)
        Opens the requested sub view.

        Parameters:
        state - the state
        updateState - true to update the state URL token
      • getBreadCrumbForState

        protected abstract java.util.LinkedHashMap<java.lang.String,​java.lang.String> getBreadCrumbForState​(java.lang.String state)
        Returns the current bread crumb entries in an ordered map.

        Parameters:
        state - the current state
        Returns:
        bread crumb entry name by state, in case the state is empty, the entry will be disabled
      • getComponentForState

        protected abstract com.vaadin.ui.Component getComponentForState​(java.lang.String state)
        Returns the app component for the given state.

        Parameters:
        state - the state to render
        Returns:
        the app component
      • getLastPathLevel

        protected java.lang.String getLastPathLevel​(java.lang.String path)
        Returns the last path level.

        Parameters:
        path - the path
        Returns:
        the last path level
      • getSubNavEntries

        protected abstract java.util.List<A_CmsWorkplaceApp.NavEntrygetSubNavEntries​(java.lang.String state)
        Returns the sub navigation entries.

        Parameters:
        state - the state
        Returns:
        the sub navigation entries
      • setBreadCrumbEntries

        protected void setBreadCrumbEntries​(java.util.LinkedHashMap<java.lang.String,​java.lang.String> entries)
        Method to set bread crumb entries.

        Parameters:
        entries - to be set
      • updateBreadCrumb

        protected void updateBreadCrumb​(java.util.Map<java.lang.String,​java.lang.String> breadCrumbEntries)
        Updates the bread crumb navigation.

        Parameters:
        breadCrumbEntries - the bread crumb entries
      • updateSubNav

        protected void updateSubNav​(java.util.List<A_CmsWorkplaceApp.NavEntry> subEntries)
        Updates the sub navigation with the given entries.

        Parameters:
        subEntries - the sub navigation entries