Class AbstractMessageFilterMenuItem<T extends MessageInfo>
- java.lang.Object
-
- com.novomind.ecom.api.imail.common.frontend.menu.AbstractMessageFilterMenuItem<T>
-
- All Implemented Interfaces:
MessageFilterMenuItem<T>
,com.novomind.ecom.common.api.attribute.DisplayNamed
,com.novomind.ecom.common.api.attribute.Named
- Direct Known Subclasses:
AgentBacklogMessageFilterMenuItem
,AgentOutgoingMessageFilterMenuItem
,SupervisorMessageFilterMenuItem
public abstract class AbstractMessageFilterMenuItem<T extends MessageInfo> extends java.lang.Object implements MessageFilterMenuItem<T>
This class is used to display custom menu entries in the backlog menu of the novomind iAGENT Supervisor or Desk frontend. It also provides functionality to filter the messages displayed in the view that is linked to the menu entry. The class cannot be instantiated directly, please use one of the more specific subclasses -SupervisorBacklogMessageFilterMenuItem
-SupervisorOutgoingMessageFilterMenuItem
-AgentBacklogMessageFilterMenuItem
-AgentOutgoingMessageFilterMenuItem
- Since:
- 12.0
-
-
Constructor Summary
Constructors Constructor Description AbstractMessageFilterMenuItem(java.lang.String name)
Constructs aMessageFilterMenuItem
with the given name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageFilterMenuItem<T>
addSubMenuItem(MessageFilterMenuItem<T> messageFilterMenuItem)
Adds a newMessageFilterMenuItem
to this item.java.lang.String
getDisplayName()
java.util.function.Predicate<T>
getFilter()
boolean
getIgnoreVisibility()
java.lang.String
getName()
java.util.List<MessageFilterMenuItem<T>>
getSubMenuItems()
MessageFilterMenuItem<T>
setDisplayName(java.lang.String displayName)
Set the displayName for the custom message filter menu itemMessageFilterMenuItem<T>
setFilter(java.util.function.Predicate<T> filter)
The method allows to filter the messages displayed in the view that is linked to thisMessageFilterMenuItem
by setting a filter predicate.MessageFilterMenuItem<T>
setIgnoreVisibility(boolean ignoreVisibility)
The method allows to disable or enabled the user's category visibility restrictions for the view linked to thisMessageFilterMenuItem
.
-
-
-
Constructor Detail
-
AbstractMessageFilterMenuItem
public AbstractMessageFilterMenuItem(java.lang.String name)
Constructs aMessageFilterMenuItem
with the given name. Please ensure to use a unique name. The name will be used to build the link to the custom view. If you would like to use a different name to be displayed in the frontend please use theAbstractMessageFilterMenuItem#setDisplayName(String)
method.- Parameters:
name
- the unique name to identify this instance ofMessageFilterMenuItem
- Since:
- 12.0
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfacecom.novomind.ecom.common.api.attribute.Named
- Returns:
- the name of the custom message filter menu item.
- Since:
- 12.0
-
getDisplayName
public java.lang.String getDisplayName()
- Specified by:
getDisplayName
in interfacecom.novomind.ecom.common.api.attribute.DisplayNamed
- Returns:
- the displayName of the custom message filter menu item
- Since:
- 12.0
-
setDisplayName
public MessageFilterMenuItem<T> setDisplayName(java.lang.String displayName)
Set the displayName for the custom message filter menu item- Parameters:
displayName
- the alternative displayName to display the menu entry- Returns:
this
- Since:
- 12.0
-
getSubMenuItems
public java.util.List<MessageFilterMenuItem<T>> getSubMenuItems()
- Returns:
- the sub menu items
- Since:
- 12.0
-
addSubMenuItem
public MessageFilterMenuItem<T> addSubMenuItem(MessageFilterMenuItem<T> messageFilterMenuItem)
Adds a newMessageFilterMenuItem
to this item. The added child item cannot have any children itself. Any children of the added child item will be ignored.- Parameters:
messageFilterMenuItem
- the sub menu item to be added- Returns:
this
- Since:
- 12.0
-
setFilter
public MessageFilterMenuItem<T> setFilter(java.util.function.Predicate<T> filter)
The method allows to filter the messages displayed in the view that is linked to thisMessageFilterMenuItem
by setting a filter predicate. ************************** !!! IMPORTANT NOTE !!! **************************************** Please note that the applied filter predicate will be evaluated multiple times within frequent loops. The implementation must guarantee high performance and avoid heap garbage. Please do not implement any long term operations like web service calls or database lookups within the filter predicate. ******************************************************************************************- Specified by:
setFilter
in interfaceMessageFilterMenuItem<T extends MessageInfo>
- Parameters:
filter
- The filter predicate to make a filter decision for a message to be displayed in the view linked to thisMessageFilterMenuItem
. If the parameter is null then no filter is applied and all messages will be displayed in the linked view of this menu entry.- Returns:
this
- Since:
- 12.0
-
getFilter
public java.util.function.Predicate<T> getFilter()
- Specified by:
getFilter
in interfaceMessageFilterMenuItem<T extends MessageInfo>
- Returns:
- the filter predicate
- Since:
- 12.0
-
setIgnoreVisibility
public MessageFilterMenuItem<T> setIgnoreVisibility(boolean ignoreVisibility)
The method allows to disable or enabled the user's category visibility restrictions for the view linked to thisMessageFilterMenuItem
. If the ignoreVisibility parameter is set to true then the view will not be pre-filtered by the user's category visibility restrictions.- Specified by:
setIgnoreVisibility
in interfaceMessageFilterMenuItem<T extends MessageInfo>
- Parameters:
ignoreVisibility
- the ignoreVisibility option for this menu item- Returns:
this
- Since:
- 12.0
-
getIgnoreVisibility
public boolean getIgnoreVisibility()
- Specified by:
getIgnoreVisibility
in interfaceMessageFilterMenuItem<T extends MessageInfo>
- Returns:
- true if the messages displayed in the view linked to this
MessageFilterMenuItem
should not be pre-filtered by the user's category visibility restrictions, otherwise false - Since:
- 12.0
-
-