dbmapping now knows which of its properties

(if any) are to be considered skin managers
This commit is contained in:
hns 2001-08-10 21:10:18 +00:00
parent bbfab140a6
commit ac9db121db

View file

@ -35,7 +35,10 @@ public class DbMapping implements Updatable {
// name of db table // name of db table
String table; String table;
ParentInfo[] parent; // list of properties to try for parent // list of properties to try for parent
ParentInfo[] parent;
// list of properties to try as skinmanager
String[] skinmgr;
// DbMapping subnodes; // DbMapping subnodes;
// DbMapping properties; // DbMapping properties;
@ -167,6 +170,15 @@ public class DbMapping implements Updatable {
} else } else
parent = null; parent = null;
String skm = props.getProperty ("_skinmanager");
if (skm != null) {
StringTokenizer st = new StringTokenizer (skm, ",;");
skinmgr = new String[st.countTokens()];
for (int i=0; i<skinmgr.length; i++)
skinmgr[i] = st.nextToken().trim();
} else
skinmgr = null;
lastTypeChange = props.lastModified (); lastTypeChange = props.lastModified ();
// set the cached schema & keydef to null so it's rebuilt the next time around // set the cached schema & keydef to null so it's rebuilt the next time around
schema = null; schema = null;
@ -391,6 +403,10 @@ public class DbMapping implements Updatable {
return parent; return parent;
} }
public String[] getSkinManagers () {
return skinmgr;
}
public DbMapping getSubnodeMapping () { public DbMapping getSubnodeMapping () {
if (subnodesRel != null) if (subnodesRel != null)