Exemple #1
0
  public String getAsString(Map args, String key) {
    String result = null;

    Object value = args.get(key);
    if (value == null) {
      result = "";
    } else if (value instanceof String) {
      result = (String) value;
    } else if (value instanceof String[]) {
      String[] array = (String[]) value;
      result = array[0];
    } else {
      result = value.toString();
    }

    return result;
  }
Exemple #2
0
 public boolean isFormType(Map args, String type) {
   Object value = args.get(type);
   return (value != null) && !value.equals("");
 }
Exemple #3
0
 public void clearSavedArgs() {
   savedArgs.clear();
 }
Exemple #4
0
 public void setSavedArg(String key, Object value) {
   savedArgs.put(key, value);
 }
Exemple #5
0
 public Object getSavedArg(String key) {
   return savedArgs.get(key);
 }
Exemple #6
0
 public void setPhotoCase(PhotoCase photoCase) {
   savedArgs.put(PHOTO_CASE, photoCase);
 }
Exemple #7
0
 public PhotoCase getPhotoCase() {
   return (PhotoCase) savedArgs.get(PHOTO_CASE);
 }
Exemple #8
0
 public void setHeading(String myHeading) {
   savedArgs.put(HEADING, myHeading);
 }
Exemple #9
0
 public Photo getPriorPhoto() {
   return (Photo) savedArgs.get(PRIOR_PHOTO);
 }
Exemple #10
0
 public void setPhoto(Photo newPhoto) {
   savedArgs.put(PHOTO, newPhoto);
 }
Exemple #11
0
 public Photo getPhoto() {
   return (Photo) savedArgs.get(PHOTO);
 }
Exemple #12
0
 public void setThreeLineMessage(String msg1, String msg2, String msg3) {
   savedArgs.put(MESSAGE, HtmlUtil.asPara(msg1) + HtmlUtil.asPara(msg2) + HtmlUtil.asPara(msg3));
 }
Exemple #13
0
 public void setMessage(String myMessage) {
   savedArgs.put(MESSAGE, HtmlUtil.asPara(myMessage));
 }
Exemple #14
0
 public String getMessage() {
   return (String) savedArgs.get(MESSAGE);
 }
Exemple #15
0
 public void setPriorPhoto(Photo oldPhoto) {
   savedArgs.put(PRIOR_PHOTO, oldPhoto);
 }
Exemple #16
0
 public String getAndSaveAsString(Map args, String key) {
   String result = getAsString(args, key);
   savedArgs.put(key, result);
   return result;
 }
Exemple #17
0
 public String getHeading() {
   return (String) savedArgs.get(HEADING);
 }