incubator-jspwiki-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Jaquith <andrew.r.jaqu...@gmail.com>
Subject Re: svn commit: r762294 - in /incubator/jspwiki/trunk: src/java/org/apache/wiki/api/ src/java/org/apache/wiki/workflow/ tests/java/org/apache/wiki/workflow/
Date Mon, 06 Apr 2009 14:25:42 GMT
Yup. Whatever works is fine with me. My intent with this particular
set of changes was to get Workflows prepped for persistence. If and
when you make method/signature changes on WikiPage, the refactoring
will be easy.

On Mon, Apr 6, 2009 at 10:09 AM, Janne Jalkanen <janne.jalkanen@iki.fi> wrote:
> From WikiPage
>
>> -    public Object getAttribute( String key );
>> +    public Serializable getAttribute( String key );
>
> I'm sort of leaning towards getting rid of these generic methods and having something
like
>
> Date getDateAttribute(String key)
> Long getLongAttribute(String key)
> String getAttribute(String key)
>
> And vice versa
>
> void setAttribute(String key, Date value)
>
> This allows us to make some basic automatic translations (e.g you can
> still get a Long attribute as a String, it'll just be the result of
> Long.toString()) but most of all, it gets rid of annoying casting
> needs and ClassCastExceptions.
>
>> -    public Map getAttributes();
>> +    public Map<String,Serializable> getAttributes();
>
> This I am hoping to get rid of soon.  With the very large attributes
> we will be seeing, this is just not a feasible API.
>
> /Janne
>

Mime
View raw message