Class AbstractQuestionNotification<T>

java.lang.Object
com.pnfsoftware.jeb.core.events.ClientNotification
com.pnfsoftware.jeb.core.events.AbstractQuestionNotification<T>
Type Parameters:
T - response type
Direct Known Subclasses:
QuestionNotificationPath, QuestionNotificationText, QuestionNotificationYesNo

public abstract class AbstractQuestionNotification<T> extends ClientNotification
Blocking client notification that requires a client-provided response.
  • Constructor Details

    • AbstractQuestionNotification

      public AbstractQuestionNotification(String question, T defaultResponse, boolean askDoNotShowAnymore)
      Create a blocking question notification.
      Parameters:
      question - question text shown to the user
      defaultResponse - default response value
      askDoNotShowAnymore - true if clients should offer a "do not show again" option
  • Method Details

    • getDefaultResponse

      public T getDefaultResponse()
      Get the default response value.
      Returns:
      the default response
    • setResponse

      public void setResponse(T response)
      Set the explicit response value.
      Parameters:
      response - response chosen by the client
    • getResponse

      public T getResponse()
      Get the effective response value.
      Returns:
      the explicit response if one was set, otherwise the default response
    • isAskDoNotShowAnymore

      public boolean isAskDoNotShowAnymore()
      Determine whether clients should offer a "do not show again" option.
      Returns:
      true if that option should be presented
    • isDoNotShowAnymoreResponse

      public boolean isDoNotShowAnymoreResponse()
      Determine whether the user asked not to show this notification again.
      Returns:
      true if the client recorded that response
    • setDoNotShowAnymoreResponse

      public void setDoNotShowAnymoreResponse(boolean doNotShowAnymoreResponse)
      Set the recorded "do not show again" response.
      Parameters:
      doNotShowAnymoreResponse - response value supplied by the client