Fixed handling of type.properties entries and creation of DbMappings.
Not fixed all the way, though - still needs some work.
This commit is contained in:
parent
5a6f044c40
commit
131ae0c6a9
1 changed files with 12 additions and 41 deletions
|
@ -104,9 +104,17 @@ public class ZippedAppFile implements Updatable {
|
||||||
}
|
}
|
||||||
else if ("type.properties".equalsIgnoreCase (fname)) {
|
else if ("type.properties".equalsIgnoreCase (fname)) {
|
||||||
String name = fname.substring (0, fname.lastIndexOf ("."));
|
String name = fname.substring (0, fname.lastIndexOf ("."));
|
||||||
SystemProperties props = new SystemProperties (zip.getInputStream (entry));
|
DbMapping dbmap = proto.getDbMapping ();
|
||||||
// DbMapping does its own registering, just construct it.
|
if (dbmap == null) {
|
||||||
new DbMapping (app, proto.getName (), props);
|
SystemProperties props = new SystemProperties (zip.getInputStream (entry));
|
||||||
|
dbmap = new DbMapping (app, proto.getName (), props);
|
||||||
|
proto.setDbMapping (dbmap);
|
||||||
|
} else {
|
||||||
|
// FIXME: provide a way to let zip files add to
|
||||||
|
// type.properties files of existing prototypes.
|
||||||
|
// SystemProperties props = dbmap.getProperties ();
|
||||||
|
// props.add (zip.getInputStream (entry));
|
||||||
|
}
|
||||||
// mark prototype as updated
|
// mark prototype as updated
|
||||||
proto.markUpdated ();
|
proto.markUpdated ();
|
||||||
}
|
}
|
||||||
|
@ -114,10 +122,9 @@ public class ZippedAppFile implements Updatable {
|
||||||
}
|
}
|
||||||
for (Iterator it = newPrototypes.iterator (); it.hasNext (); ) {
|
for (Iterator it = newPrototypes.iterator (); it.hasNext (); ) {
|
||||||
Prototype proto = (Prototype) it.next ();
|
Prototype proto = (Prototype) it.next ();
|
||||||
if (app.getDbMapping (proto.getName ()) == null) {
|
if (proto.getDbMapping() == null) {
|
||||||
// DbMapping doesn't exist, we still need to create one
|
// DbMapping doesn't exist, we still need to create one
|
||||||
SystemProperties props = new SystemProperties ();
|
SystemProperties props = new SystemProperties ();
|
||||||
// DbMapping does its own registering, just construct it.
|
|
||||||
proto.setDbMapping (new DbMapping (app, proto.getName (), props));
|
proto.setDbMapping (new DbMapping (app, proto.getName (), props));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -156,39 +163,3 @@ public class ZippedAppFile implements Updatable {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue