File

src/app/tasks/model/task-execution.ts

Index

Properties
Methods

Constructor

constructor(executionId: number, exitCode: number, taskName: string, startTime: DateTime, endTime: DateTime, exitMessage: string, args: string[], jobExecutionIds: number[], errorMessage: string, externalExecutionId: string)
Parameters :
Name Type Optional Description
executionId number
exitCode number
taskName string
startTime DateTime
endTime DateTime
exitMessage string
args string[]
jobExecutionIds number[]
errorMessage string
externalExecutionId string

Methods

Static fromJSON
fromJSON(jsonItem: )
Parameters :
Name Type Optional Description
jsonItem
Returns : TaskExecution
Static pageFromJSON
pageFromJSON(input: )
Parameters :
Name Type Optional Description
input

Properties

Public arguments
arguments: string[]
Type : string[]
Public endTime
endTime: DateTime
Type : DateTime
Public errorMessage
errorMessage: string
Type : string
Public executionId
executionId: number
Type : number
Public exitCode
exitCode: number
Type : number
Public exitMessage
exitMessage: string
Type : string
Public externalExecutionId
externalExecutionId: string
Type : string
Public jobExecutionIds
jobExecutionIds: number[]
Type : number[]
Public startTime
startTime: DateTime
Type : DateTime
Public taskName
taskName: string
Type : string
import { Page } from '../../shared/model/page';
import { DateTime } from 'luxon';

export class TaskExecution {

  public executionId: number;
  public exitCode: number;
  public taskName: string;
  public startTime: DateTime;
  public endTime: DateTime;
  public exitMessage: string;
  public arguments: string[];
  public jobExecutionIds: number[];
  public errorMessage: string;
  public externalExecutionId: string;

  constructor(executionId: number,
              exitCode: number,
              taskName: string,
              startTime: DateTime,
              endTime: DateTime,
              exitMessage: string,
              args: string[], // arguments would be restricted name
              jobExecutionIds: number[],
              errorMessage: string,
              externalExecutionId: string) {
    this.executionId = executionId;
    this.exitCode = exitCode;
    this.taskName = taskName;
    this.startTime = startTime;
    this.endTime = endTime;
    this.exitMessage = exitMessage;
    this.arguments = args;
    this.jobExecutionIds = jobExecutionIds;
    this.errorMessage = errorMessage;
    this.externalExecutionId = externalExecutionId;
  }

  static fromJSON(jsonItem): TaskExecution {
    return new TaskExecution(
      jsonItem.executionId,
      jsonItem.exitCode,
      jsonItem.taskName,
      jsonItem.startTime ? DateTime.fromISO(jsonItem.startTime) : null,
      jsonItem.endTime ? DateTime.fromISO(jsonItem.endTime) : null,
      jsonItem.exitMessage,
      jsonItem.arguments,
      jsonItem.jobExecutionIds,
      jsonItem.errorMessage,
      jsonItem.externalExecutionId);
  }

  static pageFromJSON(input): Page<TaskExecution> {
    const page = Page.fromJSON<TaskExecution>(input);
    if (input && input._embedded && input._embedded.taskExecutionResourceList) {
      page.items = input._embedded.taskExecutionResourceList.map(TaskExecution.fromJSON);
    }
    return page;
  }

}

results matching ""

    No results matching ""