awips2/edexOsgi/com.raytheon.edex.uengine/scripts/helloWorld.js
root 8e80217e59 Initial revision of AWIPS2 11.9.0-7p5
Former-commit-id: a02aeb236c [formerly 9f19e3f712] [formerly 06a8b51d6d [formerly 64fa9254b946eae7e61bbc3f513b7c3696c4f54f]]
Former-commit-id: 06a8b51d6d
Former-commit-id: 3360eb6c5f
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();