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
      the default width of the sidebar in pixels
      See Also:
    • DEFAULT_HEIGHT

      public static final int DEFAULT_HEIGHT
      the default height of the sidebar
      See Also:
    • DEFAULT_BORDER_COLOR

      public static final Color DEFAULT_BORDER_COLOR
      the default border color of the sidebar
  • Constructor Details

    • AgentSidebarContent

      public AgentSidebarContent(String path)
      Constructs a new AgentSidebarContent with the specified 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.
      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.
      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.
      Returns:
      the width of the sidebar as number of pixels
      Since:
      11.27
    • setWidth

      public AgentSidebarContent setWidth(int width)
      Sets the width of the sidebar as number of pixels.
      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.
      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.
      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)
      Sets the height of the sidebar as number of pixels.
      Parameters:
      height - the height of the sidebar as number of pixels
      Returns:
      this
      Since:
      11.27
    • setHeightPercent

      public AgentSidebarContent setHeightPercent(int height)
      Sets the height of the sidebar as a percentage of the full page 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.
      Returns:
      the border color of the sidebar
      Since:
      11.27
    • setBorderColor

      public AgentSidebarContent setBorderColor(Color borderColor)
      Sets the border color of the sidebar.
      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.
      Returns:
      true if the toggle function is enabled, otherwise false
      Since:
      11.27
    • setToggleEnabled

      public AgentSidebarContent setToggleEnabled(boolean toggleEnabled)
      Enables or disables the toggle feature of the sidebar.
      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.
      Returns:
      true if the toggle function of the sticky feature is enabled, otherwise false
      Since:
      11.27
    • setToggleStickyEnabled

      public AgentSidebarContent setToggleStickyEnabled(boolean toggleStickyEnabled)
      Enables or disables the toggle function for the sticky feature of the sidebar.
      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.
      Returns:
      the EnumSet of toggle events for the sidebar.
      Since:
      11.27
    • addToggleEvent

      public AgentSidebarContent addToggleEvent(AgentSidebarContent.ToggleEvent toggleEvent)
      Adds the specified ToggleEvent to the set of toggle events for the sidebar.
      Parameters:
      toggleEvent - the ToggleEvent to be added
      Returns:
      this
      Since:
      11.27
    • getTitle

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

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