Added public remove() method, which is now required by Updatable interface.
This commit is contained in:
parent
52739414bd
commit
7799423ae5
2 changed files with 19 additions and 6 deletions
|
@ -69,10 +69,7 @@ public final class SkinFile implements Updatable {
|
|||
|
||||
if (!file.exists ()) {
|
||||
// remove skin from prototype
|
||||
if (prototype != null) {
|
||||
prototype.skins.remove (name);
|
||||
prototype.updatables.remove (file.getName());
|
||||
}
|
||||
remove ();
|
||||
} else {
|
||||
// we only need to update if the skin has already been initialized
|
||||
if (skin != null)
|
||||
|
@ -94,6 +91,15 @@ public final class SkinFile implements Updatable {
|
|||
lastmod = file.lastModified ();
|
||||
}
|
||||
|
||||
public void remove () {
|
||||
if (prototype != null) {
|
||||
prototype.skins.remove (name);
|
||||
if (file != null)
|
||||
prototype.updatables.remove (file.getName());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public Skin getSkin () {
|
||||
if (skin == null)
|
||||
read ();
|
||||
|
|
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Reference in a new issue