commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Papastamatopoulos <geor...@lawlex.com.au>
Subject [betwixt]:: MixedEncodingStrategy
Date Fri, 26 Mar 2004 03:05:21 GMT
Hi

First of all, thanks for Betwixt!  Looks like it'll make our life a
whole lot easier.

We are needing to save a lot of bean properties around CDATA sections. 
I just downloaded the latest nightly build and it looks like 
MixedEncodingStrategy will do the job for us.

Just wondering what people thought about the idea of possible breaking
this out into an interface something along the lines of:

public interface EncodingStrategy {
 String encode(String, ElementDescriptor);
}

Then could have a static factory class or something similar that would
create various strategies for us :

public class EncodingStrategies {
 public static final EncodingStrategy createDefault(){
   return new DefaultEncodingStrategy();
 }
 public static final EncodingStrategy createCData(){
   return new CDATAEncodingStrategy();
 }
 public static final EncodingStrategy createSomeOtherStrategy(){
   return new SomeOtherClass();
 }
}

The stragey implementations may be private inner classes or something of
the like.  

Any thoughts as to whether something like this would be useful?

George


-- 
___________________________
George Papastamatopoulos

Lawlex Compliance Solutions
+61 3 9278 1182
___________________________


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message