You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2009/03/19 12:11:05 UTC

svn commit: r755920 [9/11] - in /camel/trunk/components/camel-web/src/main/webapp/js/dojox: json/ jsonPath/ lang/ lang/aspect/ lang/functional/ lang/oo/ layout/ layout/dnd/ layout/ext-dijit/ layout/ext-dijit/layout/ layout/nls/ layout/nls/en/ layout/nl...

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/PreexistingAnnotation.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/PreexistingAnnotation.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/PreexistingAnnotation.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/PreexistingAnnotation.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,141 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch.PreexistingAnnotation"]){
+dojo._hasResource["dojox.sketch.PreexistingAnnotation"]=true;
+dojo.provide("dojox.sketch.PreexistingAnnotation");
+dojo.require("dojox.sketch.Annotation");
+dojo.require("dojox.sketch.Anchor");
+(function(){
+var ta=dojox.sketch;
+ta.PreexistingAnnotation=function(_2,id){
+ta.Annotation.call(this,_2,id);
+this.transform={dx:0,dy:0};
+this.start={x:0,y:0};
+this.end={x:200,y:200};
+this.radius=8;
+this.textPosition={x:196,y:196};
+this.textOffset=4;
+this.textAlign="end";
+this.rectShape=null;
+this.labelShape=null;
+this.anchors.start=new ta.Anchor(this,"start");
+this.anchors.end=new ta.Anchor(this,"end");
+};
+ta.PreexistingAnnotation.prototype=new ta.Annotation;
+var p=ta.PreexistingAnnotation.prototype;
+p.constructor=ta.PreexistingAnnotation;
+p.type=function(){
+return "Preexisting";
+};
+p.getType=function(){
+return ta.PreexistingAnnotation;
+};
+p._pos=function(){
+var x=Math.min(this.start.x,this.end.x);
+var y=Math.min(this.start.y,this.end.y);
+var w=Math.max(this.start.x,this.end.x);
+var h=Math.max(this.start.y,this.end.y);
+this.start={x:x,y:y};
+this.end={x:w,y:h};
+this.textPosition={x:this.end.x-this.textOffset,y:this.end.y-this.textOffset};
+};
+p.apply=function(_9){
+if(!_9){
+return;
+}
+if(_9.documentElement){
+_9=_9.documentElement;
+}
+this.readCommonAttrs(_9);
+for(var i=0;i<_9.childNodes.length;i++){
+var c=_9.childNodes[i];
+if(c.localName=="text"){
+this.property("label",c.childNodes.length?c.childNodes[0].nodeValue:"");
+}else{
+if(c.localName=="rect"){
+if(c.getAttribute("x")!==null){
+this.start.x=parseFloat(c.getAttribute("x"),10);
+}
+if(c.getAttribute("width")!==null){
+this.end.x=parseFloat(c.getAttribute("width"),10)+parseFloat(c.getAttribute("x"),10);
+}
+if(c.getAttribute("y")!==null){
+this.start.y=parseFloat(c.getAttribute("y"),10);
+}
+if(c.getAttribute("height")!==null){
+this.end.y=parseFloat(c.getAttribute("height"),10)+parseFloat(c.getAttribute("y"),10);
+}
+if(c.getAttribute("r")!==null){
+this.radius=parseFloat(c.getAttribute("r"),10);
+}
+var _c=this.property("stroke");
+var _d=c.getAttribute("style");
+var m=_d.match(/stroke:([^;]+);/);
+if(m){
+_c.color=m[1];
+this.property("fill",m[1]);
+}
+m=_d.match(/stroke-width:([^;]+);/);
+if(m){
+_c.width=m[1];
+}
+this.property("stroke",_c);
+}
+}
+}
+};
+p.initialize=function(_f){
+this.apply(_f);
+this._pos();
+this.shape=this.figure.group.createGroup();
+this.shape.getEventSource().setAttribute("id",this.id);
+this.rectShape=this.shape.createRect({x:this.start.x,y:this.start.y,width:this.end.x-this.start.x,height:this.end.y-this.start.y,r:this.radius}).setFill([255,255,255,0.1]);
+this.rectShape.getEventSource().setAttribute("shape-rendering","crispEdges");
+this.labelShape=this.shape.createText({x:this.textPosition.x,y:this.textPosition.y,text:this.property("label"),align:this.textAlign}).setFill(this.property("fill"));
+this.labelShape.getEventSource().setAttribute("id",this.id+"-labelShape");
+this.draw();
+};
+p.destroy=function(){
+if(!this.shape){
+return;
+}
+this.shape.remove(this.rectShape);
+this.shape.remove(this.labelShape);
+this.figure.group.remove(this.shape);
+this.shape=this.rectShape=this.labelShape=null;
+};
+p.getBBox=function(){
+var x=Math.min(this.start.x,this.end.x);
+var y=Math.min(this.start.y,this.end.y);
+var w=Math.max(this.start.x,this.end.x)-x;
+var h=Math.max(this.start.y,this.end.y)-y;
+return {x:x-2,y:y-2,width:w+4,height:h+4};
+};
+p.draw=function(obj){
+this.apply(obj);
+this._pos();
+this.shape.setTransform(this.transform);
+this.rectShape.setShape({x:this.start.x,y:this.start.y,width:this.end.x-this.start.x,height:this.end.y-this.start.y,r:this.radius}).setFill([255,255,255,0.1]);
+this.labelShape.setShape({x:this.textPosition.x,y:this.textPosition.y,text:this.property("label")}).setFill(this.property("fill"));
+this.zoom();
+};
+p.zoom=function(pct){
+if(this.rectShape){
+pct=pct||this.figure.zoomFactor;
+ta.Annotation.prototype.zoom.call(this,pct);
+pct=dojox.gfx.renderer=="vml"?1:pct;
+this.rectShape.setStroke({color:this.property("fill"),width:1/pct});
+}
+};
+p.serialize=function(){
+var s=this.property("stroke");
+return "<g "+this.writeCommonAttrs()+">"+"<rect style=\"stroke:"+s.color+";stroke-width:1;fill:none;\" "+"x=\""+this.start.x+"\" "+"width=\""+(this.end.x-this.start.x)+"\" "+"y=\""+this.start.y+"\" "+"height=\""+(this.end.y-this.start.y)+"\" "+"rx=\""+this.radius+"\" "+"ry=\""+this.radius+"\" "+" />"+"<text style=\"fill:"+s.color+";text-anchor:"+this.textAlign+"\" font-weight=\"bold\" "+"x=\""+this.textPosition.x+"\" "+"y=\""+this.textPosition.y+"\">"+this.property("label")+"</text>"+"</g>";
+};
+ta.Annotation.register("Preexisting");
+})();
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/PreexistingAnnotation.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/README
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/README?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/README (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/README Thu Mar 19 11:10:58 2009
@@ -0,0 +1,58 @@
+-------------------------------------------------------------------------------
+dojox.sketch
+-------------------------------------------------------------------------------
+Version 0.1
+Release date: 28/01/2008
+-------------------------------------------------------------------------------
+Project state:
+experimental
+-------------------------------------------------------------------------------
+Credits
+	Contributed by TeamPatent (supported by National Science Foundation grant 638334)
+  Tom Trenka (ttrenka@gmail.com)
+  Heng Liu/LiuCougar (heng@teampatent.com)
+-------------------------------------------------------------------------------
+Project description
+
+A cross-browser drawing editor based on dojox.gfx.
+-------------------------------------------------------------------------------
+Dependencies:
+
+dijit (Toolbar, Button, Slider)
+dojox.gfx
+dojox.xml
+-------------------------------------------------------------------------------
+Documentation
+
+Currently, 5 shapes are supported: line, single arrow line, double arrow line,
+underline text and text. The first 3 shapes can have optinal text associated.
+
+Shapes can be added, deleted, moved and modified. All of these operations can
+be undo-ed or redo-ed.
+
+TODO:
+ * provide UI to change various properties on shapes (fill, stroke, text) and
+allow changing of background image
+ * serialize/unserialize in dojox.gfx to svg (and maybe vml as well?) (or another
+simplier format? such as a json based one, which is easier to parse, and then
+write a convertor to convert the json format to svg or any other format?)
+ * Move mousedown/up/move to each shape (to prepare for the following)
+ * Add shapes for other primitive shapes (needs to decide which primitive 
+dojox.gfx.shapes are useful), and add in support for user to group any 
+shapes/groups to form a single "compound shape" (need to add support to set 
+fill/stroke properties on the entire compound shape, which shallpropagate to 
+all children shapes)
+-------------------------------------------------------------------------------
+Installation instructions
+
+Install dijit, dojox.gfx and dojox.xml first
+
+Grab the following from the Dojo SVN Repository:
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/sketch.js
+http://svn.dojotoolkit.org/var/src/dojo/dojox/trunk/sketch/*
+
+Install into the following directory structure:
+/dojox/sketch/
+
+...which should be at the same level as your Dojo checkout.
+-------------------------------------------------------------------------------

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/README
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/SingleArrowAnnotation.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/SingleArrowAnnotation.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/SingleArrowAnnotation.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/SingleArrowAnnotation.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,185 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch.SingleArrowAnnotation"]){
+dojo._hasResource["dojox.sketch.SingleArrowAnnotation"]=true;
+dojo.provide("dojox.sketch.SingleArrowAnnotation");
+dojo.require("dojox.sketch.Annotation");
+dojo.require("dojox.sketch.Anchor");
+(function(){
+var ta=dojox.sketch;
+ta.SingleArrowAnnotation=function(_2,id){
+ta.Annotation.call(this,_2,id);
+this.transform={dx:0,dy:0};
+this.start={x:0,y:0};
+this.control={x:100,y:-50};
+this.end={x:200,y:0};
+this.textPosition={x:0,y:0};
+this.textOffset=4;
+this.textAlign="middle";
+this.textYOffset=10;
+this.rotation=0;
+this.pathShape=null;
+this.arrowhead=null;
+this.arrowheadGroup=null;
+this.labelShape=null;
+this.anchors.start=new ta.Anchor(this,"start");
+this.anchors.control=new ta.Anchor(this,"control");
+this.anchors.end=new ta.Anchor(this,"end");
+};
+ta.SingleArrowAnnotation.prototype=new ta.Annotation;
+var p=ta.SingleArrowAnnotation.prototype;
+p.constructor=ta.SingleArrowAnnotation;
+p.type=function(){
+return "SingleArrow";
+};
+p.getType=function(){
+return ta.SingleArrowAnnotation;
+};
+p._rot=function(){
+var _5=this.control.y-this.start.y;
+var _6=this.control.x-this.start.x;
+this.rotation=Math.atan2(_5,_6);
+};
+p._pos=function(){
+var _7=this.textOffset,x=0,y=0;
+var _a=this.calculate.slope(this.control,this.end);
+if(Math.abs(_a)>=1){
+x=this.end.x+this.calculate.dx(this.control,this.end,_7);
+if(this.control.y>this.end.y){
+y=this.end.y-_7;
+}else{
+y=this.end.y+_7+this.textYOffset;
+}
+}else{
+if(_a==0){
+x=this.end.x+_7;
+y=this.end.y+this.textYOffset;
+}else{
+if(this.start.x>this.end.x){
+x=this.end.x-_7;
+this.textAlign="end";
+}else{
+x=this.end.x+_7;
+this.textAlign="start";
+}
+if(this.start.y<this.end.y){
+y=this.end.y+this.calculate.dy(this.control,this.end,_7)+this.textYOffset;
+}else{
+y=this.end.y+this.calculate.dy(this.control,this.end,-_7);
+}
+}
+}
+this.textPosition={x:x,y:y};
+};
+p.apply=function(_b){
+if(!_b){
+return;
+}
+if(_b.documentElement){
+_b=_b.documentElement;
+}
+this.readCommonAttrs(_b);
+for(var i=0;i<_b.childNodes.length;i++){
+var c=_b.childNodes[i];
+if(c.localName=="text"){
+this.property("label",c.childNodes.length?c.childNodes[0].nodeValue:"");
+}else{
+if(c.localName=="path"){
+var d=c.getAttribute("d").split(" ");
+var s=d[0].split(",");
+this.start.x=parseFloat(s[0].substr(1),10);
+this.start.y=parseFloat(s[1],10);
+s=d[1].split(",");
+this.control.x=parseFloat(s[0].substr(1),10);
+this.control.y=parseFloat(s[1],10);
+s=d[2].split(",");
+this.end.x=parseFloat(s[0],10);
+this.end.y=parseFloat(s[1],10);
+var _10=this.property("stroke");
+var _11=c.getAttribute("style");
+var m=_11.match(/stroke:([^;]+);/);
+if(m){
+_10.color=m[1];
+this.property("fill",m[1]);
+}
+m=_11.match(/stroke-width:([^;]+);/);
+if(m){
+_10.width=m[1];
+}
+this.property("stroke",_10);
+}
+}
+}
+};
+p.initialize=function(obj){
+var _14=(ta.Annotation.labelFont)?ta.Annotation.labelFont:{family:"Times",size:"16px"};
+this.apply(obj);
+this._rot();
+this._pos();
+var rot=this.rotation;
+var _16=dojox.gfx.matrix.rotate(rot);
+this.shape=this.figure.group.createGroup();
+this.shape.getEventSource().setAttribute("id",this.id);
+this.pathShape=this.shape.createPath("M"+this.start.x+","+this.start.y+" Q"+this.control.x+","+this.control.y+" "+this.end.x+","+this.end.y+" l0,0");
+this.arrowheadGroup=this.shape.createGroup();
+this.arrowhead=this.arrowheadGroup.createPath();
+this.labelShape=this.shape.createText({x:this.textPosition.x,y:this.textPosition.y,text:this.property("label"),align:this.textAlign});
+this.labelShape.getEventSource().setAttribute("id",this.id+"-labelShape");
+this.draw();
+};
+p.destroy=function(){
+if(!this.shape){
+return;
+}
+this.arrowheadGroup.remove(this.arrowhead);
+this.shape.remove(this.arrowheadGroup);
+this.shape.remove(this.pathShape);
+this.shape.remove(this.labelShape);
+this.figure.group.remove(this.shape);
+this.shape=this.pathShape=this.labelShape=this.arrowheadGroup=this.arrowhead=null;
+};
+p.draw=function(obj){
+this.apply(obj);
+this._rot();
+this._pos();
+var rot=this.rotation;
+var _19=dojox.gfx.matrix.rotate(rot);
+this.shape.setTransform(this.transform);
+this.pathShape.setShape("M"+this.start.x+","+this.start.y+" Q"+this.control.x+","+this.control.y+" "+this.end.x+","+this.end.y+" l0,0");
+this.arrowheadGroup.setTransform({dx:this.start.x,dy:this.start.y}).applyTransform(_19);
+this.arrowhead.setFill(this.property("fill"));
+this.labelShape.setShape({x:this.textPosition.x,y:this.textPosition.y,text:this.property("label"),align:this.textAlign}).setFill(this.property("fill"));
+this.zoom();
+};
+p.zoom=function(pct){
+if(this.arrowhead){
+pct=pct||this.figure.zoomFactor;
+ta.Annotation.prototype.zoom.call(this,pct);
+if(this._curPct!==pct){
+this._curPct=pct;
+var l=pct>1?20:Math.floor(20/pct),w=pct>1?5:Math.floor(5/pct),h=pct>1?3:Math.floor(3/pct);
+this.arrowhead.setShape("M0,0 l"+l+",-"+w+" -"+h+","+w+" "+h+","+w+" Z");
+}
+}
+};
+p.getBBox=function(){
+var x=Math.min(this.start.x,this.control.x,this.end.x);
+var y=Math.min(this.start.y,this.control.y,this.end.y);
+var w=Math.max(this.start.x,this.control.x,this.end.x)-x;
+var h=Math.max(this.start.y,this.control.y,this.end.y)-y;
+return {x:x,y:y,width:w,height:h};
+};
+p.serialize=function(){
+var s=this.property("stroke");
+var r=this.rotation*(180/Math.PI);
+r=Math.round(r*Math.pow(10,4))/Math.pow(10,4);
+return "<g "+this.writeCommonAttrs()+">"+"<path style=\"stroke:"+s.color+";stroke-width:"+s.width+";fill:none;\" d=\""+"M"+this.start.x+","+this.start.y+" "+"Q"+this.control.x+","+this.control.y+" "+this.end.x+","+this.end.y+"\" />"+"<g transform=\"translate("+this.start.x+","+this.start.y+") "+"rotate("+r+")\">"+"<path style=\"fill:"+s.color+";\" d=\"M0,0 l20,-5, -3,5, 3,5 Z\" />"+"</g>"+"<text style=\"fill:"+s.color+";text-anchor:"+this.textAlign+"\" font-weight=\"bold\" "+"x=\""+this.textPosition.x+"\" "+"y=\""+this.textPosition.y+"\">"+this.property("label")+"</text>"+"</g>";
+};
+ta.Annotation.register("SingleArrow");
+})();
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/SingleArrowAnnotation.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Slider.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Slider.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Slider.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Slider.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,32 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch.Slider"]){
+dojo._hasResource["dojox.sketch.Slider"]=true;
+dojo.provide("dojox.sketch.Slider");
+dojo.require("dijit.form.HorizontalSlider");
+dojo.declare("dojox.sketch.Slider",dojox.sketch._Plugin,{_initButton:function(){
+this.slider=new dijit.form.HorizontalSlider({minimum:20,maximum:200,value:20,style:"width:200px;float:right"});
+this.slider._movable.node.title="Double Click to \"Zoom to Fit\"";
+this.connect(this.slider,"onChange","_setZoom");
+this.connect(this.slider.sliderHandle,"ondblclick","_zoomToFit");
+},_zoomToFit:function(){
+var r=this.figure.getFit();
+this.slider.attr("value",this.slider.maximum<r?this.slider.maximum:(this.slider.minimum>r?this.slider.minimum:r));
+},_setZoom:function(v){
+if(this.figure){
+this.figure.zoom(v);
+}
+},setToolbar:function(t){
+t.addChild(this.slider);
+if(!t._reset2Zoom){
+t._reset2Zoom=true;
+this.connect(t,"reset","_zoomToFit");
+}
+}});
+dojox.sketch.registerTool("Slider",dojox.sketch.Slider);
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Slider.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Toolbar.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Toolbar.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Toolbar.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Toolbar.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,78 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch.Toolbar"]){
+dojo._hasResource["dojox.sketch.Toolbar"]=true;
+dojo.provide("dojox.sketch.Toolbar");
+dojo.require("dojox.sketch.Annotation");
+dojo.require("dijit.Toolbar");
+dojo.require("dijit.form.Button");
+dojo.declare("dojox.sketch.ButtonGroup",null,{constructor:function(){
+this._childMaps={};
+this._children=[];
+},add:function(_1){
+this._childMaps[_1]=_1.connect(_1,"onActivate",dojo.hitch(this,"_resetGroup",_1));
+this._children.push(_1);
+},_resetGroup:function(p){
+var cs=this._children;
+dojo.forEach(cs,function(c){
+if(p!=c&&c["attr"]){
+c.attr("checked",false);
+}
+});
+}});
+dojo.declare("dojox.sketch.Toolbar",dijit.Toolbar,{figure:null,plugins:null,postCreate:function(){
+this.inherited(arguments);
+this.shapeGroup=new dojox.sketch.ButtonGroup;
+this.connect(this.figure,"onLoad","reset");
+if(!this.plugins){
+this.plugins=["Slider","Lead","SingleArrow","DoubleArrow","Underline","Preexisting"];
+}
+this._plugins=[];
+dojo.forEach(this.plugins,function(_5){
+var _6=dojo.isString(_5)?_5:_5.name;
+var p=new dojox.sketch.tools[_6](_5.args||{});
+this._plugins.push(p);
+p.setFigure(this.figure);
+p.setToolbar(this);
+if(!this._defaultTool&&p.button){
+this._defaultTool=p;
+}
+},this);
+},destroy:function(){
+dojo.forEach(this._plugins,function(p){
+p.destroy();
+});
+this.inherited(arguments);
+delete this._defaultTool;
+delete this._plugins;
+},addGroupItem:function(_9,_a){
+if(_a!="toolsGroup"){
+console.error("not supported group "+_a);
+return;
+}
+this.shapeGroup.add(_9);
+},reset:function(){
+this._defaultTool.activate();
+},_setShape:function(s){
+if(!this.figure.surface){
+return;
+}
+if(this.figure.hasSelections()){
+for(var i=0;i<this.figure.selected.length;i++){
+var _d=this.figure.selected[i].serialize();
+this.figure.convert(this.figure.selected[i],s);
+this.figure.history.add(dojox.sketch.CommandTypes.Convert,this.figure.selected[i],_d);
+}
+}
+}});
+dojox.sketch.makeToolbar=function(_e,_f){
+var _10=new dojox.sketch.Toolbar({"figure":_f});
+_e.appendChild(_10.domNode);
+return _10;
+};
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/Toolbar.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/UnderlineAnnotation.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/UnderlineAnnotation.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/UnderlineAnnotation.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/UnderlineAnnotation.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,103 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch.UnderlineAnnotation"]){
+dojo._hasResource["dojox.sketch.UnderlineAnnotation"]=true;
+dojo.provide("dojox.sketch.UnderlineAnnotation");
+dojo.require("dojox.sketch.Annotation");
+dojo.require("dojox.sketch.Anchor");
+(function(){
+var ta=dojox.sketch;
+ta.UnderlineAnnotation=function(_2,id){
+ta.Annotation.call(this,_2,id);
+this.transform={dx:0,dy:0};
+this.start={x:0,y:0};
+this.property("label","#");
+this.labelShape=null;
+this.lineShape=null;
+};
+ta.UnderlineAnnotation.prototype=new ta.Annotation;
+var p=ta.UnderlineAnnotation.prototype;
+p.constructor=ta.UnderlineAnnotation;
+p.type=function(){
+return "Underline";
+};
+p.getType=function(){
+return ta.UnderlineAnnotation;
+};
+p.apply=function(_5){
+if(!_5){
+return;
+}
+if(_5.documentElement){
+_5=_5.documentElement;
+}
+this.readCommonAttrs(_5);
+for(var i=0;i<_5.childNodes.length;i++){
+var c=_5.childNodes[i];
+if(c.localName=="text"){
+this.property("label",c.childNodes[0].nodeValue);
+var _8=c.getAttribute("style");
+var m=_8.match(/fill:([^;]+);/);
+if(m){
+var _a=this.property("stroke");
+_a.collor=m[1];
+this.property("stroke",_a);
+this.property("fill",_a.collor);
+}
+}
+}
+};
+p.initialize=function(_b){
+this.apply(_b);
+this.shape=this.figure.group.createGroup();
+this.shape.getEventSource().setAttribute("id",this.id);
+this.labelShape=this.shape.createText({x:0,y:0,text:this.property("label"),decoration:"underline",align:"start"});
+this.labelShape.getEventSource().setAttribute("id",this.id+"-labelShape");
+this.lineShape=this.shape.createLine({x1:1,x2:this.labelShape.getTextWidth(),y1:2,y2:2});
+this.lineShape.getEventSource().setAttribute("shape-rendering","crispEdges");
+this.draw();
+};
+p.destroy=function(){
+if(!this.shape){
+return;
+}
+this.shape.remove(this.labelShape);
+this.shape.remove(this.lineShape);
+this.figure.group.remove(this.shape);
+this.shape=this.lineShape=this.labelShape=null;
+};
+p.getBBox=function(){
+var b=this.getTextBox();
+var z=this.figure.zoomFactor;
+return {x:0,y:(b.h*-1+4)/z,width:(b.w+2)/z,height:b.h/z};
+};
+p.draw=function(_e){
+this.apply(_e);
+this.shape.setTransform(this.transform);
+this.labelShape.setShape({x:0,y:0,text:this.property("label")}).setFill(this.property("fill"));
+this.zoom();
+};
+p.zoom=function(_f){
+if(this.labelShape){
+_f=_f||this.figure.zoomFactor;
+var _10=dojox.gfx.renderer=="vml"?0:2/_f;
+ta.Annotation.prototype.zoom.call(this,_f);
+_f=dojox.gfx.renderer=="vml"?1:_f;
+this.lineShape.setShape({x1:0,x2:this.getBBox().width-_10,y1:2,y2:2}).setStroke({color:this.property("fill"),width:1/_f});
+if(this.mode==ta.Annotation.Modes.Edit){
+this.drawBBox();
+}
+}
+};
+p.serialize=function(){
+var s=this.property("stroke");
+return "<g "+this.writeCommonAttrs()+">"+"<text style=\"fill:"+this.property("fill")+";\" font-weight=\"bold\" text-decoration=\"underline\" "+"x=\"0\" y=\"0\">"+this.property("label")+"</text>"+"</g>";
+};
+ta.Annotation.register("Underline");
+})();
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/UnderlineAnnotation.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/UndoStack.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/UndoStack.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/UndoStack.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/UndoStack.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,71 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch.UndoStack"]){
+dojo._hasResource["dojox.sketch.UndoStack"]=true;
+dojo.provide("dojox.sketch.UndoStack");
+dojo.require("dojox.xml.DomParser");
+(function(){
+var ta=dojox.sketch;
+ta.CommandTypes={Create:"Create",Move:"Move",Modify:"Modify",Delete:"Delete",Convert:"Convert"};
+dojo.declare("dojox.sketch.UndoStack",null,{constructor:function(_2){
+this.figure=_2;
+this._steps=[];
+this._undoedSteps=[];
+},apply:function(_3,_4,to){
+if(!_4&&!to&&_3.fullText){
+this.figure.setValue(_3.fullText);
+return;
+}
+var _6=_4.shapeText;
+var _7=to.shapeText;
+if(_6.length==0&&_7.length==0){
+return;
+}
+if(_6.length==0){
+var o=dojox.xml.DomParser.parse(_7).documentElement;
+var a=this.figure._loadAnnotation(o);
+if(a){
+this.figure._add(a);
+}
+return;
+}
+if(_7.length==0){
+var _a=this.figure.get(_4.shapeId);
+this.figure._delete([_a],true);
+return;
+}
+var _b=this.figure.get(to.shapeId);
+var no=dojox.xml.DomParser.parse(_7).documentElement;
+_b.draw(no);
+this.figure.select(_b);
+return;
+},add:function(_d,_e,_f){
+var id=_e?_e.id:"";
+var _11=_e?_e.serialize():"";
+if(_d==ta.CommandTypes.Delete){
+_11="";
+}
+var _12={cmdname:_d,before:{shapeId:id,shapeText:_f||""},after:{shapeId:id,shapeText:_11}};
+this._steps.push(_12);
+this._undoedSteps=[];
+},destroy:function(){
+},undo:function(){
+var _13=this._steps.pop();
+if(_13){
+this._undoedSteps.push(_13);
+this.apply(_13,_13.after,_13.before);
+}
+},redo:function(){
+var _14=this._undoedSteps.pop();
+if(_14){
+this._steps.push(_14);
+this.apply(_14,_14.before,_14.after);
+}
+}});
+})();
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/UndoStack.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/_Plugin.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/_Plugin.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/_Plugin.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/_Plugin.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,51 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sketch._Plugin"]){
+dojo._hasResource["dojox.sketch._Plugin"]=true;
+dojo.provide("dojox.sketch._Plugin");
+dojo.require("dijit.form.Button");
+dojo.declare("dojox.sketch._Plugin",null,{constructor:function(_1){
+if(_1){
+dojo.mixin(this,_1);
+}
+this._connects=[];
+},figure:null,iconClassPrefix:"dojoxSketchIcon",itemGroup:"toolsGroup",button:null,queryCommand:null,shape:"",useDefaultCommand:true,buttonClass:dijit.form.ToggleButton,_initButton:function(){
+if(this.shape.length){
+var _2=this.iconClassPrefix+" "+this.iconClassPrefix+this.shape.charAt(0).toUpperCase()+this.shape.substr(1);
+if(!this.button){
+var _3={label:this.shape,showLabel:false,iconClass:_2,dropDown:this.dropDown,tabIndex:"-1"};
+this.button=new this.buttonClass(_3);
+this.connect(this.button,"onClick","activate");
+}
+}
+},attr:function(_4,_5){
+return this.button.attr(_4,_5);
+},onActivate:function(){
+},activate:function(e){
+this.onActivate();
+this.figure.setTool(this);
+this.attr("checked",true);
+},onMouseDown:function(e){
+},onMouseMove:function(e){
+},onMouseUp:function(e){
+},destroy:function(f){
+dojo.forEach(this._connects,dojo.disconnect);
+},connect:function(o,f,tf){
+this._connects.push(dojo.connect(o,f,this,tf));
+},setFigure:function(_e){
+this.figure=_e;
+this._initButton();
+},setToolbar:function(_f){
+if(this.button){
+_f.addChild(this.button);
+}
+if(this.itemGroup){
+_f.addGroupItem(this,this.itemGroup);
+}
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/_Plugin.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/resources/images/icons.gif
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/resources/images/icons.gif?rev=755920&view=auto
==============================================================================
Binary file - no diff available.

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/resources/images/icons.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/resources/sketch.css
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/resources/sketch.css?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/resources/sketch.css (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/resources/sketch.css Thu Mar 19 11:10:58 2009
@@ -0,0 +1,17 @@
+.dojoxSketchIcon{
+	background-repeat:no-repeat;
+	height:16px;
+	min-width:16px;
+	text-align:center;
+	width:16px;
+}
+.dojoxSketchIcon { background-image:url(images/icons.gif); }
+.ShowCallouts{ background-position:0px 0px; }
+.PreviousCallout{ background-position:0px -16px; }
+.NextCallout{ background-position:0px -32px; }
+.dojoxSketchIconLead{ background-position:0px -48px; }
+.dojoxSketchIconUnderline{ background-position:0px -64px; }
+.dojoxSketchIconSingleArrow{ background-position:0px -80px; }
+.dojoxSketchIconBrace{ background-position:0px -96px; }
+.dojoxSketchIconDoubleArrow{ background-position:0px -112px; }
+.dojoxSketchIconPreexisting{ background-position:0px -128px; }

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sketch/resources/sketch.css
------------------------------------------------------------------------------
    svn:mime-type = text/css

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/LICENSE
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/LICENSE?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/LICENSE (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/LICENSE Thu Mar 19 11:10:58 2009
@@ -0,0 +1,9 @@
+License Disclaimer:
+
+All contents of this directory are Copyright (c) the Dojo Foundation, with the
+following exceptions:
+-------------------------------------------------------------------------------
+
+_crypto.js - internally uses AES algorithm	
+	* AES algorithm copyright Chris Veness (CLA signed and permission given to use code under BSD license)
+      Taken from http://www.movable-type.co.uk/scripts/aes.html

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/README
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/README?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/README (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/README Thu Mar 19 11:10:58 2009
@@ -0,0 +1,32 @@
+-------------------------------------------------------------------------------
+dojox.sql
+-------------------------------------------------------------------------------
+Version X.XXX
+Release date: MM/DD/YYYY
+-------------------------------------------------------------------------------
+Project state:
+experimental
+-------------------------------------------------------------------------------
+Credits
+	Brad Neuberg
+-------------------------------------------------------------------------------
+Project description
+
+Code to interface with the Google Gears-specific SQL engine, used
+by dojox.storage and dojox.off. 
+-------------------------------------------------------------------------------
+Dependencies:
+
+Google Gears (gears.google.com)
+-------------------------------------------------------------------------------
+Documentation
+
+TBD
+-------------------------------------------------------------------------------
+Installation instructions
+
+TBD
+-------------------------------------------------------------------------------
+Additional Notes
+
+We should consider relocating crypto code to dojox.encoding

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/README
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/_base.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/_base.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/_base.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/_base.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,333 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sql._base"]){
+dojo._hasResource["dojox.sql._base"]=true;
+dojo.provide("dojox.sql._base");
+dojo.require("dojox.sql._crypto");
+dojo.mixin(dojox.sql,{dbName:null,debug:(dojo.exists("dojox.sql.debug")?dojox.sql.debug:false),open:function(_1){
+if(this._dbOpen&&(!_1||_1==this.dbName)){
+return;
+}
+if(!this.dbName){
+this.dbName="dot_store_"+window.location.href.replace(/[^0-9A-Za-z_]/g,"_");
+if(this.dbName.length>63){
+this.dbName=this.dbName.substring(0,63);
+}
+}
+if(!_1){
+_1=this.dbName;
+}
+try{
+this._initDb();
+this.db.open(_1);
+this._dbOpen=true;
+}
+catch(exp){
+throw exp.message||exp;
+}
+},close:function(_2){
+if(dojo.isIE){
+return;
+}
+if(!this._dbOpen&&(!_2||_2==this.dbName)){
+return;
+}
+if(!_2){
+_2=this.dbName;
+}
+try{
+this.db.close(_2);
+this._dbOpen=false;
+}
+catch(exp){
+throw exp.message||exp;
+}
+},_exec:function(_3){
+try{
+this._initDb();
+if(!this._dbOpen){
+this.open();
+this._autoClose=true;
+}
+var _4=null;
+var _5=null;
+var _6=null;
+var _7=dojo._toArray(_3);
+_4=_7.splice(0,1)[0];
+if(this._needsEncrypt(_4)||this._needsDecrypt(_4)){
+_5=_7.splice(_7.length-1,1)[0];
+_6=_7.splice(_7.length-1,1)[0];
+}
+if(this.debug){
+this._printDebugSQL(_4,_7);
+}
+var _8;
+if(this._needsEncrypt(_4)){
+_8=new dojox.sql._SQLCrypto("encrypt",_4,_6,_7,_5);
+return null;
+}else{
+if(this._needsDecrypt(_4)){
+_8=new dojox.sql._SQLCrypto("decrypt",_4,_6,_7,_5);
+return null;
+}
+}
+var rs=this.db.execute(_4,_7);
+rs=this._normalizeResults(rs);
+if(this._autoClose){
+this.close();
+}
+return rs;
+}
+catch(exp){
+exp=exp.message||exp;
+
+if(this._autoClose){
+try{
+this.close();
+}
+catch(e){
+
+}
+}
+throw exp;
+}
+return null;
+},_initDb:function(){
+if(!this.db){
+try{
+this.db=google.gears.factory.create("beta.database","1.0");
+}
+catch(exp){
+dojo.setObject("google.gears.denied",true);
+if(dojox.off){
+dojox.off.onFrameworkEvent("coreOperationFailed");
+}
+throw "Google Gears must be allowed to run";
+}
+}
+},_printDebugSQL:function(_a,_b){
+var _c="dojox.sql(\""+_a+"\"";
+for(var i=0;i<_b.length;i++){
+if(typeof _b[i]=="string"){
+_c+=", \""+_b[i]+"\"";
+}else{
+_c+=", "+_b[i];
+}
+}
+_c+=")";
+
+},_normalizeResults:function(rs){
+var _f=[];
+if(!rs){
+return [];
+}
+while(rs.isValidRow()){
+var row={};
+for(var i=0;i<rs.fieldCount();i++){
+var _12=rs.fieldName(i);
+var _13=rs.field(i);
+row[_12]=_13;
+}
+_f.push(row);
+rs.next();
+}
+rs.close();
+return _f;
+},_needsEncrypt:function(sql){
+return /encrypt\([^\)]*\)/i.test(sql);
+},_needsDecrypt:function(sql){
+return /decrypt\([^\)]*\)/i.test(sql);
+}});
+dojo.declare("dojox.sql._SQLCrypto",null,{constructor:function(_16,sql,_18,_19,_1a){
+if(_16=="encrypt"){
+this._execEncryptSQL(sql,_18,_19,_1a);
+}else{
+this._execDecryptSQL(sql,_18,_19,_1a);
+}
+},_execEncryptSQL:function(sql,_1c,_1d,_1e){
+var _1f=this._stripCryptoSQL(sql);
+var _20=this._flagEncryptedArgs(sql,_1d);
+var _21=this;
+this._encrypt(_1f,_1c,_1d,_20,function(_22){
+var _23=false;
+var _24=[];
+var exp=null;
+try{
+_24=dojox.sql.db.execute(_1f,_22);
+}
+catch(execError){
+_23=true;
+exp=execError.message||execError;
+}
+if(exp!=null){
+if(dojox.sql._autoClose){
+try{
+dojox.sql.close();
+}
+catch(e){
+}
+}
+_1e(null,true,exp.toString());
+return;
+}
+_24=dojox.sql._normalizeResults(_24);
+if(dojox.sql._autoClose){
+dojox.sql.close();
+}
+if(dojox.sql._needsDecrypt(sql)){
+var _26=_21._determineDecryptedColumns(sql);
+_21._decrypt(_24,_26,_1c,function(_27){
+_1e(_27,false,null);
+});
+}else{
+_1e(_24,false,null);
+}
+});
+},_execDecryptSQL:function(sql,_29,_2a,_2b){
+var _2c=this._stripCryptoSQL(sql);
+var _2d=this._determineDecryptedColumns(sql);
+var _2e=false;
+var _2f=[];
+var exp=null;
+try{
+_2f=dojox.sql.db.execute(_2c,_2a);
+}
+catch(execError){
+_2e=true;
+exp=execError.message||execError;
+}
+if(exp!=null){
+if(dojox.sql._autoClose){
+try{
+dojox.sql.close();
+}
+catch(e){
+}
+}
+_2b(_2f,true,exp.toString());
+return;
+}
+_2f=dojox.sql._normalizeResults(_2f);
+if(dojox.sql._autoClose){
+dojox.sql.close();
+}
+this._decrypt(_2f,_2d,_29,function(_31){
+_2b(_31,false,null);
+});
+},_encrypt:function(sql,_33,_34,_35,_36){
+this._totalCrypto=0;
+this._finishedCrypto=0;
+this._finishedSpawningCrypto=false;
+this._finalArgs=_34;
+for(var i=0;i<_34.length;i++){
+if(_35[i]){
+var _38=_34[i];
+var _39=i;
+this._totalCrypto++;
+dojox.sql._crypto.encrypt(_38,_33,dojo.hitch(this,function(_3a){
+this._finalArgs[_39]=_3a;
+this._finishedCrypto++;
+if(this._finishedCrypto>=this._totalCrypto&&this._finishedSpawningCrypto){
+_36(this._finalArgs);
+}
+}));
+}
+}
+this._finishedSpawningCrypto=true;
+},_decrypt:function(_3b,_3c,_3d,_3e){
+this._totalCrypto=0;
+this._finishedCrypto=0;
+this._finishedSpawningCrypto=false;
+this._finalResultSet=_3b;
+for(var i=0;i<_3b.length;i++){
+var row=_3b[i];
+for(var _41 in row){
+if(_3c=="*"||_3c[_41]){
+this._totalCrypto++;
+var _42=row[_41];
+this._decryptSingleColumn(_41,_42,_3d,i,function(_43){
+_3e(_43);
+});
+}
+}
+}
+this._finishedSpawningCrypto=true;
+},_stripCryptoSQL:function(sql){
+sql=sql.replace(/DECRYPT\(\*\)/ig,"*");
+var _45=sql.match(/ENCRYPT\([^\)]*\)/ig);
+if(_45!=null){
+for(var i=0;i<_45.length;i++){
+var _47=_45[i];
+var _48=_47.match(/ENCRYPT\(([^\)]*)\)/i)[1];
+sql=sql.replace(_47,_48);
+}
+}
+_45=sql.match(/DECRYPT\([^\)]*\)/ig);
+if(_45!=null){
+for(i=0;i<_45.length;i++){
+var _49=_45[i];
+var _4a=_49.match(/DECRYPT\(([^\)]*)\)/i)[1];
+sql=sql.replace(_49,_4a);
+}
+}
+return sql;
+},_flagEncryptedArgs:function(sql,_4c){
+var _4d=new RegExp(/([\"][^\"]*\?[^\"]*[\"])|([\'][^\']*\?[^\']*[\'])|(\?)/ig);
+var _4e;
+var _4f=0;
+var _50=[];
+while((_4e=_4d.exec(sql))!=null){
+var _51=RegExp.lastMatch+"";
+if(/^[\"\']/.test(_51)){
+continue;
+}
+var _52=false;
+if(/ENCRYPT\([^\)]*$/i.test(RegExp.leftContext)){
+_52=true;
+}
+_50[_4f]=_52;
+_4f++;
+}
+return _50;
+},_determineDecryptedColumns:function(sql){
+var _54={};
+if(/DECRYPT\(\*\)/i.test(sql)){
+_54="*";
+}else{
+var _55=/DECRYPT\((?:\s*\w*\s*\,?)*\)/ig;
+var _56=_55.exec(sql);
+while(_56){
+var _57=new String(RegExp.lastMatch);
+var _58=_57.replace(/DECRYPT\(/i,"");
+_58=_58.replace(/\)/,"");
+_58=_58.split(/\s*,\s*/);
+dojo.forEach(_58,function(_59){
+if(/\s*\w* AS (\w*)/i.test(_59)){
+_59=_59.match(/\s*\w* AS (\w*)/i)[1];
+}
+_54[_59]=true;
+});
+_56=_55.exec(sql);
+}
+}
+return _54;
+},_decryptSingleColumn:function(_5a,_5b,_5c,_5d,_5e){
+dojox.sql._crypto.decrypt(_5b,_5c,dojo.hitch(this,function(_5f){
+this._finalResultSet[_5d][_5a]=_5f;
+this._finishedCrypto++;
+if(this._finishedCrypto>=this._totalCrypto&&this._finishedSpawningCrypto){
+_5e(this._finalResultSet);
+}
+}));
+}});
+(function(){
+var _60=dojox.sql;
+dojox.sql=new Function("return dojox.sql._exec(arguments);");
+dojo.mixin(dojox.sql,_60);
+})();
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/_base.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/_crypto.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/_crypto.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/_crypto.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/_crypto.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,293 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.sql._crypto"]){
+dojo._hasResource["dojox.sql._crypto"]=true;
+dojo.provide("dojox.sql._crypto");
+dojo.mixin(dojox.sql._crypto,{_POOL_SIZE:100,encrypt:function(_1,_2,_3){
+this._initWorkerPool();
+var _4={plaintext:_1,password:_2};
+_4=dojo.toJson(_4);
+_4="encr:"+String(_4);
+this._assignWork(_4,_3);
+},decrypt:function(_5,_6,_7){
+this._initWorkerPool();
+var _8={ciphertext:_5,password:_6};
+_8=dojo.toJson(_8);
+_8="decr:"+String(_8);
+this._assignWork(_8,_7);
+},_initWorkerPool:function(){
+if(!this._manager){
+try{
+this._manager=google.gears.factory.create("beta.workerpool","1.0");
+this._unemployed=[];
+this._employed={};
+this._handleMessage=[];
+var _9=this;
+this._manager.onmessage=function(_a,_b){
+var _c=_9._employed["_"+_b];
+_9._employed["_"+_b]=undefined;
+_9._unemployed.push("_"+_b);
+if(_9._handleMessage.length){
+var _d=_9._handleMessage.shift();
+_9._assignWork(_d.msg,_d.callback);
+}
+_c(_a);
+};
+var _e="function _workerInit(){"+"gearsWorkerPool.onmessage = "+String(this._workerHandler)+";"+"}";
+var _f=_e+" _workerInit();";
+for(var i=0;i<this._POOL_SIZE;i++){
+this._unemployed.push("_"+this._manager.createWorker(_f));
+}
+}
+catch(exp){
+throw exp.message||exp;
+}
+}
+},_assignWork:function(msg,_12){
+if(!this._handleMessage.length&&this._unemployed.length){
+var _13=this._unemployed.shift().substring(1);
+this._employed["_"+_13]=_12;
+this._manager.sendMessage(msg,parseInt(_13,10));
+}else{
+this._handleMessage={msg:msg,callback:_12};
+}
+},_workerHandler:function(msg,_15){
+var _16=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22];
+var _17=[[0,0,0,0],[1,0,0,0],[2,0,0,0],[4,0,0,0],[8,0,0,0],[16,0,0,0],[32,0,0,0],[64,0,0,0],[128,0,0,0],[27,0,0,0],[54,0,0,0]];
+function _18(_19,w){
+var Nb=4;
+var Nr=w.length/Nb-1;
+var _1d=[[],[],[],[]];
+for(var i=0;i<4*Nb;i++){
+_1d[i%4][Math.floor(i/4)]=_19[i];
+}
+_1d=_1f(_1d,w,0,Nb);
+for(var _20=1;_20<Nr;_20++){
+_1d=_21(_1d,Nb);
+_1d=_22(_1d,Nb);
+_1d=_23(_1d,Nb);
+_1d=_1f(_1d,w,_20,Nb);
+}
+_1d=_21(_1d,Nb);
+_1d=_22(_1d,Nb);
+_1d=_1f(_1d,w,Nr,Nb);
+var _24=new Array(4*Nb);
+for(var i=0;i<4*Nb;i++){
+_24[i]=_1d[i%4][Math.floor(i/4)];
+}
+return _24;
+};
+function _21(s,Nb){
+for(var r=0;r<4;r++){
+for(var c=0;c<Nb;c++){
+s[r][c]=_16[s[r][c]];
+}
+}
+return s;
+};
+function _22(s,Nb){
+var t=new Array(4);
+for(var r=1;r<4;r++){
+for(var c=0;c<4;c++){
+t[c]=s[r][(c+r)%Nb];
+}
+for(var c=0;c<4;c++){
+s[r][c]=t[c];
+}
+}
+return s;
+};
+function _23(s,Nb){
+for(var c=0;c<4;c++){
+var a=new Array(4);
+var b=new Array(4);
+for(var i=0;i<4;i++){
+a[i]=s[i][c];
+b[i]=s[i][c]&128?s[i][c]<<1^283:s[i][c]<<1;
+}
+s[0][c]=b[0]^a[1]^b[1]^a[2]^a[3];
+s[1][c]=a[0]^b[1]^a[2]^b[2]^a[3];
+s[2][c]=a[0]^a[1]^b[2]^a[3]^b[3];
+s[3][c]=a[0]^b[0]^a[1]^a[2]^b[3];
+}
+return s;
+};
+function _1f(_34,w,rnd,Nb){
+for(var r=0;r<4;r++){
+for(var c=0;c<Nb;c++){
+_34[r][c]^=w[rnd*4+c][r];
+}
+}
+return _34;
+};
+function _3a(key){
+var Nb=4;
+var Nk=key.length/4;
+var Nr=Nk+6;
+var w=new Array(Nb*(Nr+1));
+var _40=new Array(4);
+for(var i=0;i<Nk;i++){
+var r=[key[4*i],key[4*i+1],key[4*i+2],key[4*i+3]];
+w[i]=r;
+}
+for(var i=Nk;i<(Nb*(Nr+1));i++){
+w[i]=new Array(4);
+for(var t=0;t<4;t++){
+_40[t]=w[i-1][t];
+}
+if(i%Nk==0){
+_40=_44(_45(_40));
+for(var t=0;t<4;t++){
+_40[t]^=_17[i/Nk][t];
+}
+}else{
+if(Nk>6&&i%Nk==4){
+_40=_44(_40);
+}
+}
+for(var t=0;t<4;t++){
+w[i][t]=w[i-Nk][t]^_40[t];
+}
+}
+return w;
+};
+function _44(w){
+for(var i=0;i<4;i++){
+w[i]=_16[w[i]];
+}
+return w;
+};
+function _45(w){
+w[4]=w[0];
+for(var i=0;i<4;i++){
+w[i]=w[i+1];
+}
+return w;
+};
+function _4a(_4b,_4c,_4d){
+if(!(_4d==128||_4d==192||_4d==256)){
+return "";
+}
+var _4e=_4d/8;
+var _4f=new Array(_4e);
+for(var i=0;i<_4e;i++){
+_4f[i]=_4c.charCodeAt(i)&255;
+}
+var key=_18(_4f,_3a(_4f));
+key=key.concat(key.slice(0,_4e-16));
+var _52=16;
+var _53=new Array(_52);
+var _54=(new Date()).getTime();
+for(var i=0;i<4;i++){
+_53[i]=(_54>>>i*8)&255;
+}
+for(var i=0;i<4;i++){
+_53[i+4]=(_54/4294967296>>>i*8)&255;
+}
+var _55=_3a(key);
+var _56=Math.ceil(_4b.length/_52);
+var _57=new Array(_56);
+for(var b=0;b<_56;b++){
+for(var c=0;c<4;c++){
+_53[15-c]=(b>>>c*8)&255;
+}
+for(var c=0;c<4;c++){
+_53[15-c-4]=(b/4294967296>>>c*8);
+}
+var _5a=_18(_53,_55);
+var _5b=b<_56-1?_52:(_4b.length-1)%_52+1;
+var ct="";
+for(var i=0;i<_5b;i++){
+var _5d=_4b.charCodeAt(b*_52+i);
+var _5e=_5d^_5a[i];
+ct+=String.fromCharCode(_5e);
+}
+_57[b]=_5f(ct);
+}
+var _60="";
+for(var i=0;i<8;i++){
+_60+=String.fromCharCode(_53[i]);
+}
+_60=_5f(_60);
+return _60+"-"+_57.join("-");
+};
+function _61(_62,_63,_64){
+if(!(_64==128||_64==192||_64==256)){
+return "";
+}
+var _65=_64/8;
+var _66=new Array(_65);
+for(var i=0;i<_65;i++){
+_66[i]=_63.charCodeAt(i)&255;
+}
+var _68=_3a(_66);
+var key=_18(_66,_68);
+key=key.concat(key.slice(0,_65-16));
+var _6a=_3a(key);
+_62=_62.split("-");
+var _6b=16;
+var _6c=new Array(_6b);
+var _6d=_6e(_62[0]);
+for(var i=0;i<8;i++){
+_6c[i]=_6d.charCodeAt(i);
+}
+var _6f=new Array(_62.length-1);
+for(var b=1;b<_62.length;b++){
+for(var c=0;c<4;c++){
+_6c[15-c]=((b-1)>>>c*8)&255;
+}
+for(var c=0;c<4;c++){
+_6c[15-c-4]=((b/4294967296-1)>>>c*8)&255;
+}
+var _72=_18(_6c,_6a);
+_62[b]=_6e(_62[b]);
+var pt="";
+for(var i=0;i<_62[b].length;i++){
+var _74=_62[b].charCodeAt(i);
+var _75=_74^_72[i];
+pt+=String.fromCharCode(_75);
+}
+_6f[b-1]=pt;
+}
+return _6f.join("");
+};
+function _5f(str){
+return str.replace(/[\0\t\n\v\f\r\xa0!-]/g,function(c){
+return "!"+c.charCodeAt(0)+"!";
+});
+};
+function _6e(str){
+return str.replace(/!\d\d?\d?!/g,function(c){
+return String.fromCharCode(c.slice(1,-1));
+});
+};
+function _7a(_7b,_7c){
+return _4a(_7b,_7c,256);
+};
+function _7d(_7e,_7f){
+return _61(_7e,_7f,256);
+};
+var cmd=msg.substr(0,4);
+var arg=msg.substr(5);
+if(cmd=="encr"){
+arg=eval("("+arg+")");
+var _82=arg.plaintext;
+var _83=arg.password;
+var _84=_7a(_82,_83);
+gearsWorkerPool.sendMessage(String(_84),_15);
+}else{
+if(cmd=="decr"){
+arg=eval("("+arg+")");
+var _85=arg.ciphertext;
+var _83=arg.password;
+var _84=_7d(_85,_83);
+gearsWorkerPool.sendMessage(String(_84),_15);
+}
+}
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/sql/_crypto.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirDBStorageProvider.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirDBStorageProvider.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirDBStorageProvider.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirDBStorageProvider.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,180 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.storage.AirDBStorageProvider"]){
+dojo._hasResource["dojox.storage.AirDBStorageProvider"]=true;
+dojo.provide("dojox.storage.AirDBStorageProvider");
+dojo.require("dojox.storage.manager");
+dojo.require("dojox.storage.Provider");
+if(dojo.isAIR){
+(function(){
+if(!_1){
+var _1={};
+}
+_1.File=window.runtime.flash.filesystem.File;
+_1.SQLConnection=window.runtime.flash.data.SQLConnection;
+_1.SQLStatement=window.runtime.flash.data.SQLStatement;
+dojo.declare("dojox.storage.AirDBStorageProvider",[dojox.storage.Provider],{DATABASE_FILE:"dojo.db",TABLE_NAME:"__DOJO_STORAGE",initialized:false,_db:null,initialize:function(){
+this.initialized=false;
+try{
+this._db=new _1.SQLConnection();
+this._db.open(_1.File.applicationStorageDirectory.resolvePath(this.DATABASE_FILE));
+this._sql("CREATE TABLE IF NOT EXISTS "+this.TABLE_NAME+"(namespace TEXT, key TEXT, value TEXT)");
+this._sql("CREATE UNIQUE INDEX IF NOT EXISTS namespace_key_index ON "+this.TABLE_NAME+" (namespace, key)");
+this.initialized=true;
+}
+catch(e){
+
+}
+dojox.storage.manager.loaded();
+},_sql:function(_2,_3){
+var _4=new _1.SQLStatement();
+_4.sqlConnection=this._db;
+_4.text=_2;
+if(_3){
+for(var _5 in _3){
+_4.parameters[_5]=_3[_5];
+}
+}
+_4.execute();
+return _4.getResult();
+},_beginTransaction:function(){
+this._db.begin();
+},_commitTransaction:function(){
+this._db.commit();
+},isAvailable:function(){
+return true;
+},put:function(_6,_7,_8,_9){
+if(this.isValidKey(_6)==false){
+throw new Error("Invalid key given: "+_6);
+}
+_9=_9||this.DEFAULT_NAMESPACE;
+if(this.isValidKey(_9)==false){
+throw new Error("Invalid namespace given: "+_9);
+}
+try{
+this._sql("DELETE FROM "+this.TABLE_NAME+" WHERE namespace = :namespace AND key = :key",{":namespace":_9,":key":_6});
+this._sql("INSERT INTO "+this.TABLE_NAME+" VALUES (:namespace, :key, :value)",{":namespace":_9,":key":_6,":value":_7});
+}
+catch(e){
+
+_8(this.FAILED,_6,e.toString());
+return;
+}
+if(_8){
+_8(this.SUCCESS,_6,null,_9);
+}
+},get:function(_a,_b){
+if(this.isValidKey(_a)==false){
+throw new Error("Invalid key given: "+_a);
+}
+_b=_b||this.DEFAULT_NAMESPACE;
+var _c=this._sql("SELECT * FROM "+this.TABLE_NAME+" WHERE namespace = :namespace AND key = :key",{":namespace":_b,":key":_a});
+if(_c.data&&_c.data.length){
+return _c.data[0].value;
+}
+return null;
+},getNamespaces:function(){
+var _d=[this.DEFAULT_NAMESPACE];
+var rs=this._sql("SELECT namespace FROM "+this.TABLE_NAME+" DESC GROUP BY namespace");
+if(rs.data){
+for(var i=0;i<rs.data.length;i++){
+if(rs.data[i].namespace!=this.DEFAULT_NAMESPACE){
+_d.push(rs.data[i].namespace);
+}
+}
+}
+return _d;
+},getKeys:function(_10){
+_10=_10||this.DEFAULT_NAMESPACE;
+if(this.isValidKey(_10)==false){
+throw new Error("Invalid namespace given: "+_10);
+}
+var _11=[];
+var rs=this._sql("SELECT key FROM "+this.TABLE_NAME+" WHERE namespace = :namespace",{":namespace":_10});
+if(rs.data){
+for(var i=0;i<rs.data.length;i++){
+_11.push(rs.data[i].key);
+}
+}
+return _11;
+},clear:function(_14){
+if(this.isValidKey(_14)==false){
+throw new Error("Invalid namespace given: "+_14);
+}
+this._sql("DELETE FROM "+this.TABLE_NAME+" WHERE namespace = :namespace",{":namespace":_14});
+},remove:function(key,_16){
+_16=_16||this.DEFAULT_NAMESPACE;
+this._sql("DELETE FROM "+this.TABLE_NAME+" WHERE namespace = :namespace AND key = :key",{":namespace":_16,":key":key});
+},putMultiple:function(_17,_18,_19,_1a){
+if(this.isValidKeyArray(_17)===false||!_18 instanceof Array||_17.length!=_18.length){
+throw new Error("Invalid arguments: keys = ["+_17+"], values = ["+_18+"]");
+}
+if(_1a==null||typeof _1a=="undefined"){
+_1a=this.DEFAULT_NAMESPACE;
+}
+if(this.isValidKey(_1a)==false){
+throw new Error("Invalid namespace given: "+_1a);
+}
+this._statusHandler=_19;
+try{
+this._beginTransaction();
+for(var i=0;i<_17.length;i++){
+this._sql("DELETE FROM "+this.TABLE_NAME+" WHERE namespace = :namespace AND key = :key",{":namespace":_1a,":key":_17[i]});
+this._sql("INSERT INTO "+this.TABLE_NAME+" VALUES (:namespace, :key, :value)",{":namespace":_1a,":key":_17[i],":value":_18[i]});
+}
+this._commitTransaction();
+}
+catch(e){
+
+if(_19){
+_19(this.FAILED,_17,e.toString(),_1a);
+}
+return;
+}
+if(_19){
+_19(this.SUCCESS,_17,null);
+}
+},getMultiple:function(_1c,_1d){
+if(this.isValidKeyArray(_1c)===false){
+throw new Error("Invalid key array given: "+_1c);
+}
+if(_1d==null||typeof _1d=="undefined"){
+_1d=this.DEFAULT_NAMESPACE;
+}
+if(this.isValidKey(_1d)==false){
+throw new Error("Invalid namespace given: "+_1d);
+}
+var _1e=[];
+for(var i=0;i<_1c.length;i++){
+var _20=this._sql("SELECT * FROM "+this.TABLE_NAME+" WHERE namespace = :namespace AND key = :key",{":namespace":_1d,":key":_1c[i]});
+_1e[i]=_20.data&&_20.data.length?_20.data[0].value:null;
+}
+return _1e;
+},removeMultiple:function(_21,_22){
+_22=_22||this.DEFAULT_NAMESPACE;
+this._beginTransaction();
+for(var i=0;i<_21.length;i++){
+this._sql("DELETE FROM "+this.TABLE_NAME+" WHERE namespace = namespace = :namespace AND key = :key",{":namespace":_22,":key":_21[i]});
+}
+this._commitTransaction();
+},isPermanent:function(){
+return true;
+},getMaximumSize:function(){
+return this.SIZE_NO_LIMIT;
+},hasSettingsUI:function(){
+return false;
+},showSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+},hideSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+}});
+dojox.storage.manager.register("dojox.storage.AirDBStorageProvider",new dojox.storage.AirDBStorageProvider());
+dojox.storage.manager.initialize();
+})();
+}
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirDBStorageProvider.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirEncryptedLocalStorageProvider.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirEncryptedLocalStorageProvider.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirEncryptedLocalStorageProvider.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirEncryptedLocalStorageProvider.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,170 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.storage.AirEncryptedLocalStorageProvider"]){
+dojo._hasResource["dojox.storage.AirEncryptedLocalStorageProvider"]=true;
+dojo.provide("dojox.storage.AirEncryptedLocalStorageProvider");
+dojo.require("dojox.storage.manager");
+dojo.require("dojox.storage.Provider");
+if(dojo.isAIR){
+(function(){
+if(!_1){
+var _1={};
+}
+_1.ByteArray=window.runtime.flash.utils.ByteArray;
+_1.EncryptedLocalStore=window.runtime.flash.data.EncryptedLocalStore,dojo.declare("dojox.storage.AirEncryptedLocalStorageProvider",[dojox.storage.Provider],{initialize:function(){
+dojox.storage.manager.loaded();
+},isAvailable:function(){
+return true;
+},_getItem:function(_2){
+var _3=_1.EncryptedLocalStore.getItem("__dojo_"+_2);
+return _3?_3.readUTFBytes(_3.length):"";
+},_setItem:function(_4,_5){
+var _6=new _1.ByteArray();
+_6.writeUTFBytes(_5);
+_1.EncryptedLocalStore.setItem("__dojo_"+_4,_6);
+},_removeItem:function(_7){
+_1.EncryptedLocalStore.removeItem("__dojo_"+_7);
+},put:function(_8,_9,_a,_b){
+if(this.isValidKey(_8)==false){
+throw new Error("Invalid key given: "+_8);
+}
+_b=_b||this.DEFAULT_NAMESPACE;
+if(this.isValidKey(_b)==false){
+throw new Error("Invalid namespace given: "+_b);
+}
+try{
+var _c=this._getItem("namespaces")||"|";
+if(_c.indexOf("|"+_b+"|")==-1){
+this._setItem("namespaces",_c+_b+"|");
+}
+var _d=this._getItem(_b+"_keys")||"|";
+if(_d.indexOf("|"+_8+"|")==-1){
+this._setItem(_b+"_keys",_d+_8+"|");
+}
+this._setItem("_"+_b+"_"+_8,_9);
+}
+catch(e){
+
+_a(this.FAILED,_8,e.toString(),_b);
+return;
+}
+if(_a){
+_a(this.SUCCESS,_8,null,_b);
+}
+},get:function(_e,_f){
+if(this.isValidKey(_e)==false){
+throw new Error("Invalid key given: "+_e);
+}
+_f=_f||this.DEFAULT_NAMESPACE;
+return this._getItem("_"+_f+"_"+_e);
+},getNamespaces:function(){
+var _10=[this.DEFAULT_NAMESPACE];
+var _11=(this._getItem("namespaces")||"|").split("|");
+for(var i=0;i<_11.length;i++){
+if(_11[i].length&&_11[i]!=this.DEFAULT_NAMESPACE){
+_10.push(_11[i]);
+}
+}
+return _10;
+},getKeys:function(_13){
+_13=_13||this.DEFAULT_NAMESPACE;
+if(this.isValidKey(_13)==false){
+throw new Error("Invalid namespace given: "+_13);
+}
+var _14=[];
+var _15=(this._getItem(_13+"_keys")||"|").split("|");
+for(var i=0;i<_15.length;i++){
+if(_15[i].length){
+_14.push(_15[i]);
+}
+}
+return _14;
+},clear:function(_17){
+if(this.isValidKey(_17)==false){
+throw new Error("Invalid namespace given: "+_17);
+}
+var _18=this._getItem("namespaces")||"|";
+if(_18.indexOf("|"+_17+"|")!=-1){
+this._setItem("namespaces",_18.replace("|"+_17+"|","|"));
+}
+var _19=(this._getItem(_17+"_keys")||"|").split("|");
+for(var i=0;i<_19.length;i++){
+if(_19[i].length){
+this._removeItem(_17+"_"+_19[i]);
+}
+}
+this._removeItem(_17+"_keys");
+},remove:function(key,_1c){
+_1c=_1c||this.DEFAULT_NAMESPACE;
+var _1d=this._getItem(_1c+"_keys")||"|";
+if(_1d.indexOf("|"+key+"|")!=-1){
+this._setItem(_1c+"_keys",_1d.replace("|"+key+"|","|"));
+}
+this._removeItem("_"+_1c+"_"+key);
+},putMultiple:function(_1e,_1f,_20,_21){
+if(this.isValidKeyArray(_1e)===false||!_1f instanceof Array||_1e.length!=_1f.length){
+throw new Error("Invalid arguments: keys = ["+_1e+"], values = ["+_1f+"]");
+}
+if(_21==null||typeof _21=="undefined"){
+_21=this.DEFAULT_NAMESPACE;
+}
+if(this.isValidKey(_21)==false){
+throw new Error("Invalid namespace given: "+_21);
+}
+this._statusHandler=_20;
+try{
+for(var i=0;i<_1e.length;i++){
+this.put(_1e[i],_1f[i],null,_21);
+}
+}
+catch(e){
+
+if(_20){
+_20(this.FAILED,_1e,e.toString(),_21);
+}
+return;
+}
+if(_20){
+_20(this.SUCCESS,_1e,null);
+}
+},getMultiple:function(_23,_24){
+if(this.isValidKeyArray(_23)===false){
+throw new Error("Invalid key array given: "+_23);
+}
+if(_24==null||typeof _24=="undefined"){
+_24=this.DEFAULT_NAMESPACE;
+}
+if(this.isValidKey(_24)==false){
+throw new Error("Invalid namespace given: "+_24);
+}
+var _25=[];
+for(var i=0;i<_23.length;i++){
+_25[i]=this.get(_23[i],_24);
+}
+return _25;
+},removeMultiple:function(_27,_28){
+_28=_28||this.DEFAULT_NAMESPACE;
+for(var i=0;i<_27.length;i++){
+this.remove(_27[i],_28);
+}
+},isPermanent:function(){
+return true;
+},getMaximumSize:function(){
+return this.SIZE_NO_LIMIT;
+},hasSettingsUI:function(){
+return false;
+},showSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+},hideSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+}});
+dojox.storage.manager.register("dojox.storage.AirEncryptedLocalStorageProvider",new dojox.storage.AirEncryptedLocalStorageProvider());
+dojox.storage.manager.initialize();
+})();
+}
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirEncryptedLocalStorageProvider.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirFileStorageProvider.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirFileStorageProvider.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirFileStorageProvider.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirFileStorageProvider.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,177 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.storage.AirFileStorageProvider"]){
+dojo._hasResource["dojox.storage.AirFileStorageProvider"]=true;
+dojo.provide("dojox.storage.AirFileStorageProvider");
+dojo.require("dojox.storage.manager");
+dojo.require("dojox.storage.Provider");
+if(dojo.isAIR){
+(function(){
+if(!_1){
+var _1={};
+}
+_1.File=window.runtime.flash.filesystem.File;
+_1.FileStream=window.runtime.flash.filesystem.FileStream;
+_1.FileMode=window.runtime.flash.filesystem.FileMode;
+dojo.declare("dojox.storage.AirFileStorageProvider",[dojox.storage.Provider],{initialized:false,_storagePath:"__DOJO_STORAGE/",initialize:function(){
+this.initialized=false;
+try{
+var _2=_1.File.applicationStorageDirectory.resolvePath(this._storagePath);
+if(!_2.exists){
+_2.createDirectory();
+}
+this.initialized=true;
+}
+catch(e){
+
+}
+dojox.storage.manager.loaded();
+},isAvailable:function(){
+return true;
+},put:function(_3,_4,_5,_6){
+if(this.isValidKey(_3)==false){
+throw new Error("Invalid key given: "+_3);
+}
+_6=_6||this.DEFAULT_NAMESPACE;
+if(this.isValidKey(_6)==false){
+throw new Error("Invalid namespace given: "+_6);
+}
+try{
+this.remove(_3,_6);
+var _7=_1.File.applicationStorageDirectory.resolvePath(this._storagePath+_6);
+if(!_7.exists){
+_7.createDirectory();
+}
+var _8=_7.resolvePath(_3);
+var _9=new _1.FileStream();
+_9.open(_8,_1.FileMode.WRITE);
+_9.writeObject(_4);
+_9.close();
+}
+catch(e){
+
+_5(this.FAILED,_3,e.toString(),_6);
+return;
+}
+if(_5){
+_5(this.SUCCESS,_3,null,_6);
+}
+},get:function(_a,_b){
+if(this.isValidKey(_a)==false){
+throw new Error("Invalid key given: "+_a);
+}
+_b=_b||this.DEFAULT_NAMESPACE;
+var _c=null;
+var _d=_1.File.applicationStorageDirectory.resolvePath(this._storagePath+_b+"/"+_a);
+if(_d.exists&&!_d.isDirectory){
+var _e=new _1.FileStream();
+_e.open(_d,_1.FileMode.READ);
+_c=_e.readObject();
+_e.close();
+}
+return _c;
+},getNamespaces:function(){
+var _f=[this.DEFAULT_NAMESPACE];
+var dir=_1.File.applicationStorageDirectory.resolvePath(this._storagePath);
+var _11=dir.getDirectoryListing(),i;
+for(i=0;i<_11.length;i++){
+if(_11[i].isDirectory&&_11[i].name!=this.DEFAULT_NAMESPACE){
+_f.push(_11[i].name);
+}
+}
+return _f;
+},getKeys:function(_13){
+_13=_13||this.DEFAULT_NAMESPACE;
+if(this.isValidKey(_13)==false){
+throw new Error("Invalid namespace given: "+_13);
+}
+var _14=[];
+var dir=_1.File.applicationStorageDirectory.resolvePath(this._storagePath+_13);
+if(dir.exists&&dir.isDirectory){
+var _16=dir.getDirectoryListing(),i;
+for(i=0;i<_16.length;i++){
+_14.push(_16[i].name);
+}
+}
+return _14;
+},clear:function(_18){
+if(this.isValidKey(_18)==false){
+throw new Error("Invalid namespace given: "+_18);
+}
+var dir=_1.File.applicationStorageDirectory.resolvePath(this._storagePath+_18);
+if(dir.exists&&dir.isDirectory){
+dir.deleteDirectory(true);
+}
+},remove:function(key,_1b){
+_1b=_1b||this.DEFAULT_NAMESPACE;
+var _1c=_1.File.applicationStorageDirectory.resolvePath(this._storagePath+_1b+"/"+key);
+if(_1c.exists&&!_1c.isDirectory){
+_1c.deleteFile();
+}
+},putMultiple:function(_1d,_1e,_1f,_20){
+if(this.isValidKeyArray(_1d)===false||!_1e instanceof Array||_1d.length!=_1e.length){
+throw new Error("Invalid arguments: keys = ["+_1d+"], values = ["+_1e+"]");
+}
+if(_20==null||typeof _20=="undefined"){
+_20=this.DEFAULT_NAMESPACE;
+}
+if(this.isValidKey(_20)==false){
+throw new Error("Invalid namespace given: "+_20);
+}
+this._statusHandler=_1f;
+try{
+for(var i=0;i<_1d.length;i++){
+this.put(_1d[i],_1e[i],null,_20);
+}
+}
+catch(e){
+
+if(_1f){
+_1f(this.FAILED,_1d,e.toString(),_20);
+}
+return;
+}
+if(_1f){
+_1f(this.SUCCESS,_1d,null,_20);
+}
+},getMultiple:function(_22,_23){
+if(this.isValidKeyArray(_22)===false){
+throw new Error("Invalid key array given: "+_22);
+}
+if(_23==null||typeof _23=="undefined"){
+_23=this.DEFAULT_NAMESPACE;
+}
+if(this.isValidKey(_23)==false){
+throw new Error("Invalid namespace given: "+_23);
+}
+var _24=[];
+for(var i=0;i<_22.length;i++){
+_24[i]=this.get(_22[i],_23);
+}
+return _24;
+},removeMultiple:function(_26,_27){
+_27=_27||this.DEFAULT_NAMESPACE;
+for(var i=0;i<_26.length;i++){
+this.remove(_26[i],_27);
+}
+},isPermanent:function(){
+return true;
+},getMaximumSize:function(){
+return this.SIZE_NO_LIMIT;
+},hasSettingsUI:function(){
+return false;
+},showSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+},hideSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+}});
+dojox.storage.manager.register("dojox.storage.AirFileStorageProvider",new dojox.storage.AirFileStorageProvider());
+dojox.storage.manager.initialize();
+})();
+}
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/AirFileStorageProvider.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/FlashStorageProvider.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/FlashStorageProvider.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/FlashStorageProvider.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/FlashStorageProvider.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,211 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.storage.FlashStorageProvider"]){
+dojo._hasResource["dojox.storage.FlashStorageProvider"]=true;
+dojo.provide("dojox.storage.FlashStorageProvider");
+dojo.require("dojox.flash");
+dojo.require("dojox.storage.manager");
+dojo.require("dojox.storage.Provider");
+dojo.declare("dojox.storage.FlashStorageProvider",dojox.storage.Provider,{initialized:false,_available:null,_statusHandler:null,_flashReady:false,_pageReady:false,initialize:function(){
+if(dojo.config["disableFlashStorage"]==true){
+return;
+}
+dojox.flash.addLoadedListener(dojo.hitch(this,function(){
+this._flashReady=true;
+if(this._flashReady&&this._pageReady){
+this._loaded();
+}
+}));
+var _1=dojo.moduleUrl("dojox","storage/Storage.swf").toString();
+dojox.flash.setSwf(_1,false);
+dojo.connect(dojo,"loaded",this,function(){
+this._pageReady=true;
+if(this._flashReady&&this._pageReady){
+this._loaded();
+}
+});
+},setFlushDelay:function(_2){
+if(_2===null||typeof _2==="undefined"||isNaN(_2)){
+throw new Error("Invalid argunment: "+_2);
+}
+dojox.flash.comm.setFlushDelay(String(_2));
+},getFlushDelay:function(){
+return Number(dojox.flash.comm.getFlushDelay());
+},flush:function(_3){
+if(_3==null||typeof _3=="undefined"){
+_3=dojox.storage.DEFAULT_NAMESPACE;
+}
+dojox.flash.comm.flush(_3);
+},isAvailable:function(){
+return (this._available=!dojo.config["disableFlashStorage"]);
+},put:function(_4,_5,_6,_7){
+if(!this.isValidKey(_4)){
+throw new Error("Invalid key given: "+_4);
+}
+if(!_7){
+_7=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_7)){
+throw new Error("Invalid namespace given: "+_7);
+}
+this._statusHandler=_6;
+if(dojo.isString(_5)){
+_5="string:"+_5;
+}else{
+_5=dojo.toJson(_5);
+}
+dojox.flash.comm.put(_4,_5,_7);
+},putMultiple:function(_8,_9,_a,_b){
+if(!this.isValidKeyArray(_8)||!_9 instanceof Array||_8.length!=_9.length){
+throw new Error("Invalid arguments: keys = ["+_8+"], values = ["+_9+"]");
+}
+if(!_b){
+_b=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_b)){
+throw new Error("Invalid namespace given: "+_b);
+}
+this._statusHandler=_a;
+var _c=_8.join(",");
+var _d=[];
+for(var i=0;i<_9.length;i++){
+if(dojo.isString(_9[i])){
+_9[i]="string:"+_9[i];
+}else{
+_9[i]=dojo.toJson(_9[i]);
+}
+_d[i]=_9[i].length;
+}
+var _f=_9.join("");
+var _10=_d.join(",");
+dojox.flash.comm.putMultiple(_c,_f,_10,_b);
+},get:function(key,_12){
+if(!this.isValidKey(key)){
+throw new Error("Invalid key given: "+key);
+}
+if(!_12){
+_12=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_12)){
+throw new Error("Invalid namespace given: "+_12);
+}
+var _13=dojox.flash.comm.get(key,_12);
+if(_13==""){
+return null;
+}
+return this._destringify(_13);
+},getMultiple:function(_14,_15){
+if(!this.isValidKeyArray(_14)){
+throw new ("Invalid key array given: "+_14);
+}
+if(!_15){
+_15=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_15)){
+throw new Error("Invalid namespace given: "+_15);
+}
+var _16=_14.join(",");
+var _17=dojox.flash.comm.getMultiple(_16,_15);
+var _18=eval("("+_17+")");
+for(var i=0;i<_18.length;i++){
+_18[i]=(_18[i]=="")?null:this._destringify(_18[i]);
+}
+return _18;
+},_destringify:function(_1a){
+if(dojo.isString(_1a)&&(/^string:/.test(_1a))){
+_1a=_1a.substring("string:".length);
+}else{
+_1a=dojo.fromJson(_1a);
+}
+return _1a;
+},getKeys:function(_1b){
+if(!_1b){
+_1b=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_1b)){
+throw new Error("Invalid namespace given: "+_1b);
+}
+var _1c=dojox.flash.comm.getKeys(_1b);
+if(_1c==null||_1c=="null"){
+_1c="";
+}
+_1c=_1c.split(",");
+_1c.sort();
+return _1c;
+},getNamespaces:function(){
+var _1d=dojox.flash.comm.getNamespaces();
+if(_1d==null||_1d=="null"){
+_1d=dojox.storage.DEFAULT_NAMESPACE;
+}
+_1d=_1d.split(",");
+_1d.sort();
+return _1d;
+},clear:function(_1e){
+if(!_1e){
+_1e=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_1e)){
+throw new Error("Invalid namespace given: "+_1e);
+}
+dojox.flash.comm.clear(_1e);
+},remove:function(key,_20){
+if(!_20){
+_20=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_20)){
+throw new Error("Invalid namespace given: "+_20);
+}
+dojox.flash.comm.remove(key,_20);
+},removeMultiple:function(_21,_22){
+if(!this.isValidKeyArray(_21)){
+dojo.raise("Invalid key array given: "+_21);
+}
+if(!_22){
+_22=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_22)){
+throw new Error("Invalid namespace given: "+_22);
+}
+var _23=_21.join(",");
+dojox.flash.comm.removeMultiple(_23,_22);
+},isPermanent:function(){
+return true;
+},getMaximumSize:function(){
+return dojox.storage.SIZE_NO_LIMIT;
+},hasSettingsUI:function(){
+return true;
+},showSettingsUI:function(){
+dojox.flash.comm.showSettings();
+dojox.flash.obj.setVisible(true);
+dojox.flash.obj.center();
+},hideSettingsUI:function(){
+dojox.flash.obj.setVisible(false);
+if(dojo.isFunction(dojox.storage.onHideSettingsUI)){
+dojox.storage.onHideSettingsUI.call(null);
+}
+},getResourceList:function(){
+return [];
+},_loaded:function(){
+this._allNamespaces=this.getNamespaces();
+this.initialized=true;
+dojox.storage.manager.loaded();
+},_onStatus:function(_24,key,_26){
+var ds=dojox.storage;
+var dfo=dojox.flash.obj;
+if(_24==ds.PENDING){
+dfo.center();
+dfo.setVisible(true);
+}else{
+dfo.setVisible(false);
+}
+if(ds._statusHandler){
+ds._statusHandler.call(null,_24,key,null,_26);
+}
+}});
+dojox.storage.manager.register("dojox.storage.FlashStorageProvider",new dojox.storage.FlashStorageProvider());
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/FlashStorageProvider.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/GearsStorageProvider.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/GearsStorageProvider.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/GearsStorageProvider.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/GearsStorageProvider.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,233 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.storage.GearsStorageProvider"]){
+dojo._hasResource["dojox.storage.GearsStorageProvider"]=true;
+dojo.provide("dojox.storage.GearsStorageProvider");
+dojo.require("dojo.gears");
+dojo.require("dojox.storage.Provider");
+dojo.require("dojox.storage.manager");
+dojo.require("dojox.sql");
+if(dojo.gears.available){
+(function(){
+dojo.declare("dojox.storage.GearsStorageProvider",dojox.storage.Provider,{constructor:function(){
+},TABLE_NAME:"__DOJO_STORAGE",initialized:false,_available:null,_storageReady:false,initialize:function(){
+if(dojo.config["disableGearsStorage"]==true){
+return;
+}
+this.TABLE_NAME="__DOJO_STORAGE";
+this.initialized=true;
+dojox.storage.manager.loaded();
+},isAvailable:function(){
+return this._available=dojo.gears.available;
+},put:function(_1,_2,_3,_4){
+this._initStorage();
+if(!this.isValidKey(_1)){
+throw new Error("Invalid key given: "+_1);
+}
+_4=_4||this.DEFAULT_NAMESPACE;
+if(!this.isValidKey(_4)){
+throw new Error("Invalid namespace given: "+_1);
+}
+if(dojo.isString(_2)){
+_2="string:"+_2;
+}else{
+_2=dojo.toJson(_2);
+}
+try{
+dojox.sql("DELETE FROM "+this.TABLE_NAME+" WHERE namespace = ? AND key = ?",_4,_1);
+dojox.sql("INSERT INTO "+this.TABLE_NAME+" VALUES (?, ?, ?)",_4,_1,_2);
+}
+catch(e){
+
+_3(this.FAILED,_1,e.toString(),_4);
+return;
+}
+if(_3){
+_3(dojox.storage.SUCCESS,_1,null,_4);
+}
+},get:function(_5,_6){
+this._initStorage();
+if(!this.isValidKey(_5)){
+throw new Error("Invalid key given: "+_5);
+}
+_6=_6||this.DEFAULT_NAMESPACE;
+if(!this.isValidKey(_6)){
+throw new Error("Invalid namespace given: "+_5);
+}
+var _7=dojox.sql("SELECT * FROM "+this.TABLE_NAME+" WHERE namespace = ? AND "+" key = ?",_6,_5);
+if(!_7.length){
+return null;
+}else{
+_7=_7[0].value;
+}
+if(dojo.isString(_7)&&(/^string:/.test(_7))){
+_7=_7.substring("string:".length);
+}else{
+_7=dojo.fromJson(_7);
+}
+return _7;
+},getNamespaces:function(){
+this._initStorage();
+var _8=[dojox.storage.DEFAULT_NAMESPACE];
+var rs=dojox.sql("SELECT namespace FROM "+this.TABLE_NAME+" DESC GROUP BY namespace");
+for(var i=0;i<rs.length;i++){
+if(rs[i].namespace!=dojox.storage.DEFAULT_NAMESPACE){
+_8.push(rs[i].namespace);
+}
+}
+return _8;
+},getKeys:function(_b){
+this._initStorage();
+_b=_b||this.DEFAULT_NAMESPACE;
+if(!this.isValidKey(_b)){
+throw new Error("Invalid namespace given: "+_b);
+}
+var rs=dojox.sql("SELECT key FROM "+this.TABLE_NAME+" WHERE namespace = ?",_b);
+var _d=[];
+for(var i=0;i<rs.length;i++){
+_d.push(rs[i].key);
+}
+return _d;
+},clear:function(_f){
+this._initStorage();
+_f=_f||this.DEFAULT_NAMESPACE;
+if(!this.isValidKey(_f)){
+throw new Error("Invalid namespace given: "+_f);
+}
+dojox.sql("DELETE FROM "+this.TABLE_NAME+" WHERE namespace = ?",_f);
+},remove:function(key,_11){
+this._initStorage();
+if(!this.isValidKey(key)){
+throw new Error("Invalid key given: "+key);
+}
+_11=_11||this.DEFAULT_NAMESPACE;
+if(!this.isValidKey(_11)){
+throw new Error("Invalid namespace given: "+key);
+}
+dojox.sql("DELETE FROM "+this.TABLE_NAME+" WHERE namespace = ? AND"+" key = ?",_11,key);
+},putMultiple:function(_12,_13,_14,_15){
+this._initStorage();
+if(!this.isValidKeyArray(_12)||!_13 instanceof Array||_12.length!=_13.length){
+throw new Error("Invalid arguments: keys = ["+_12+"], values = ["+_13+"]");
+}
+if(_15==null||typeof _15=="undefined"){
+_15=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_15)){
+throw new Error("Invalid namespace given: "+_15);
+}
+this._statusHandler=_14;
+try{
+dojox.sql.open();
+dojox.sql.db.execute("BEGIN TRANSACTION");
+var _16="REPLACE INTO "+this.TABLE_NAME+" VALUES (?, ?, ?)";
+for(var i=0;i<_12.length;i++){
+var _18=_13[i];
+if(dojo.isString(_18)){
+_18="string:"+_18;
+}else{
+_18=dojo.toJson(_18);
+}
+dojox.sql.db.execute(_16,[_15,_12[i],_18]);
+}
+dojox.sql.db.execute("COMMIT TRANSACTION");
+dojox.sql.close();
+}
+catch(e){
+
+if(_14){
+_14(this.FAILED,_12,e.toString(),_15);
+}
+return;
+}
+if(_14){
+_14(dojox.storage.SUCCESS,_12,null,_15);
+}
+},getMultiple:function(_19,_1a){
+this._initStorage();
+if(!this.isValidKeyArray(_19)){
+throw new ("Invalid key array given: "+_19);
+}
+if(_1a==null||typeof _1a=="undefined"){
+_1a=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_1a)){
+throw new Error("Invalid namespace given: "+_1a);
+}
+var _1b="SELECT * FROM "+this.TABLE_NAME+" WHERE namespace = ? AND "+" key = ?";
+var _1c=[];
+for(var i=0;i<_19.length;i++){
+var _1e=dojox.sql(_1b,_1a,_19[i]);
+if(!_1e.length){
+_1c[i]=null;
+}else{
+_1e=_1e[0].value;
+if(dojo.isString(_1e)&&(/^string:/.test(_1e))){
+_1c[i]=_1e.substring("string:".length);
+}else{
+_1c[i]=dojo.fromJson(_1e);
+}
+}
+}
+return _1c;
+},removeMultiple:function(_1f,_20){
+this._initStorage();
+if(!this.isValidKeyArray(_1f)){
+throw new Error("Invalid arguments: keys = ["+_1f+"]");
+}
+if(_20==null||typeof _20=="undefined"){
+_20=dojox.storage.DEFAULT_NAMESPACE;
+}
+if(!this.isValidKey(_20)){
+throw new Error("Invalid namespace given: "+_20);
+}
+dojox.sql.open();
+dojox.sql.db.execute("BEGIN TRANSACTION");
+var _21="DELETE FROM "+this.TABLE_NAME+" WHERE namespace = ? AND key = ?";
+for(var i=0;i<_1f.length;i++){
+dojox.sql.db.execute(_21,[_20,_1f[i]]);
+}
+dojox.sql.db.execute("COMMIT TRANSACTION");
+dojox.sql.close();
+},isPermanent:function(){
+return true;
+},getMaximumSize:function(){
+return this.SIZE_NO_LIMIT;
+},hasSettingsUI:function(){
+return false;
+},showSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+},hideSettingsUI:function(){
+throw new Error(this.declaredClass+" does not support a storage settings user-interface");
+},_initStorage:function(){
+if(this._storageReady){
+return;
+}
+if(!google.gears.factory.hasPermission){
+var _23=null;
+var _24=null;
+var msg="This site would like to use Google Gears to enable "+"enhanced functionality.";
+var _26=google.gears.factory.getPermission(_23,_24,msg);
+if(!_26){
+throw new Error("You must give permission to use Gears in order to "+"store data");
+}
+}
+try{
+dojox.sql("CREATE TABLE IF NOT EXISTS "+this.TABLE_NAME+"( "+" namespace TEXT, "+" key TEXT, "+" value TEXT "+")");
+dojox.sql("CREATE UNIQUE INDEX IF NOT EXISTS namespace_key_index"+" ON "+this.TABLE_NAME+" (namespace, key)");
+}
+catch(e){
+
+throw new Error("Unable to create storage tables for Gears in "+"Dojo Storage");
+}
+this._storageReady=true;
+}});
+dojox.storage.manager.register("dojox.storage.GearsStorageProvider",new dojox.storage.GearsStorageProvider());
+})();
+}
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/GearsStorageProvider.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/Provider.js
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/Provider.js?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/Provider.js (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/Provider.js Thu Mar 19 11:10:58 2009
@@ -0,0 +1,69 @@
+/*
+	Copyright (c) 2004-2009, The Dojo Foundation All Rights Reserved.
+	Available via Academic Free License >= 2.1 OR the modified BSD license.
+	see: http://dojotoolkit.org/license for details
+*/
+
+
+if(!dojo._hasResource["dojox.storage.Provider"]){
+dojo._hasResource["dojox.storage.Provider"]=true;
+dojo.provide("dojox.storage.Provider");
+dojo.declare("dojox.storage.Provider",null,{constructor:function(){
+},SUCCESS:"success",FAILED:"failed",PENDING:"pending",SIZE_NOT_AVAILABLE:"Size not available",SIZE_NO_LIMIT:"No size limit",DEFAULT_NAMESPACE:"default",onHideSettingsUI:null,initialize:function(){
+console.warn("dojox.storage.initialize not implemented");
+},isAvailable:function(){
+console.warn("dojox.storage.isAvailable not implemented");
+},put:function(_1,_2,_3,_4){
+console.warn("dojox.storage.put not implemented");
+},get:function(_5,_6){
+console.warn("dojox.storage.get not implemented");
+},hasKey:function(_7,_8){
+return !!this.get(_7,_8);
+},getKeys:function(_9){
+console.warn("dojox.storage.getKeys not implemented");
+},clear:function(_a){
+console.warn("dojox.storage.clear not implemented");
+},remove:function(_b,_c){
+console.warn("dojox.storage.remove not implemented");
+},getNamespaces:function(){
+console.warn("dojox.storage.getNamespaces not implemented");
+},isPermanent:function(){
+console.warn("dojox.storage.isPermanent not implemented");
+},getMaximumSize:function(){
+console.warn("dojox.storage.getMaximumSize not implemented");
+},putMultiple:function(_d,_e,_f,_10){
+for(var i=0;i<_d.length;i++){
+dojox.storage.put(_d[i],_e[i],_f,_10);
+}
+},getMultiple:function(_12,_13){
+var _14=[];
+for(var i=0;i<_12.length;i++){
+_14.push(dojox.storage.get(_12[i],_13));
+}
+return _14;
+},removeMultiple:function(_16,_17){
+for(var i=0;i<_16.length;i++){
+dojox.storage.remove(_16[i],_17);
+}
+},isValidKeyArray:function(_19){
+if(_19===null||_19===undefined||!dojo.isArray(_19)){
+return false;
+}
+return !dojo.some(_19,function(key){
+return !this.isValidKey(key);
+},this);
+},hasSettingsUI:function(){
+return false;
+},showSettingsUI:function(){
+console.warn("dojox.storage.showSettingsUI not implemented");
+},hideSettingsUI:function(){
+console.warn("dojox.storage.hideSettingsUI not implemented");
+},isValidKey:function(_1b){
+if(_1b===null||_1b===undefined){
+return false;
+}
+return /^[0-9A-Za-z_]*$/.test(_1b);
+},getResourceList:function(){
+return [];
+}});
+}

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/Provider.js
------------------------------------------------------------------------------
    svn:eol-style = native

Added: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/README
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/README?rev=755920&view=auto
==============================================================================
--- camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/README (added)
+++ camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/README Thu Mar 19 11:10:58 2009
@@ -0,0 +1,76 @@
+-------------------------------------------------------------------------------
+Dojo Storage
+-------------------------------------------------------------------------------
+Version X.XXX (does not have separate versioning -- versioned by release date)
+Last Release date: March 2008
+-------------------------------------------------------------------------------
+Project state:
+experimental
+-------------------------------------------------------------------------------
+Credits
+	Brad Neuberg
+	Alex Russell
+-------------------------------------------------------------------------------
+Project description
+
+dojox.storage provides a JavaScript abstraction for persistent storage
+as well as pluggable implementations which typically use native browser extensions
+(e.g. Flash player, Gears)
+
+-------------------------------------------------------------------------------
+Dependencies:
+
+FlashStorageProvider requires the Flash player
+GearsStorageProvider requires the Gears extension
+The various Air*StorageProviders require Adobe's AIR software
+
+The open source mtasc compiler (www.mtasc.org) is needed to build the
+ActionScript into SWF format.  The SWF object is maintained within svn, so
+this step is only necessary if Storage.as is modified.  A sample build script
+is provided (buildFlashStorage.sh)
+
+-------------------------------------------------------------------------------
+Documentation
+
+See http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book50 for the
+authoritative Dojo Storage docs.
+
+See dojox/storage/demos/helloworld.html for a simple Hello World example
+you can base your code off of.
+
+-------------------------------------------------------------------------------
+Installation instructions
+
+If you want to use Dojo Storage in a web browser:
+
+These installation instructions are to use Dojo Storage in a web browser; at
+runtime, Dojo Storage will autodetect and use the best available storage
+option. This includes:
+
+  * Google Gears
+  * HTML 5 Web Browsers (Firefox 2+)
+  * Hidden Flash
+  
+If you are using a release build (if you downloaded Dojo from the Dojo
+website then this is a release build -- if you checked it out from
+Subversion yourself then you will have to build things yourself), if you 
+only want to grab just the files from Dojo to use Dojo Storage
+in the browser, take the following (but make sure to keep the directory
+layout the same, or else things won't work correctly!):
+
+* dojo/dojo.js
+* dojox/storage/storage-browser.js
+* dojox/storage/Storage.swf
+
+To help with testing and development and to make sure you have everything 
+right, its also useful to grab the following files:
+
+* dojox/storage/README
+* dojox/storage/demos/helloworld.html
+
+If you want to use Dojo Storage with Adobe AIR:
+
+[TBD! Why don't you write this and contribute!]
+
+-------------------------------------------------------------------------------
+Additional Notes

Propchange: camel/trunk/components/camel-web/src/main/webapp/js/dojox/storage/README
------------------------------------------------------------------------------
    svn:eol-style = native