Class WebappMessage

  • Direct Known Subclasses:
    UserActionRequiredMessage

    @API(type=NOT_EXTENDABLE,
         src=PUBLIC)
    public class WebappMessage
    extends java.lang.Object
    Webapp server message that is presented on client side.
    Since:
    16.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MESSAGE_TYPE_CUSTOM
      A message type that is the lowest designed to be intercepted by the plugin code on the client side and displayed in a custom way.
      static int MESSAGE_TYPE_ERROR
      Message type error.
      static int MESSAGE_TYPE_INFO
      Message type info.
      static int MESSAGE_TYPE_RESULT_VALUE
      This message represents a return value from an WebappAuthorOperation.
      static int MESSAGE_TYPE_SYSTEM_APPLICATION
      A message type that should be handled by the webapp to open the url in the system application as it cannot be opened server-side.
      static int MESSAGE_TYPE_WARN
      Message type warning.
    • Constructor Summary

      Constructors 
      Constructor Description
      WebappMessage​(int type, java.lang.String title, java.lang.String message, boolean isUserGenerated)
      Constructor.
    • Field Detail

      • MESSAGE_TYPE_RESULT_VALUE

        public static final int MESSAGE_TYPE_RESULT_VALUE
        This message represents a return value from an WebappAuthorOperation.
        See Also:
        Constant Field Values
      • MESSAGE_TYPE_SYSTEM_APPLICATION

        public static final int MESSAGE_TYPE_SYSTEM_APPLICATION
        A message type that should be handled by the webapp to open the url in the system application as it cannot be opened server-side.
        See Also:
        Constant Field Values
      • MESSAGE_TYPE_INFO

        public static final int MESSAGE_TYPE_INFO
        Message type info.
        See Also:
        Constant Field Values
      • MESSAGE_TYPE_WARN

        public static final int MESSAGE_TYPE_WARN
        Message type warning.
        See Also:
        Constant Field Values
      • MESSAGE_TYPE_ERROR

        public static final int MESSAGE_TYPE_ERROR
        Message type error.
        See Also:
        Constant Field Values
      • MESSAGE_TYPE_CUSTOM

        public static final int MESSAGE_TYPE_CUSTOM
        A message type that is the lowest designed to be intercepted by the plugin code on the client side and displayed in a custom way. All message types larger than this one are not handled by default by the webapp, but passed to the plugin code handlers.
        See Also:
        Constant Field Values
    • Constructor Detail

      • WebappMessage

        public WebappMessage​(int type,
                             java.lang.String title,
                             java.lang.String message,
                             boolean isUserGenerated)
        Constructor.
        Parameters:
        type - Message type.
        title - Message title.
        message - Message body.
        isUserGenerated - true if the message was generated by the user and should be presented in UI.
    • Method Detail

      • getMessage

        public java.lang.String getMessage()
        Returns:
        Returns the message.
      • getTitle

        public java.lang.String getTitle()
        Returns:
        Returns the title.
      • getType

        public int getType()
        Returns:
        Returns the type.
      • isUserGenerated

        public boolean isUserGenerated()
        Returns:
        Returns the isUserGenerated.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
        See Also:
        Object.equals(java.lang.Object)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
        See Also:
        Object.hashCode()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()