jetbrains.buildServer.controllers
Class ActionMessage

java.lang.Object
  extended by jetbrains.buildServer.controllers.ActionMessage

public class ActionMessage
extends java.lang.Object

Represents an action message. Used in conjunction with ActionMessages

Since:
5.0
See Also:
ActionMessages

Constructor Summary
ActionMessage(java.lang.String key, java.lang.String message)
          Create an action message object with the specified key, body and warning flag set to false.
ActionMessage(java.lang.String key, java.lang.String message, boolean isWarning, java.lang.String... parameters)
          Create an action message object with the specified key, body and warning flag.
ActionMessage(java.lang.String key, java.lang.String message, java.lang.String... parameters)
          Create an action message object with the specified key, body and warning flag set to false.
 
Method Summary
 java.lang.String getKey()
           
 java.lang.String getMessage()
           
 boolean isIsWarning()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionMessage

public ActionMessage(@NotNull
                     java.lang.String key,
                     @NotNull
                     java.lang.String message)
Create an action message object with the specified key, body and warning flag set to false.

The caller cannot pass raw HTML message using this constructor, as the message will be escaped.

Parameters:
key - the key
message - the message body
See Also:
ActionMessages.addRawMessage(String, String, String...)

ActionMessage

public ActionMessage(@NotNull
                     java.lang.String key,
                     @NotNull
                     java.lang.String message,
                     boolean isWarning,
                     @NotNull
                     java.lang.String... parameters)
Create an action message object with the specified key, body and warning flag. Message body can contain placeholders for parameters.

The caller cannot pass raw HTML message using this constructor, as the message and parameters will be escaped.

Parameters:
key - message key
message - message
isWarning - the warning flag (by default will be displayed as warning)
parameters - if specified then substrings like {0}, {1}, {2} and so on will be replaced with parameter with corresponding index. Each parameter will be passed through WebUtil.escapeXml(String) function before inserted into the resulting message.
See Also:
ActionMessages.addRawMessage(String, String, String...)

ActionMessage

public ActionMessage(@NotNull
                     java.lang.String key,
                     @NotNull
                     java.lang.String message,
                     @NotNull
                     java.lang.String... parameters)
Create an action message object with the specified key, body and warning flag set to false. Message body can contain placeholders for parameters.

The caller cannot pass raw HTML message using this constructor, as the message and parameters will be escaped.

Parameters:
key - message key
message - message
parameters - if specified then substrings like {0}, {1}, {2} and so on will be replaced with parameter with corresponding index. Each parameter will be passed through WebUtil.escapeXml(String) function before inserted into the resulting message.
See Also:
ActionMessages.addRawMessage(String, String, String...)
Method Detail

getKey

@NotNull
public java.lang.String getKey()

getMessage

@NotNull
public java.lang.String getMessage()

isIsWarning

public boolean isIsWarning()