Class CommandOutput

java.lang.Object
org.qubership.atp.mia.model.impl.output.CommandOutput

public class CommandOutput extends Object
  • Constructor Details

    • CommandOutput

      public CommandOutput(String internalPathToFile, String externalPathToFile, boolean isDisplayed, MiaContext miaContext)
      Command output output is generated from file with check of need to display on UI.
      Parameters:
      internalPathToFile - path to output file on local machine
      externalPathToFile - path to output file on server
      isDisplayed - need to display on UI
    • CommandOutput

      public CommandOutput(String internalPathToFile, String externalPathToFile, List<String> errorMessage, boolean isDisplayed, MiaContext miaContext)
      Constructor when file not found.
      Parameters:
      internalPathToFile - path to output file on local machine
      externalPathToFile - path to output file on server
      errorMessage - errorMessage
      isDisplayed - need to display on UI
  • Method Details

    • contentFromFile

      public LinkedList<String> contentFromFile()
      Gets file by internal path.
    • saveLatestLineToContent

      public void saveLatestLineToContent(int amountOfLines, long limitSizeBytes)
      Save latest line to content.
      Parameters:
      amountOfLines - - not more than 10.
      limitSizeBytes - - limit size in bytes.
    • addContent

      public void addContent(@NonNull String contentLine, @NonNull Statuses state)
      Add to content.
    • addContent

      public void addContent(@NonNull String contentLine)
      Add to content.
    • concatContent

      public void concatContent(CommandOutput commandOutput)
      Adds to the existing marked content a new one. It helps to keep in CommandOutput as a single response.
    • containsMarkedContentWithState

      public boolean containsMarkedContentWithState(Statuses state)
    • getContent

      public LinkedList<String> getContent()