*
* @return A ObjStoreAttrs object containing attributes
* needed for creation of an object store.
*/
public ObjStoreAttrs getObjStoreAttrs(int index) {
ObjStoreAttrs osa = new ObjStoreAttrs();
String basePropName, objstoreAttrsStr, idPropName, descPropName;
String id, desc;
int objstoreAttrsStrLen;
basePropName = PROP_NAME_OBJSTORE_BASENAME
+ new Integer(index).toString()
+ ".";
idPropName = basePropName
+ PROP_NAME_OBJSTORE_ID_PREFIX;
id = getProperty(idPropName, "");
descPropName = basePropName
+ PROP_NAME_OBJSTORE_DESC_PREFIX;
desc = getProperty(descPropName, "");
osa = new ObjStoreAttrs(id, desc);
/*
* Construct string:
* objstore1.attrs.
*/
objstoreAttrsStr = PROP_NAME_OBJSTORE_BASENAME
+ new Integer(index).toString()
+ "."
+ PROP_NAME_OBJSTORE_ATTR_PREFIX
+ ".";
objstoreAttrsStrLen = objstoreAttrsStr.length();
for (Enumeration e = propertyNames(); e.hasMoreElements() ;) {
String propName = (String)e.nextElement();
if (propName.startsWith(objstoreAttrsStr)) {
String newPropName, value;
newPropName = propName.substring(objstoreAttrsStrLen);
value = getProperty(propName);
osa.put(newPropName, value);
}
}
return (osa);
}