SAP-BTP-Spielwiese/app1/node_modules/@sap/audit-logging/lib/v1/ConfigurationChangeMessage.js
Markus Rettig 775ac7b58c completed step 3 from the tutorial
you must login with an BTP account in order to see the app
2024-02-08 16:13:36 +01:00

36 lines
1 KiB
JavaScript

'use strict';
var utils = require('../utils');
var common = require('./common');
var ConfigurationChangeBase = require('../base-messages/ConfigurationChangeBase');
module.exports = ConfigurationChangeMessage;
function ConfigurationChangeMessage(content, transport) {
ConfigurationChangeBase.call(this, content, transport);
}
require('util').inherits(ConfigurationChangeMessage, ConfigurationChangeBase);
ConfigurationChangeMessage.prototype.successful = function (success) {
utils.validate.boolean(success, 'successful');
this._content.success = success;
return this;
};
ConfigurationChangeMessage.prototype.attribute = function (name, oldValue, newValue) {
utils.validate.notEmptyString(name, 'attribute name');
utils.validate.string(oldValue, 'old value');
utils.validate.string(newValue, 'new value');
utils.validate.attributeName(this._content.attributes, name);
this._content.attributes.push({
name: name,
old: oldValue,
new: newValue
});
return this;
};
ConfigurationChangeMessage.prototype.log = common.log;