@softvision/webpdf-wsclient-typescript
Version:
A simplified and optimized API client library for the webPDF server
47 lines • 2.24 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ServerConfiguration = void 0;
const index_1 = require("./../index");
class ServerConfiguration extends index_1.Configuration {
constructor(data) {
super(data);
this.configuration = index_1.Server.fromJson(data.configuration);
this.configurationChecks = (data.configurationChecks || []).map(index_1.ServerCheck.fromJson);
let connectorKeyStoreDefault = {};
this.connectorKeyStore = typeof (data === null || data === void 0 ? void 0 : data.connectorKeyStore) !== "undefined" ? data === null || data === void 0 ? void 0 : data.connectorKeyStore : connectorKeyStoreDefault;
this.trustStoreKeyStore = index_1.TrustStoreKeyStore.fromJson(data === null || data === void 0 ? void 0 : data.trustStoreKeyStore);
}
static getConfigurationDescription() {
return "";
}
static getConfigurationChecksDefault() {
return [];
}
static getConfigurationChecksDescription() {
return "";
}
static getConnectorKeyStoreDefault() {
return {};
}
static getConnectorKeyStoreDescription() {
return "Lists all contents of the keystore (e.g. it\u00B4s certificates and raw data), that shall be used by theserver\u00B4s secured SSL connectors.";
}
static getTrustStoreKeyStoreDescription() {
return "";
}
static fromJson(data) {
if (data === undefined || data === null) {
return data;
}
return new ServerConfiguration(data);
}
toJson() {
var _a, _b, _c;
return Object.assign(Object.assign({}, (super.toJson())), { 'configuration': (_a = this.configuration) === null || _a === void 0 ? void 0 : _a.toJson(), 'configurationChecks': (_b = this.configurationChecks) === null || _b === void 0 ? void 0 : _b.map((data) => data.toJson()), 'connectorKeyStore': this.connectorKeyStore, 'trustStoreKeyStore': (_c = this.trustStoreKeyStore) === null || _c === void 0 ? void 0 : _c.toJson() });
}
clone() {
return ServerConfiguration.fromJson(this.toJson());
}
}
exports.ServerConfiguration = ServerConfiguration;
//# sourceMappingURL=ServerConfiguration.js.map