예제 #1
0
 /**
  * Dynamically rendering the Guest service creatino email
  *
  * @param userName
  * @param requested_date
  * @param address
  * @param service_details
  * @param other_details
  * @param service_charges
  * @param discount
  * @param total_amount
  * @param service_support_mail_id
  * @param service_support_number
  * @param templateName
  * @return
  * @throws Exception
  */
 public String renderGuestServiceEmail(
     String userName,
     String requested_date,
     String address,
     String service_details,
     String other_details,
     String service_charges,
     String discount,
     String total_amount,
     String service_support_mail_id,
     String service_support_number,
     String templateName)
     throws Exception {
   Chunk html = theme.makeChunk("guestServiceRequestEmail#" + templateName);
   html.set("name", userName);
   html.set("requested_date", requested_date);
   html.set("address", address);
   html.set("service_details", service_details);
   html.set("other_details", other_details);
   html.set("service_charges", service_charges);
   html.set("discount", discount);
   html.set("total_amount", total_amount);
   html.set("service_support_mail_id", service_support_mail_id);
   html.set("service_support_number", service_support_number);
   String output = html.toString();
   return output;
 }
예제 #2
0
 /**
  * Dynamically rendering the User Activation Email
  *
  * @param userName
  * @param emailId
  * @param templateName
  * @return
  * @throws Exception
  */
 public String renderActivationEmail(String userName, String activationURL, String templateName)
     throws Exception {
   Chunk html = theme.makeChunk("accountActivation#" + templateName);
   html.set("name", userName);
   html.set("activation_url", activationURL);
   String output = html.toString();
   return output;
 }
예제 #3
0
 /**
  * Dynamically rendering the New Service Creation Email
  *
  * @param userName
  * @param emailId
  * @param templateName
  * @return
  * @throws Exception
  */
 public String renderServiceCreationEmail(
     String userName,
     String requested_date,
     List<String> service_description,
     String other_details,
     String templateName)
     throws Exception {
   Chunk html = theme.makeChunk("newServiceRequest#" + templateName);
   html.set("name", userName);
   html.set("requested_date", requested_date);
   String[] service_descriptionArray =
       service_description.toArray(new String[service_description.size()]);
   html.set("subServiceDtlsList", service_descriptionArray);
   html.set("other_details", other_details);
   String output = html.toString();
   return output;
 }
예제 #4
0
 @Override
 public String run(String url, SofaServer sofaServer, Theme theme, IHTTPSession session) {
   String tpl = session.getParms().get("command");
   Log.i("RPCPage command", tpl);
   Chunk action_chunk = theme.makeChunk(tpl);
   Map<String, List<String>> decodedQueryParameters =
       sofaServer.decodeParameters(session.getQueryParameterString());
   for (Map.Entry<String, List<String>> entry : decodedQueryParameters.entrySet()) {
     if (entry.getValue().size() == 1) {
       action_chunk.set(entry.getKey(), entry.getValue().get(0)); // string
     } else {
       action_chunk.set(entry.getKey(), entry.getValue()); // array
     }
   }
   // action_chunk.set("list", new String[]{"apples","bananas","carrots","durian"} );
   return action_chunk.toString();
 }
예제 #5
0
 /**
  * Dynamically rendering the Promotion Coupon Code for the Registered User.
  *
  * @param userName
  * @param coupon_code
  * @param promotion_start_date
  * @param promotion_end_date
  * @param promotion_email
  * @param promotion_number
  * @param templateName
  * @return
  * @throws Exception
  */
 public String renderUserPromotionCouponEmail(
     String userName,
     String coupon_code,
     String promotion_start_date,
     String promotion_end_date,
     String promotion_email,
     String promotion_number,
     String templateName)
     throws Exception {
   Chunk html = theme.makeChunk("registerUserPromotionEmail#" + templateName);
   html.set("name", userName);
   html.set("coupon_code", coupon_code);
   html.set("promotion_start_date", promotion_start_date);
   html.set("promotion_end_date", promotion_end_date);
   html.set("promotion_email", promotion_email);
   html.set("promotion_number", promotion_number);
   String output = html.toString();
   return output;
 }