On Oct 28, 2008, at 6:19 PM, Vincent Massol wrote:
On Oct 28, 2008, at 6:14 PM, Sergiu Dumitriu wrote:
Asiri Rathnayake wrote:
Hi Vincent,
Ok, will revert those changes.
Btw, why I tried to use static methods instead of separate classes
is
because those classes seemed to be doing very little. I mean those
classes
were utilized like,
<code>
new TagRemoveFilter().doFilter(document);
new UnderlineLinkFilter().filter(document);
new XWikiSyntaxEscapeFilter().doFilter(document);
new ImageTagFilter().doFilter(document);
new PinLiFilter().doFilter(document);
new EmptyLinkFilter().doFilter(document);
</code>
That's all. Something didn't look right to me. And also it seems
to clutter
the functionality into a lots of tiny classes.
Listing implementations is wrong. Why not use components?
This would give the ability for anyone using the office importer to
plug new filters if it's required for some reasons.
Just one note. Making them components is possible (possibly overkill
although it might be good, I'm not sure). However what's important is
that you don't do the new *Filter() at every run. There should a
singleton component that has an initialization method (Initializable)
and that registers them once and for all.
Thanks
-Vincent