Global.helma.Skin (source, encFlag)
Sourcecode in /home/hannes/helma/modules/helma/Skin.js:
22:   helma.Skin = function(source, encFlag) {
23:       var Base64 = Packages.helma.util.Base64;
24:   
25:       if (!encFlag) {
26:           var skin = createSkin(source);
27:       } else {
28:           var encoded = source;
29:           source = new java.lang.String(source);
30:           var bytes = Base64.decode(source.toCharArray());
31:          var skin = createSkin(new java.lang.String(bytes, "UTF-8"));
32:      }
33:  
34:      this.toString = function() {
35:          return source;
36:      };
37:  
38:      this.valueOf = function() {
39:          if (encFlag)
40:              return encoded;
41:          var bytes = new java.lang.String(source).getBytes("UTF-8");
42:          return new java.lang.String(Base64.encode(bytes));
43:      };
44:  
45:      this.render = function(param) {
46:          return renderSkin(skin, param);
47:      };
48:  
49:      this.renderAsString = function(param) {
50:          return renderSkinAsString(skin, param);
51:      };
52:  
53:      this.containsMacro = function(name, handler) {
54:          res.push();
55:          res.write("<% *");
56:          if (handler) {
57:              res.write(handler);
58:              res.write(".");
59:          }
60:          res.write(name);
61:          res.write(" *%>");
62:          var re = new RegExp(res.pop(), "g");
63:          return re.test(source);
64:      };
65:  
66:      for (var i in this)
67:          this.dontEnum(i);
68:  
69:      return this;
70:  }