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