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 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 Details

    • AbstractMessageFilterMenuItem

      public AbstractMessageFilterMenuItem(String name)
      Constructs a MessageFilterMenuItem 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 the AbstractMessageFilterMenuItem#setDisplayName(String) method.
      Parameters:
      name - the unique name to identify this instance of MessageFilterMenuItem
      Since:
      12.0
  • Method Details

    • getName

      public String getName()
      Specified by:
      getName in interface com.novomind.ecom.common.api.attribute.Named
      Returns:
      the name of the custom message filter menu item.
      Since:
      12.0
    • getDisplayName

      public String getDisplayName()
      Specified by:
      getDisplayName in interface com.novomind.ecom.common.api.attribute.DisplayNamed
      Returns:
      the displayName of the custom message filter menu item
      Since:
      12.0
    • setDisplayName

      public MessageFilterMenuItem<T> setDisplayName(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 List<MessageFilterMenuItem<T>> getSubMenuItems()
      Returns:
      the sub menu items
      Since:
      12.0
    • addSubMenuItem

      public MessageFilterMenuItem<T> addSubMenuItem(MessageFilterMenuItem<T> messageFilterMenuItem)
      Adds a new MessageFilterMenuItem 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(Predicate<T> filter)
      The method allows to filter the messages displayed in the view that is linked to this MessageFilterMenuItem 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 interface MessageFilterMenuItem<T extends MessageInfo>
      Parameters:
      filter - The filter predicate to make a filter decision for a message to be displayed in the view linked to this MessageFilterMenuItem. 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 Predicate<T> getFilter()
      Specified by:
      getFilter in interface MessageFilterMenuItem<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 this MessageFilterMenuItem. 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 interface MessageFilterMenuItem<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 interface MessageFilterMenuItem<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