awips2/edexOsgi/com.raytheon.edex.uengine/scripts/helloWorld.js
root 06a8b51d6d Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: 64fa9254b946eae7e61bbc3f513b7c3696c4f54f
2012-01-06 08:55:05 -06:00

26 lines
641 B
JavaScript

/* the class constructor */
function HelloWorld() {
this.message = "";
}
/* class methods */
function _execute() {
var logger = new SystemLog();
logger.log("info",this.message);
/* empty response */
var response = new MakeResponseNull("Hello World.",new TermQuery("obs"));
return response.execute();
}
function _setMessage(text) {
this.message = text;
}
/* attach methods to class - w/aliases */
HelloWorld.prototype.execute = _execute;
HelloWorld.prototype.setMessage = _setMessage;
/* script to use the class */
var runner = new HelloWorld();
runner.setMessage("Hello World");
runner.execute();