Added public remove() method, which is now required by Updatable interface.

This commit is contained in:
hns 2002-10-01 15:53:51 +00:00
parent 52739414bd
commit 7799423ae5
2 changed files with 19 additions and 6 deletions

View file

@ -69,10 +69,7 @@ public final class SkinFile implements Updatable {
if (!file.exists ()) { if (!file.exists ()) {
// remove skin from prototype // remove skin from prototype
if (prototype != null) { remove ();
prototype.skins.remove (name);
prototype.updatables.remove (file.getName());
}
} else { } else {
// we only need to update if the skin has already been initialized // we only need to update if the skin has already been initialized
if (skin != null) if (skin != null)
@ -94,6 +91,15 @@ public final class SkinFile implements Updatable {
lastmod = file.lastModified (); lastmod = file.lastModified ();
} }
public void remove () {
if (prototype != null) {
prototype.skins.remove (name);
if (file != null)
prototype.updatables.remove (file.getName());
}
}
public Skin getSkin () { public Skin getSkin () {
if (skin == null) if (skin == null)
read (); read ();

View file

@ -237,6 +237,13 @@ public final class DbMapping implements Updatable {
} }
/**
* Method in interface Updatable.
*/
public void remove () {
// do nothing, removing of type properties is not implemented.
}
/** /**
* Get a JDBC connection for this DbMapping. * Get a JDBC connection for this DbMapping.
*/ */