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