1 20 package org.enhydra.barracuda.core.forms; 21 22 import java.util.*; 23 import javax.servlet.*; 24 import javax.servlet.http.*; 25 26 import org.enhydra.barracuda.plankton.data.StateMap; 27 28 50 public interface FormMap extends StateMap { 51 52 59 public void defineElement(FormElement element); 60 61 68 public void defineElement(String key, FormElement element); 69 70 79 public void defineValidator(FormValidator validator); 80 81 97 public FormMap map(ServletRequest req); 98 99 115 public FormMap map(ServletRequest req, Locale loc); 116 117 131 public FormMap map(StateMap map); 132 133 147 public FormMap map(StateMap map, Locale loc); 148 149 164 public FormMap map(StateMap map, String prefix); 165 166 184 public FormMap map(StateMap map, String prefix, Locale loc); 185 186 206 public FormMap map(ServletRequest req, String prefix, Locale loc); 207 208 225 public FormMap map(ServletRequest req, String prefix); 226 227 235 public FormElement mapElement(String key, Object origVal); 237 246 public FormElement mapElement(String key, Object origVal, Locale loc); 248 261 public FormMap validate(boolean deferExceptions) throws ValidationException; 262 263 274 public FormMap validateElements(boolean deferExceptions) throws ValidationException; 275 276 287 public FormMap validateForm(boolean deferExceptions) throws ValidationException; 288 289 295 public boolean exists(String key); 296 297 303 public FormElement getElement(String key); 304 305 310 public Map getElements(); 311 312 317 public Map getElementVals(); 318 319 326 public void setVal(String key, Object val); 327 328 339 public Object getVal(String key); 340 341 350 public Object [] getVals(String key); 351 352 360 public String getStringVal(String key); 361 362 370 public String getStringVal(String key, String dflt); 371 372 380 public Boolean getBooleanVal(String key); 381 382 390 public Boolean getBooleanVal(String key, Boolean dflt); 391 392 400 public Integer getIntegerVal(String key); 401 402 410 public Integer getIntegerVal(String key, Integer dflt); 411 412 420 public Date getDateVal(String key); 421 422 430 public Date getDateVal(String key, Date dflt); 431 432 440 public Long getLongVal(String key); 441 442 450 public Long getLongVal(String key, Long dflt); 451 452 460 public Short getShortVal(String key); 461 462 470 public Short getShortVal(String key, Short dflt); 471 472 480 public Double getDoubleVal(String key); 481 482 490 public Double getDoubleVal(String key, Double dflt); 491 492 500 public Float getFloatVal(String key); 501 502 510 public Float getFloatVal(String key, Float dflt); 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 533 534 542 544 552 554 555 558 559 560 } 561 | Popular Tags |