I would like to extend the Task class to support properties. Properties can be set by plug-ins on the task. An example of a property would be the SRID for the whole task. This will allow us to support extended metadata on tasks without having to add new methods each time or subclassing.
I propose to use QName's as the key for the keys for the properties. This would allow different namespaces for different applications. The change would include the following. private void Map<QName,Object> properties = new HashMap<QName,Object>(); public void setProperty(QName name, Object value) { properties.put(name, value); } /** * This will auto cast so you can just type things like * int value = getProperty(MY_KEY); */ public <T> T getProperty(QName name) { return (T)properties.get(name); } public Map<QName,Object> getProperties() { } We'd also need to have it setup so this would be saved to the project file. Any suggestions/comments? Paul ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel