Class CommandOutput
java.lang.Object
org.qubership.atp.mia.model.impl.output.CommandOutput
-
Constructor Summary
ConstructorsConstructorDescriptionCommandOutput(String internalPathToFile, String externalPathToFile, boolean isDisplayed, MiaContext miaContext) Command output output is generated from file with check of need to display on UI.CommandOutput(String internalPathToFile, String externalPathToFile, List<String> errorMessage, boolean isDisplayed, MiaContext miaContext) Constructor when file not found. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddContent(String contentLine) Add to content.voidaddContent(String contentLine, Statuses state) Add to content.voidconcatContent(CommandOutput commandOutput) Adds to the existing marked content a new one.booleanGets file by internal path.voidsaveLatestLineToContent(int amountOfLines, long limitSizeBytes) Save latest line to content.
-
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 machineexternalPathToFile- path to output file on serverisDisplayed- 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 machineexternalPathToFile- path to output file on servererrorMessage- errorMessageisDisplayed- need to display on UI
-
-
Method Details
-
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
Add to content. -
addContent
Add to content. -
concatContent
Adds to the existing marked content a new one. It helps to keep in CommandOutput as a single response. -
containsMarkedContentWithState
-
getContent
-