1 package org.apache.turbine.util.parser; 2 3 18 19 import java.io.UnsupportedEncodingException ; 20 21 import java.math.BigDecimal ; 22 23 import java.text.DateFormat ; 24 25 import java.util.Date ; 26 import java.util.Enumeration ; 27 import java.util.Set ; 28 29 import org.apache.torque.om.NumberKey; 30 import org.apache.torque.om.StringKey; 31 32 51 public interface ValueParser 52 { 53 58 String URL_CASE_FOLDING = ParserUtils.URL_CASE_FOLDING_KEY; 59 60 65 String URL_CASE_FOLDING_NONE = ParserUtils.URL_CASE_FOLDING_NONE_VALUE; 66 67 72 String URL_CASE_FOLDING_LOWER = ParserUtils.URL_CASE_FOLDING_LOWER_VALUE; 73 74 79 String URL_CASE_FOLDING_UPPER = ParserUtils.URL_CASE_FOLDING_UPPER_VALUE; 80 81 84 void clear(); 85 86 89 void setCharacterEncoding(String s); 90 91 94 String getCharacterEncoding(); 95 96 104 String convert(String value); 105 106 112 void add(String name, double value); 113 114 120 void add(String name, int value); 121 122 128 void add(String name, Integer value); 129 130 136 void add(String name, long value); 137 138 144 void add(String name, String value); 145 146 154 void append(String name, String value); 155 156 164 void add(String name, String [] value); 165 166 174 Object remove(String name); 175 176 184 boolean containsKey(Object key); 185 186 193 boolean containsDateSelectorKeys(String key); 194 195 201 Enumeration keys(); 202 203 208 Set keySet(); 209 210 215 Object [] getKeys(); 216 217 225 boolean getBoolean(String name, boolean defaultValue); 226 227 234 boolean getBoolean(String name); 235 236 245 Boolean getBool(String name, boolean defaultValue); 246 247 255 Boolean getBool(String name); 256 257 269 Boolean getBooleanObject(String name); 270 271 284 Boolean getBooleanObject(String name, Boolean defaultValue); 285 286 294 double getDouble(String name, double defaultValue); 295 296 303 double getDouble(String name); 304 305 312 double[] getDoubles(String name); 313 314 322 Double getDoubleObject(String name, Double defaultValue); 323 324 331 Double getDoubleObject(String name); 332 333 340 Double [] getDoubleObjects(String name); 341 342 350 float getFloat(String name, float defaultValue); 351 352 359 float getFloat(String name); 360 361 368 float[] getFloats(String name); 369 370 378 Float getFloatObject(String name, Float defaultValue); 379 380 387 Float getFloatObject(String name); 388 389 396 Float [] getFloatObjects(String name); 397 398 406 BigDecimal getBigDecimal(String name, BigDecimal defaultValue); 407 408 415 BigDecimal getBigDecimal(String name); 416 417 424 BigDecimal [] getBigDecimals(String name); 425 426 434 int getInt(String name, int defaultValue); 435 436 443 int getInt(String name); 444 445 453 Integer getIntObject(String name, Integer defaultValue); 454 455 462 Integer getIntObject(String name); 463 464 473 Integer getInteger(String name, int defaultValue); 474 475 485 Integer getInteger(String name, Integer defaultValue); 486 487 495 Integer getInteger(String name); 496 497 504 int[] getInts(String name); 505 506 514 Integer [] getIntegers(String name); 515 516 523 Integer [] getIntObjects(String name); 524 525 533 long getLong(String name, long defaultValue); 534 535 542 long getLong(String name); 543 544 552 Long getLongObject(String name, Long defaultValue); 553 554 561 Long getLongObject(String name); 562 563 570 long[] getLongs(String name); 571 572 579 Long [] getLongObjects(String name); 580 581 589 byte getByte(String name, byte defaultValue); 590 591 598 byte getByte(String name); 599 600 609 byte[] getBytes(String name) throws UnsupportedEncodingException ; 610 611 619 Byte getByteObject(String name, Byte defaultValue); 620 621 628 Byte getByteObject(String name); 629 630 637 String getString(String name); 638 639 651 String get(String name); 652 653 661 String getString(String name, String defaultValue); 662 663 671 void setString(String name, String value); 672 673 680 String [] getStrings(String name); 681 682 690 String [] getStrings(String name, String [] defaultValue); 691 692 700 void setStrings(String name, String [] values); 701 702 709 Object getObject(String name); 710 711 718 Object [] getObjects(String name); 719 720 730 Date getDate(String name, DateFormat df, Date defaultValue); 731 732 741 Date getDate(String name); 742 743 751 Date getDate(String name, DateFormat df); 752 753 761 NumberKey getNumberKey(String name); 762 763 771 StringKey getStringKey(String name); 772 773 781 void setProperties(Object bean) throws Exception ; 782 783 789 String toString(); 790 } 791 | Popular Tags |