jetbrains.buildServer.serverSide.buildLog
Interface MessagesState

All Known Subinterfaces:
BuildLog, BuildLogWriter

public interface MessagesState

Represents current messages state.


Field Summary
static int MAX_LAST_MESSAGE_TEXT_SIZE
           
 
Method Summary
 BlockLogMessage closeBlock(java.lang.String blockName, java.lang.String blockType, java.util.Date timestamp, java.lang.String flowId)
          Closes last opened block with specified name and type and returns it.
 BlockLogMessage closeProgressBlock(java.util.Date timestamp, java.lang.String flowId)
          Closes last progress block and returns it.
 void dropProgressText(java.lang.String flowId)
          Drops current progress text.
 LogMessage error(java.lang.String type, java.lang.String message, java.util.Date timestamp, java.lang.String renderingHint, java.lang.String flowId)
          Deprecated. use error(String, String, Date, String, String, Collection)
 LogMessage error(java.lang.String type, java.lang.String message, java.util.Date timestamp, java.lang.String renderingHint, java.lang.String flowId, java.util.Collection tags)
          Creates and returns a new log message, which reports about an error.
 java.lang.String getCurrentProgressText()
           
 BlockLogMessage getLastBlockMessage(java.lang.String flowId)
           
 LogMessage getLastMessage()
          Returns last message.
 LogMessage message(java.lang.String text, Status status, java.util.Date timestamp, java.lang.String renderingHint, java.lang.String flowId)
          Deprecated. use #message(String, String, Date, String, String, Collection)
 LogMessage message(java.lang.String text, Status status, java.util.Date timestamp, java.lang.String renderingHint, java.lang.String flowId, java.util.Collection tags)
          Adds message and returns it
 BlockLogMessage openBlock(java.lang.String blockName, java.lang.String blockType, java.util.Date timestamp, java.lang.String renderingHint, java.lang.String flowId)
          Deprecated. use openBlock(String, String, Date, String, String, Collection)
 BlockLogMessage openBlock(java.lang.String blockName, java.lang.String blockType, java.util.Date timestamp, java.lang.String renderingHint, java.lang.String flowId, java.util.Collection tags)
          Opens new block.
 BlockLogMessage openProgressBlock(java.lang.String blockName, java.util.Date timestamp, java.lang.String flowId)
          Deprecated. use openProgressBlock(String, Date, String, Collection)
 BlockLogMessage openProgressBlock(java.lang.String blockName, java.util.Date timestamp, java.lang.String flowId, java.util.Collection tags)
           
 LogMessage progressMessage(java.lang.String message, java.util.Date timestamp, java.lang.String flowId)
          Deprecated. use openProgressBlock(String, Date, String, Collection)
 LogMessage progressMessage(java.lang.String message, java.util.Date timestamp, java.lang.String flowId, java.util.Collection tags)
           
 

Field Detail

MAX_LAST_MESSAGE_TEXT_SIZE

static final int MAX_LAST_MESSAGE_TEXT_SIZE
See Also:
Constant Field Values
Method Detail

openBlock

BlockLogMessage openBlock(java.lang.String blockName,
                          java.lang.String blockType,
                          java.util.Date timestamp,
                          java.lang.String renderingHint,
                          java.lang.String flowId)
Deprecated. use openBlock(String, String, Date, String, String, Collection)

Opens new block.

Parameters:
blockName - name of the block
blockType - type of the block
timestamp - timestamp
renderingHint - hint for rendering this block
flowId -
Returns:
block message

openBlock

BlockLogMessage openBlock(java.lang.String blockName,
                          java.lang.String blockType,
                          java.util.Date timestamp,
                          java.lang.String renderingHint,
                          java.lang.String flowId,
                          java.util.Collection tags)
Opens new block.

Parameters:
blockName - name of the block
blockType - type of the block
timestamp - timestamp
renderingHint - hint for rendering this block
flowId -
tags -
Returns:
block message

closeBlock

@Nullable
BlockLogMessage closeBlock(java.lang.String blockName,
                                    java.lang.String blockType,
                                    java.util.Date timestamp,
                                    java.lang.String flowId)
Closes last opened block with specified name and type and returns it.

Parameters:
blockName - name of the block to close
blockType - type of the block to close
timestamp - finish date
flowId -
Returns:
closed block or null

message

LogMessage message(java.lang.String text,
                   Status status,
                   java.util.Date timestamp,
                   java.lang.String renderingHint,
                   java.lang.String flowId)
Deprecated. use #message(String, String, Date, String, String, Collection)

Adds message and returns it

Parameters:
text - message text
status - message status
timestamp - timestamp
renderingHint - hint for rendering this message
flowId -
Returns:
message

message

LogMessage message(java.lang.String text,
                   Status status,
                   java.util.Date timestamp,
                   java.lang.String renderingHint,
                   java.lang.String flowId,
                   java.util.Collection tags)
Adds message and returns it

Parameters:
text - message text
status - message status
timestamp - timestamp
renderingHint - hint for rendering this message
flowId -
tags -
Returns:
message

error

LogMessage error(java.lang.String type,
                 java.lang.String message,
                 java.util.Date timestamp,
                 java.lang.String renderingHint,
                 java.lang.String flowId)
Deprecated. use error(String, String, Date, String, String, Collection)

Creates and returns a new log message, which reports about an error.

Parameters:
type - the error type
message - the error message
timestamp - timestamp
renderingHint - rendering hint
flowId - the flow id
Returns:
corresponding log message

error

LogMessage error(java.lang.String type,
                 java.lang.String message,
                 java.util.Date timestamp,
                 java.lang.String renderingHint,
                 java.lang.String flowId,
                 java.util.Collection tags)
Creates and returns a new log message, which reports about an error.

Parameters:
type - the error type
message - the error message
timestamp - timestamp
renderingHint - rendering hint
flowId - the flow id
tags -
Returns:
corresponding log message

getLastBlockMessage

BlockLogMessage getLastBlockMessage(java.lang.String flowId)

getLastMessage

@Nullable
LogMessage getLastMessage()
Returns last message. Same as getLastBlockMessage(String) if last message is block message. Will return no more than MAX_LAST_MESSAGE_TEXT_SIZE chars of original text

Returns:
last message

openProgressBlock

BlockLogMessage openProgressBlock(java.lang.String blockName,
                                  java.util.Date timestamp,
                                  java.lang.String flowId)
Deprecated. use openProgressBlock(String, Date, String, Collection)


openProgressBlock

BlockLogMessage openProgressBlock(java.lang.String blockName,
                                  java.util.Date timestamp,
                                  java.lang.String flowId,
                                  java.util.Collection tags)

closeProgressBlock

@Nullable
BlockLogMessage closeProgressBlock(java.util.Date timestamp,
                                            java.lang.String flowId)
Closes last progress block and returns it.

Parameters:
timestamp - finish date
flowId -
Returns:
closed progress block or null

progressMessage

LogMessage progressMessage(java.lang.String message,
                           java.util.Date timestamp,
                           java.lang.String flowId)
Deprecated. use openProgressBlock(String, Date, String, Collection)


progressMessage

LogMessage progressMessage(java.lang.String message,
                           java.util.Date timestamp,
                           java.lang.String flowId,
                           java.util.Collection tags)

dropProgressText

void dropProgressText(java.lang.String flowId)
Drops current progress text.

Parameters:
flowId -

getCurrentProgressText

java.lang.String getCurrentProgressText()