Layout.dumpToZip (z, fullExport)
dump a layout object by copying all necessary properties to a transient HopObject and then return the Xml dump of it (this way we avoid any clashes with usernames)

  • Parameter Object:
    Zip object to dump layout to
  • Parameter Boolean:
    true for full export, false for incremental
  • Returns
    Boolean true
Sourcecode in Layout/objectFunctions.js:
1:   function dumpToZip(z, fullExport) {
2:      var cl = new HopObject();
3:      cl.title = this.title;
4:      cl.alias = this.alias;
5:      cl.description = this.description;
6:      cl.preferences = this.preferences.getAll();
7:      cl.creator = this.creator ? this.creator.name : null;
8:      cl.createtime = this.creator ? this.createtime : null;
9:      cl.exporttime = new Date();
10:     cl.exporter = session.user.name;
11:     cl.fullExport = fullExport;
12:     cl.modifier = this.modifier ? this.modifier.name : null;
13:     cl.modifytime = this.modifytime;
14:     var buf = new java.lang.String(Xml.writeToString(cl)).getBytes();
15:     z.addData(buf, "preferences.xml");
16:     return true;
17:  }