]>
git.argeo.org Git - gpl/argeo-slc.git/blob - org.argeo.slc.webapp/src/main/webapp/argeo-ria-lib/slc/class/org/argeo/slc/ria/SlcExecutionMessage.js
2 * A generic JMS slcExecution message encapsulator.
4 qx
.Class
.define("org.argeo.slc.ria.SlcExecutionMessage", {
5 extend
: qx
.core
.Object
,
6 construct : function(uuid
){
12 * The unique id identifying the message
46 * Additionnal attributes as map of key/values
55 addAttribute: function(attName
, attValue
){
56 var attr
= this.getAttributes();
57 attr
[attName
] = attValue
;
58 this.setAttributes(attr
);
61 * Build the xml formatted message body to send
63 * @return {String} The message content as Xml
66 var builder
= new qx
.util
.StringBuilder();
67 builder
.add('<slc:slc-execution uuid="'+this.getUuid()+'">');
68 builder
.add('<slc:status>'+this.getStatus()+'</slc:status>');
69 builder
.add('<slc:type>'+this.getType()+'</slc:type>');
70 builder
.add('<slc:host>'+this.getHost()+'</slc:host>');
71 builder
.add('<slc:user>'+this.getUser()+'</slc:user>');
72 var attr
= this.getAttributes();
73 if(qx
.lang
.Object
.getLength(attr
)){
74 builder
.add('<slc:attributes>');
76 builder
.add('<slc:attribute name="'+key
+'">'+attr
[key
]+'</slc:attribute>');
78 builder
.add('</slc:attributes>');
80 builder
.add('</slc:slc-execution>');