Ignore:
Timestamp:
2018-09-13T14:18:16+12:00 (6 years ago)
Author:
kjdon
Message:

replacing hard coded param names with static string variables. set up save params for those params we need to save to the session.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/BerryBasket.java

    r32308 r32453  
    6666    protected static final String DELETE_ITEM_SERVICE = "DeleteItem";
    6767
     68  // for AddItem
    6869    protected static final String ITEM_PARAM = "item";
     70  // for DeleteItems
     71  protected static final String ITEMS_PARAM = "items";
     72  // for SendMail
     73  protected static final String ADDRESS_PARAM = "address";
     74  protected static final String SUBJECT_PARAM = "subject";
     75  protected static final String CONTENT_PARAM = "content";
     76  protected static final String CC_PARAM = "cc";
     77  protected static final String BCC_PARAM = "bcc";
     78
     79 
    6980    protected static final String delimiter = "|";
    7081    protected static final int delay = 1800000;
     
    171182
    172183        }
     184
     185        // if any params should be saved in the session, add them to save_params here
     186        // this.save_params.add(XXX_PARAM);
    173187        return true;
    174188
     
    252266        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    253267
    254         String item = (String) params.get("item");
     268        String item = (String) params.get(ITEM_PARAM);
    255269        String collection = "";
    256270        int pos = item.indexOf(":");
     
    334348        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    335349
    336         String param = (String) params.get("items");
     350        String param = (String) params.get(ITEMS_PARAM);
    337351
    338352        if (param == null)
     
    496510        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    497511
    498         String to = (String) params.get("address");
    499         String subject = (String) params.get("subject");
    500         String content = (String) params.get("content");
    501         String cc = (String) params.get("cc");
    502         String bcc = (String) params.get("bcc");
     512        String to = (String) params.get(ADDRESS_PARAM);
     513        String subject = (String) params.get(SUBJECT_PARAM);
     514        String content = (String) params.get(CONTENT_PARAM);
     515        String cc = (String) params.get(CC_PARAM);
     516        String bcc = (String) params.get(BCC_PARAM);
    503517
    504518        String mailhost = GlobalProperties.getProperty("mail.smtp.host");
Note: See TracChangeset for help on using the changeset viewer.