Class AgentSidebarContent
java.lang.Object
com.novomind.ecom.api.imail.agent.frontend.sidebar.AgentSidebarContent
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
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines toggle events to open or close the sidebar automatically, when the specified event occurs. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Colorthe default border color of the sidebarstatic final intthe default height of the sidebarstatic final intthe default width of the sidebar in pixels -
Constructor Summary
ConstructorsConstructorDescriptionAgentSidebarContent(String path) Constructs a newAgentSidebarContentwith the specified path. -
Method Summary
Modifier and TypeMethodDescriptionaddToggleEvent(AgentSidebarContent.ToggleEvent toggleEvent) Adds the specifiedToggleEventto the set of toggle events for the sidebar.Returns the border color of the sidebar.intReturns the height of the sidebar as absolute pixel value or as percentage value.Returns the optional path to the custom include .xhtml file to be called before the agent logs off.getPath()Returns the path to the custom include .xhtml file for your sidebar.getTitle()Returns the title of the sidebar.Returns the EnumSet of toggle events for the sidebar.intgetWidth()Returns the width of the sidebar as number of pixels.booleanReturns true if the height value is a percentage value and false if the height value is an absolute pixel value.booleanReturns true if the toggle function is enabled, otherwise false.booleanReturns true if the toggle function of the sticky feature is enabled, otherwise false.setBorderColor(Color borderColor) Sets the border color of the sidebar.setHeight(int height) Sets the height of the sidebar as number of pixels.setHeightPercent(int height) Sets the height of the sidebar as a percentage of the full page height.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.Sets the title of the sidebar.setToggleEnabled(boolean toggleEnabled) Enables or disables the toggle feature of the sidebar.setToggleStickyEnabled(boolean toggleStickyEnabled) Enables or disables the toggle function for the sticky feature of the sidebar.setWidth(int width) Sets the width of the sidebar as number of pixels.
-
Field Details
-
DEFAULT_WIDTH
public static final int DEFAULT_WIDTHthe default width of the sidebar in pixels- See Also:
-
DEFAULT_HEIGHT
public static final int DEFAULT_HEIGHTthe default height of the sidebar- See Also:
-
DEFAULT_BORDER_COLOR
the default border color of the sidebar
-
-
Constructor Details
-
AgentSidebarContent
Constructs a newAgentSidebarContentwith 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
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
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
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
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
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
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
Returns the border color of the sidebar.- Returns:
- the border color of the sidebar
- Since:
- 11.27
-
setBorderColor
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
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
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
Returns the EnumSet of toggle events for the sidebar.- Returns:
- the EnumSet of toggle events for the sidebar.
- Since:
- 11.27
-
addToggleEvent
Adds the specifiedToggleEventto the set of toggle events for the sidebar.- Parameters:
toggleEvent- theToggleEventto be added- Returns:
- this
- Since:
- 11.27
-
getTitle
Returns the title of the sidebar.- Returns:
- the title of the sidebar
- Since:
- 12.1
-
setTitle
Sets the title of the sidebar.- Parameters:
title- the title of the sidebar.- Returns:
- this
- Since:
- 12.1
-