Sie können auf alle Methoden des Simplifiers zugreifen, indem Sie das Simplifier-Objekt verwenden.
Business-Objekte
Simplifier.BusinessObject.<BOName>.<MethodName>(payload: object, successCallback: function, busyFlag?: boolean, failOnError?: boolean, errorCallback?: function, parametrized?: boolean = false): void
Beispiel:
var payload = {leftOperand: 3, operation: "add", rightOperand: 4}; function onSuccess (data) { resolve(data); }; Simplifier.BusinessObject.OtherBO.someMethod(payload, onSuccess, true, false, function () { console.log("something went wrong"); }, true);
Clientseitige Business Objekte
Simplifier.ClientsideBusinessObject.<CSBOName>.<FunctionName>(payload: object, successCallback: function, busyFlag?: boolean, failOnError?: boolean, errorCallback?: function): void Simplifier.CurrentClientsideBusinessObject.<FunctionName>(payload: object, successCallback: function, busyFlag?: boolean, failOnError?: boolean, errorCallback?: function): void
Beispiel:
var payload = {leftOperand: 3, operation: "add", rightOperand: 4}; function onSuccess (data) { resolve(data); }; Simplifier.ClientsideBusinessObject.OtherBO.someMethod(payload, onSuccess, true, false, function () { console.log("something went wrong"); }); Simplifier.CurrentClientsideBusinessObject.someMethod(null, onSuccess, true, false, function () { console.log("something went wrong"); });
Steckdosen
Simplifier.Plugin.<PluginName>.<SlotName>(payload: object, successCallback: function, busyFlag?: boolean, failOnError?: boolean, errorCallback?: function): void
Beispiel:
var payload = {name: ""}; function onSuccess (data) { resolve(data); }; Simplifier.Plugin.contentRepoPlugin.listRepos(null, onSuccess); Simplifier.Plugin.contentRepoPlugin.createRepo(payload, onSuccess);
CryptoJS (Englisch)
var sMySecretKey = "secret"; var oCrypted = CryptoJS.AES.encrypt("dontStealMyData", sMySecretKey); output.result = CryptoJS.AES.decrypt(oCrypted, sMySecretKey).toString(CryptoJS.enc.Utf8)
Werfen Sie auch einen Blick auf crypto-js.