@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
76 lines • 3.36 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExecutableResult = void 0;
class ExecutableResult {
constructor(data) {
let applicationNameDefault = "";
this.applicationName = typeof (data === null || data === void 0 ? void 0 : data.applicationName) !== "undefined" ? data === null || data === void 0 ? void 0 : data.applicationName : applicationNameDefault;
let commandLineDefault = [];
this.commandLine = typeof (data === null || data === void 0 ? void 0 : data.commandLine) !== "undefined" ? data === null || data === void 0 ? void 0 : data.commandLine : commandLineDefault;
let consoleOutputDefault = [];
this.consoleOutput = typeof (data === null || data === void 0 ? void 0 : data.consoleOutput) !== "undefined" ? data === null || data === void 0 ? void 0 : data.consoleOutput : consoleOutputDefault;
let exitCodeDefault = 0;
this.exitCode = typeof (data === null || data === void 0 ? void 0 : data.exitCode) !== "undefined" ? data === null || data === void 0 ? void 0 : data.exitCode : exitCodeDefault;
let isSuccessfulDefault = false;
this.isSuccessful = typeof (data === null || data === void 0 ? void 0 : data.isSuccessful) !== "undefined" ? data === null || data === void 0 ? void 0 : data.isSuccessful : isSuccessfulDefault;
let messageDefault = "";
this.message = typeof (data === null || data === void 0 ? void 0 : data.message) !== "undefined" ? data === null || data === void 0 ? void 0 : data.message : messageDefault;
}
static getApplicationNameDefault() {
return "";
}
static getApplicationNameDescription() {
return "The name of the executed application.";
}
static getCommandLineDefault() {
return [];
}
static getCommandLineDescription() {
return "The commandline output created by the executed application.";
}
static getConsoleOutputDefault() {
return [];
}
static getConsoleOutputDescription() {
return "The console output created by the executed application.";
}
static getExitCodeDefault() {
return 0;
}
static getExitCodeDescription() {
return "The application specific exit code. This is not a webPDF error code and is defined by the called application itself.";
}
static getIsSuccessfulDefault() {
return false;
}
static getIsSuccessfulDescription() {
return "When set to true, the execution has been successful.";
}
static getMessageDefault() {
return "";
}
static getMessageDescription() {
return "A message summarizing the execution result.";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new ExecutableResult(data);
}
toJson() {
return {
'applicationName': this.applicationName,
'commandLine': this.commandLine,
'consoleOutput': this.consoleOutput,
'exitCode': this.exitCode,
'isSuccessful': this.isSuccessful,
'message': this.message,
};
}
clone() {
return ExecutableResult.fromJson(this.toJson());
}
}
exports.ExecutableResult = ExecutableResult;
//# sourceMappingURL=ExecutableResult.js.map