X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-lib%2Fslc%2Fclass%2Forg%2Fargeo%2Fslc%2Fria%2FSlcExecutionMessage.js;h=012ac49928bbc13f0f6e0449b01295a292858859;hb=86f06959d772c750a516780b448d5cbfa16cd48e;hp=c9194f7f3eedce9d70747d5c1c02d2d87e4d6d3a;hpb=ad79d5a27411e607bb29b7cfc275472e4f8be4f5;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcExecutionMessage.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcExecutionMessage.js index c9194f7f3..012ac4992 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcExecutionMessage.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcExecutionMessage.js @@ -3,6 +3,10 @@ */ qx.Class.define("org.argeo.slc.ria.SlcExecutionMessage", { extend : qx.core.Object, + /** + * New instance + * @param uuid {String} The Uuid of the message. If none is passed, one is generated. + */ construct : function(uuid){ this.base(arguments); if(uuid){ @@ -54,6 +58,9 @@ qx.Class.define("org.argeo.slc.ria.SlcExecutionMessage", { check : "String", init : "user" }, + /** + * Date of the message. now() by default. + */ date : { check : "String", init : new Date().toString() @@ -67,6 +74,11 @@ qx.Class.define("org.argeo.slc.ria.SlcExecutionMessage", { }, members : { + /** + * Add a free attribute to the message + * @param attName {String} Name + * @param attValue {String} Value + */ addAttribute: function(attName, attValue){ var attr = this.getAttributes(); attr[attName] = attValue; @@ -96,6 +108,10 @@ qx.Class.define("org.argeo.slc.ria.SlcExecutionMessage", { return builder.get(); }, + /** + * Parse an XML answer and fill the object with it. + * @param slcExecXml {String} An slcExecMessage mapped in XML. + */ fromXml : function(slcExecXml){ var NSMap = {slc:"http://argeo.org/projects/slc/schemas"}; this.setStatus(org.argeo.ria.util.Element.getSingleNodeText(slcExecXml, "slc:status", NSMap));