Class AgentSidebarContent

java.lang.Object
com.novomind.ecom.api.imail.agent.frontend.sidebar.AgentSidebarContent

public final class AgentSidebarContent extends Object
Represents a custom sidebar to be displayed within an iframe in the novomind iAGENT Desk and also within the novomind iAGENT Chat frontend.
Since:
11.27
  • Field Details

    • DEFAULT_WIDTH

      public static final int DEFAULT_WIDTH
      See Also:
    • DEFAULT_HEIGHT

      public static final int DEFAULT_HEIGHT
      See Also:
    • DEFAULT_BORDER_COLOR

      public static final Color DEFAULT_BORDER_COLOR
  • Constructor Details

    • AgentSidebarContent

      public AgentSidebarContent(String path)
      Parameters:
      path - the path to the custom include .xhtml file for your sidebar, specified absolute inside 'META-INF/views' (e.g. '/helloworld/helloWorldSidebar.xhtml'). The path also may be an external url.
      Since:
      11.27
  • Method Details

    • getPath

      public String getPath()
      Returns:
      the path to the custom include .xhtml file for your sidebar, specified absolute inside 'META-INF/views' (e.g. '/helloworld/helloWorldSidebar.xhtml').
      Since:
      11.27
    • getLogoutPath

      public Optional<String> getLogoutPath()
      Returns:
      the optional path to the custom include .xhtml file to be called before the agent logs off, specified absolute inside 'META-INF/views' (e.g. '/helloworld/logoff.xhtml').
      Since:
      11.27
    • setLogoutPath

      public AgentSidebarContent setLogoutPath(String logoutPath)
      The method allows to specify an url or xhtml resource path to be loaded and to replace the content of the sidebar immediately before the agent logs off. The specified url will be loaded into the iframe 2 seconds before the agent is logged off.
      Parameters:
      logoutPath - the optional path to the custom include .xhtml file to be called before the agent logs off, specified absolute inside 'META-INF/views' (e.g. '/helloworld/logoff.xhtml'). The path also may be an external url.
      Returns:
      this
      Since:
      11.27
    • getWidth

      public int getWidth()
      Returns:
      the width of the sidebar as number of pixels
      Since:
      11.27
    • setWidth

      public AgentSidebarContent setWidth(int width)
      Parameters:
      width - the width of the sidebar as number of pixels
      Returns:
      this
      Since:
      11.27
    • getHeight

      public int getHeight()
      Returns:
      the height of the sidebar as absolute pixel value or as percentage value between 0 and 100 percent depending on the isHeightPercentage
      Since:
      11.27
    • isHeightPercentage

      public boolean isHeightPercentage()
      Returns:
      true if the height value is a percentage value and false if the height value is an absolute pixel value
      Since:
      11.27
    • setHeight

      public AgentSidebarContent setHeight(int height)
      Parameters:
      height - the height of the sidebar as number of pixels
      Returns:
      this
      Since:
      11.27
    • setHeightPercent

      public AgentSidebarContent setHeightPercent(int height)
      Parameters:
      height - the height of the sidebar as percent of full page height (value between 0 and 100)
      Returns:
      this
      Since:
      11.27
    • getBorderColor

      public Color getBorderColor()
      Returns:
      the border color of the sidebar
      Since:
      11.27
    • setBorderColor

      public AgentSidebarContent setBorderColor(Color borderColor)
      Parameters:
      borderColor - the border color of the sidebar.
      Returns:
      this
      Since:
      11.27
    • isToggleEnabled

      public boolean isToggleEnabled()
      Returns:
      true if the toggle function is enabled, otherwise false
      Since:
      11.27
    • setToggleEnabled

      public AgentSidebarContent setToggleEnabled(boolean toggleEnabled)
      Parameters:
      toggleEnabled - enable the toggle feature of the sidebar. If the toggle feature of the sidebar is disabled, the sidebar will be always visible.
      Returns:
      this
      Since:
      11.27
    • isToggleStickyEnabled

      public boolean isToggleStickyEnabled()
      Returns:
      true if the toggle function of the sticky feature is enabled, otherwise false
      Since:
      11.27
    • setToggleStickyEnabled

      public AgentSidebarContent setToggleStickyEnabled(boolean toggleStickyEnabled)
      Parameters:
      toggleStickyEnabled - enable the toggle function for the sticky feature of the sidebar
      Returns:
      this
      Since:
      11.27
    • getToggleEvents

      public Set<AgentSidebarContent.ToggleEvent> getToggleEvents()
      Returns:
      the EnumSet of toggle events for the sidebar.
      Since:
      11.27
    • addToggleEvent

      public AgentSidebarContent addToggleEvent(AgentSidebarContent.ToggleEvent toggleEvent)
      Parameters:
      toggleEvent - the ToggleEvent to be added
      Returns:
      this
      Since:
      11.27
    • getTitle

      public String getTitle()
      Returns:
      the title of the sidebar
      Since:
      12.1
    • setTitle

      public AgentSidebarContent setTitle(String title)
      Parameters:
      title - the title of the sidebar.
      Returns:
      this
      Since:
      12.1