1 29 30 package com.caucho.config.types; 31 32 import com.caucho.config.NodeBuilder; 33 import com.caucho.config.TypeStrategy; 34 import com.caucho.util.L10N; 35 import com.caucho.util.QDate; 36 37 import org.w3c.dom.Node ; 38 39 public class QDateTypeStrategy extends TypeStrategy { 40 protected static final L10N L = new L10N(QDateTypeStrategy.class); 41 42 49 public Object configure(NodeBuilder builder, Node node, Object parent) 50 throws Exception 51 { 52 String dateString = builder.configureString(node); 53 54 return parseDate(dateString); 55 } 56 57 public static QDate parseDate(String dateString) 58 throws Exception 59 { 60 QDate qdate = new QDate(); 61 62 qdate.parseDate(dateString); 63 64 return qdate; 65 } 66 } 67 | Popular Tags |