svnno****@sourc*****
svnno****@sourc*****
2009年 1月 24日 (土) 07:21:45 JST
Revision: 1697 http://svn.sourceforge.jp/view?root=pal&view=rev&rev=1697 Author: shinsuke Date: 2009-01-24 07:21:45 +0900 (Sat, 24 Jan 2009) Log Message: ----------- send notification mail. Modified Paths: -------------- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/ConfigAction.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/CalendarAction.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/OnetimeScheduleAction.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/RepeatScheduleAction.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/CalendarAction.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/OnetimeScheduleAction.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/RepeatScheduleAction.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/EventSchedule.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/ConfigForm.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/facility/OnetimeScheduleForm.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/facility/RepeatScheduleForm.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/OnetimeScheduleForm.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/RepeatScheduleForm.java scheduler/trunk/src/main/resources/application.properties scheduler/trunk/src/main/resources/application_ja.properties scheduler/trunk/src/main/webapp/WEB-INF/view/config/index.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/confirm.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/edit.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/facilitylist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/userlist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/confirm.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/edit.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/facilitylist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/userlist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/confirm.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/edit.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/facilitylist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/userlist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/confirm.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/edit.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/facilitylist.jsp scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/userlist.jsp Added Paths: ----------- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/LocaleUtil.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/NotificationUtil.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/VelocityUtil.java scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/NotificationService.java scheduler/trunk/src/main/webapp/WEB-INF/template/ scheduler/trunk/src/main/webapp/WEB-INF/template/create-onetime-facility.vm scheduler/trunk/src/main/webapp/WEB-INF/template/create-onetime-schedule.vm scheduler/trunk/src/main/webapp/WEB-INF/template/create-repeat-facility.vm scheduler/trunk/src/main/webapp/WEB-INF/template/create-repeat-schedule.vm scheduler/trunk/src/main/webapp/WEB-INF/template/ja/ scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-onetime-facility.vm scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-onetime-schedule.vm scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-repeat-facility.vm scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-repeat-schedule.vm scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-onetime-facility.vm scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-onetime-schedule.vm scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-repeat-facility.vm scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-repeat-schedule.vm scheduler/trunk/src/main/webapp/WEB-INF/template/update-onetime-facility.vm scheduler/trunk/src/main/webapp/WEB-INF/template/update-onetime-schedule.vm scheduler/trunk/src/main/webapp/WEB-INF/template/update-repeat-facility.vm scheduler/trunk/src/main/webapp/WEB-INF/template/update-repeat-schedule.vm -------------- next part -------------- Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/ConfigAction.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/ConfigAction.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/ConfigAction.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -8,6 +8,7 @@ import jp.sf.pal.scheduler.SchedulerConstants; import jp.sf.pal.scheduler.common.util.ConfigUtil; +import jp.sf.pal.scheduler.common.util.NotificationUtil; import jp.sf.pal.scheduler.common.util.SAStrutsUtil; import jp.sf.pal.scheduler.form.ConfigForm; import jp.sf.pal.scheduler.util.SchedulerUtil; @@ -34,6 +35,17 @@ protected String displayIndex() { configForm.holidays = ConfigUtil.getString( SchedulerConstants.SCHEDULER_HOLIDAYS, ""); + configForm.notificationTemplateEncoding = ConfigUtil.getString( + NotificationUtil.TEMPLATE_ENCODING, "UTF-8"); + configForm.notificationSmtpHost = ConfigUtil.getString( + NotificationUtil.SMTP_HOST, "localhost"); + // TODO user, password for smtp + configForm.notificationSubjectEncoding = ConfigUtil.getString( + NotificationUtil.SUBJECT_ENCODING, "UTF-8"); + configForm.notificationBodyEncoding = ConfigUtil.getString( + NotificationUtil.BODY_ENCODING, "UTF-8"); + configForm.notificationDefaultFromEmail = ConfigUtil.getString( + NotificationUtil.DEFAULT_FROM, "sched****@pal*****"); return "index.jsp"; } @@ -48,6 +60,17 @@ ConfigUtil.init(request); ConfigUtil.setProperty(SchedulerConstants.SCHEDULER_HOLIDAYS, configForm.holidays); + ConfigUtil.setProperty(NotificationUtil.TEMPLATE_ENCODING, + configForm.notificationTemplateEncoding); + ConfigUtil.setProperty(NotificationUtil.SMTP_HOST, + configForm.notificationSmtpHost); + // TODO user, password for smtp + ConfigUtil.setProperty(NotificationUtil.SUBJECT_ENCODING, + configForm.notificationSubjectEncoding); + ConfigUtil.setProperty(NotificationUtil.BODY_ENCODING, + configForm.notificationBodyEncoding); + ConfigUtil.setProperty(NotificationUtil.DEFAULT_FROM, + configForm.notificationDefaultFromEmail); if (configForm.holidays == null) { configForm.holidays = ""; Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/CalendarAction.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/CalendarAction.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/CalendarAction.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -8,11 +8,13 @@ import java.util.List; import java.util.Map; +import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import jp.sf.pal.scheduler.SchedulerConstants; import jp.sf.pal.scheduler.common.util.CalendarUtil; import jp.sf.pal.scheduler.common.util.ConfigUtil; +import jp.sf.pal.scheduler.common.util.VelocityUtil; import jp.sf.pal.scheduler.db.exentity.Facility; import jp.sf.pal.scheduler.db.exentity.FacilityGroup; import jp.sf.pal.scheduler.db.exentity.FacilityScheduleMapping; @@ -23,13 +25,18 @@ import jp.sf.pal.scheduler.service.RepeatScheduleService; import jp.sf.pal.scheduler.util.SchedulerUtil; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.seasar.struts.annotation.ActionForm; import org.seasar.struts.annotation.Execute; +import org.seasar.struts.exception.ActionMessagesException; public class CalendarAction implements Serializable { private static final long serialVersionUID = -222687807313390813L; + private static final Log log = LogFactory.getLog(CalendarAction.class); + public List<Map<String, Object>> calendarDayItems; public List<Map<String, Object>> weekDayItems; @@ -63,6 +70,8 @@ private transient HttpServletRequest request; + private transient ServletContext servletContext; + private String displayFacilityDay() { Calendar cal = calendarForm.getTargetCalendar(); calendarDayItems = SchedulerUtil.createSideCalendar(cal); @@ -419,6 +428,13 @@ @Execute(validator = false, input = "error.jsp") public String index() { ConfigUtil.init(request); + try { + VelocityUtil.init(servletContext); + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException("errors.failed_to_init_velocity", + e); + } return displayFacilityWeek(); } @@ -580,4 +596,12 @@ this.request = request; } + public ServletContext getServletContext() { + return servletContext; + } + + public void setServletContext(ServletContext servletContext) { + this.servletContext = servletContext; + } + } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/OnetimeScheduleAction.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/OnetimeScheduleAction.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/OnetimeScheduleAction.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -27,6 +27,7 @@ import jp.sf.pal.scheduler.pager.OnetimeSchedulePager; import jp.sf.pal.scheduler.service.FacilityGroupService; import jp.sf.pal.scheduler.service.FacilityService; +import jp.sf.pal.scheduler.service.NotificationService; import jp.sf.pal.scheduler.service.OnetimeScheduleService; import jp.sf.pal.scheduler.service.RepeatScheduleService; import jp.sf.pal.scheduler.service.UserInfoService; @@ -61,6 +62,8 @@ private RepeatScheduleService repeatScheduleService; + private NotificationService notificationService; + private UserInfoService userInfoService; private FacilityService facilityService; @@ -290,6 +293,13 @@ try { EventSchedule eventSchedule = createEventSchedule(); onetimeScheduleService.store(eventSchedule); + + if (onetimeScheduleForm.sendEmail) { + notificationService.send(eventSchedule.getCreatedBy(), + eventSchedule, "create-onetime-facility.vm"); + onetimeScheduleForm.sendEmail = false; + } + SAStrutsUtil.addMessage(request, "success.create_eventSchedule"); onetimeScheduleForm.id = String.valueOf(eventSchedule.getId()); @@ -358,6 +368,13 @@ try { EventSchedule eventSchedule = createEventSchedule(); onetimeScheduleService.store(eventSchedule); + + if (onetimeScheduleForm.sendEmail) { + notificationService.send(eventSchedule.getUpdatedBy(), + eventSchedule, "update-onetime-facility.vm"); + onetimeScheduleForm.sendEmail = false; + } + SAStrutsUtil.addMessage(request, "success.update_eventSchedule"); onetimeScheduleForm.mode = CommonConstants.CONFIRM_MODE; @@ -898,4 +915,12 @@ this.repeatScheduleService = repeatScheduleService; } + public NotificationService getNotificationService() { + return notificationService; + } + + public void setNotificationService(NotificationService notificationService) { + this.notificationService = notificationService; + } + } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/RepeatScheduleAction.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/RepeatScheduleAction.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/facility/RepeatScheduleAction.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -27,6 +27,7 @@ import jp.sf.pal.scheduler.pager.RepeatSchedulePager; import jp.sf.pal.scheduler.service.FacilityGroupService; import jp.sf.pal.scheduler.service.FacilityService; +import jp.sf.pal.scheduler.service.NotificationService; import jp.sf.pal.scheduler.service.RepeatScheduleService; import jp.sf.pal.scheduler.service.UserInfoService; import jp.sf.pal.scheduler.util.SchedulerUtil; @@ -57,6 +58,8 @@ private RepeatScheduleService repeatScheduleService; + private NotificationService notificationService; + private UserInfoService userInfoService; private FacilityService facilityService; @@ -283,6 +286,13 @@ try { EventSchedule eventSchedule = createEventSchedule(); repeatScheduleService.store(eventSchedule); + + if (repeatScheduleForm.sendEmail) { + notificationService.send(eventSchedule.getCreatedBy(), + eventSchedule, "create-repeat-facility.vm"); + repeatScheduleForm.sendEmail = false; + } + SAStrutsUtil.addMessage(request, "success.create_eventSchedule"); repeatScheduleForm.id = String.valueOf(eventSchedule.getId()); @@ -327,6 +337,12 @@ eventSchedule.setParentId(prevEventSchedule.getId()); repeatScheduleService.store(eventSchedule); + if (repeatScheduleForm.sendEmail) { + notificationService.send(eventSchedule.getUpdatedBy(), + eventSchedule, "update-repeat-facility.vm"); + repeatScheduleForm.sendEmail = false; + } + SAStrutsUtil.addMessage(request, "success.update_eventSchedule_and_later"); @@ -360,6 +376,13 @@ try { EventSchedule eventSchedule = createEventSchedule(); repeatScheduleService.store(eventSchedule); + + if (repeatScheduleForm.sendEmail) { + notificationService.send(eventSchedule.getUpdatedBy(), + eventSchedule, "update-repeat-facility.vm"); + repeatScheduleForm.sendEmail = false; + } + SAStrutsUtil.addMessage(request, "success.update_eventSchedule"); repeatScheduleForm.mode = CommonConstants.CONFIRM_MODE; @@ -902,4 +925,12 @@ this.facilityGroupService = facilityGroupService; } + public NotificationService getNotificationService() { + return notificationService; + } + + public void setNotificationService(NotificationService notificationService) { + this.notificationService = notificationService; + } + } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/CalendarAction.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/CalendarAction.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/CalendarAction.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -8,11 +8,13 @@ import java.util.List; import java.util.Map; +import javax.servlet.ServletContext; import javax.servlet.http.HttpServletRequest; import jp.sf.pal.scheduler.SchedulerConstants; import jp.sf.pal.scheduler.common.util.CalendarUtil; import jp.sf.pal.scheduler.common.util.ConfigUtil; +import jp.sf.pal.scheduler.common.util.VelocityUtil; import jp.sf.pal.scheduler.db.exentity.EventScheduleMapping; import jp.sf.pal.scheduler.db.exentity.GroupMapping; import jp.sf.pal.scheduler.db.exentity.RoleMapping; @@ -24,13 +26,18 @@ import jp.sf.pal.scheduler.util.SchedulerUtil; import org.apache.commons.lang.StringUtils; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.seasar.struts.annotation.ActionForm; import org.seasar.struts.annotation.Execute; +import org.seasar.struts.exception.ActionMessagesException; public class CalendarAction implements Serializable { private static final long serialVersionUID = -222687807313390813L; + private static final Log log = LogFactory.getLog(CalendarAction.class); + public List<Map<String, Object>> calendarDayItems; public List<Map<String, Object>> weekDayItems; @@ -60,6 +67,8 @@ private transient HttpServletRequest request; + private transient ServletContext servletContext; + private String displayPersonalDay() { Calendar cal = calendarForm.getTargetCalendar(); calendarDayItems = SchedulerUtil.createSideCalendar(cal); @@ -439,6 +448,13 @@ @Execute(validator = false, input = "error.jsp") public String index() { ConfigUtil.init(request); + try { + VelocityUtil.init(servletContext); + } catch (Exception e) { + log.error(e.getMessage(), e); + throw new ActionMessagesException("errors.failed_to_init_velocity", + e); + } return displayPersonalWeek(); } @@ -586,4 +602,12 @@ this.userInfoService = userInfoService; } + public ServletContext getServletContext() { + return servletContext; + } + + public void setServletContext(ServletContext servletContext) { + this.servletContext = servletContext; + } + } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/OnetimeScheduleAction.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/OnetimeScheduleAction.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/OnetimeScheduleAction.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -27,6 +27,7 @@ import jp.sf.pal.scheduler.pager.OnetimeSchedulePager; import jp.sf.pal.scheduler.service.FacilityGroupService; import jp.sf.pal.scheduler.service.FacilityService; +import jp.sf.pal.scheduler.service.NotificationService; import jp.sf.pal.scheduler.service.OnetimeScheduleService; import jp.sf.pal.scheduler.service.RepeatScheduleService; import jp.sf.pal.scheduler.service.UserInfoService; @@ -61,6 +62,8 @@ private RepeatScheduleService repeatScheduleService; + private NotificationService notificationService; + private UserInfoService userInfoService; private FacilityService facilityService; @@ -284,6 +287,13 @@ try { EventSchedule eventSchedule = createEventSchedule(); onetimeScheduleService.store(eventSchedule); + + if (onetimeScheduleForm.sendEmail) { + notificationService.send(eventSchedule.getCreatedBy(), + eventSchedule, "create-onetime-schedule.vm"); + onetimeScheduleForm.sendEmail = false; + } + SAStrutsUtil.addMessage(request, "success.create_eventSchedule"); onetimeScheduleForm.id = String.valueOf(eventSchedule.getId()); @@ -352,6 +362,13 @@ try { EventSchedule eventSchedule = createEventSchedule(); onetimeScheduleService.store(eventSchedule); + + if (onetimeScheduleForm.sendEmail) { + notificationService.send(eventSchedule.getUpdatedBy(), + eventSchedule, "update-onetime-schedule.vm"); + onetimeScheduleForm.sendEmail = false; + } + SAStrutsUtil.addMessage(request, "success.update_eventSchedule"); onetimeScheduleForm.mode = CommonConstants.CONFIRM_MODE; @@ -890,4 +907,12 @@ this.repeatScheduleService = repeatScheduleService; } + public NotificationService getNotificationService() { + return notificationService; + } + + public void setNotificationService(NotificationService notificationService) { + this.notificationService = notificationService; + } + } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/RepeatScheduleAction.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/RepeatScheduleAction.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/action/user/schedule/RepeatScheduleAction.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -27,6 +27,7 @@ import jp.sf.pal.scheduler.pager.RepeatSchedulePager; import jp.sf.pal.scheduler.service.FacilityGroupService; import jp.sf.pal.scheduler.service.FacilityService; +import jp.sf.pal.scheduler.service.NotificationService; import jp.sf.pal.scheduler.service.RepeatScheduleService; import jp.sf.pal.scheduler.service.UserInfoService; import jp.sf.pal.scheduler.util.SchedulerUtil; @@ -57,6 +58,8 @@ private RepeatScheduleService repeatScheduleService; + private NotificationService notificationService; + private UserInfoService userInfoService; private FacilityService facilityService; @@ -276,6 +279,13 @@ try { EventSchedule eventSchedule = createEventSchedule(); repeatScheduleService.store(eventSchedule); + + if (repeatScheduleForm.sendEmail) { + notificationService.send(eventSchedule.getCreatedBy(), + eventSchedule, "create-repeat-schedule.vm"); + repeatScheduleForm.sendEmail = false; + } + SAStrutsUtil.addMessage(request, "success.create_eventSchedule"); repeatScheduleForm.id = String.valueOf(eventSchedule.getId()); @@ -320,6 +330,12 @@ eventSchedule.setParentId(prevEventSchedule.getId()); repeatScheduleService.store(eventSchedule); + if (repeatScheduleForm.sendEmail) { + notificationService.send(eventSchedule.getUpdatedBy(), + eventSchedule, "update-repeat-schedule.vm"); + repeatScheduleForm.sendEmail = false; + } + SAStrutsUtil.addMessage(request, "success.update_eventSchedule_and_later"); @@ -353,6 +369,13 @@ try { EventSchedule eventSchedule = createEventSchedule(); repeatScheduleService.store(eventSchedule); + + if (repeatScheduleForm.sendEmail) { + notificationService.send(eventSchedule.getUpdatedBy(), + eventSchedule, "update-repeat-schedule.vm"); + repeatScheduleForm.sendEmail = false; + } + SAStrutsUtil.addMessage(request, "success.update_eventSchedule"); repeatScheduleForm.mode = CommonConstants.CONFIRM_MODE; @@ -894,4 +917,12 @@ this.facilityGroupService = facilityGroupService; } + public NotificationService getNotificationService() { + return notificationService; + } + + public void setNotificationService(NotificationService notificationService) { + this.notificationService = notificationService; + } + } Added: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/LocaleUtil.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/LocaleUtil.java (rev 0) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/LocaleUtil.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,22 @@ +package jp.sf.pal.scheduler.common.util; + +import java.util.Locale; + +import org.apache.commons.lang.StringUtils; + +public class LocaleUtil { + public static Locale parse(String localeName) { + if (StringUtils.isEmpty(localeName)) { + return null; + } + + String[] localeNames = localeName.split("_"); + if (localeNames.length > 2) { + return new Locale(localeNames[0], localeNames[1], localeNames[2]); + } else if (localeNames.length == 2) { + return new Locale(localeNames[0], localeNames[1]); + } else { + return new Locale(localeNames[0]); + } + } +} Property changes on: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/LocaleUtil.java ___________________________________________________________________ Added: svn:eol-style + native Added: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/NotificationUtil.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/NotificationUtil.java (rev 0) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/NotificationUtil.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,127 @@ +package jp.sf.pal.scheduler.common.util; + +import java.io.StringWriter; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Locale; +import java.util.Map; +import java.util.Properties; + +import javax.mail.Message; +import javax.mail.Session; +import javax.mail.Transport; +import javax.mail.internet.InternetAddress; +import javax.mail.internet.MimeMessage; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; +import org.seasar.struts.exception.ActionMessagesException; + +public class NotificationUtil { + + public static final String TEMPLATE_ENCODING = "notification.template.encoding"; + + public static final String SMTP_HOST = "notification.smtp.host"; + + public static final String SUBJECT_ENCODING = "notification.subject.encoding"; + + public static final String BODY_ENCODING = "notification.body.encoding"; + + public static final String DEFAULT_FROM = "notification.email.from"; + + private static String[] getTemplates(String templateName, Locale locale) { + List<String> templateList = new ArrayList<String>(); + if (locale != null) { + if (locale.getCountry() != null) { + templateList.add("/" + locale.getLanguage() + "/" + + locale.getCountry() + "/" + templateName); + } + templateList.add("/" + locale.getLanguage() + "/" + templateName); + } + templateList.add("/" + templateName); + return templateList.toArray(new String[] {}); + } + + public static void send(String templateName, Locale locale, + String fromEmail, String toEmail, Map<String, Object> paramMap) { + + // set velocity context + VelocityContext context = new VelocityContext(); + for (Map.Entry<String, Object> entry : paramMap.entrySet()) { + context.put(entry.getKey(), entry.getValue()); + } + + StringWriter sw = new StringWriter(); + + // TODO i18n: encoding + Template template = null; + for (String templatePath : getTemplates(templateName, locale)) { + try { + template = VelocityUtil.getTemplate(templatePath, ConfigUtil + .getString(TEMPLATE_ENCODING, "UTF-8")); + } catch (Exception e) { + // nothing + } + if (template != null) { + break; + } + } + + if (template == null) { + throw new ActionMessagesException( + "errors.could_not_find_notification_template", + new Object[] { templateName, locale }); + } + try { + template.merge(context, sw); + } catch (Exception e) { + throw new ActionMessagesException( + "errors.could_not_create_notification_content", e); + } + + String content = sw.toString(); + if (content == null) { + throw new ActionMessagesException( + "errors.empty_notification_content"); + } + + int index = content.indexOf("\n"); + String subject = null; + String body = null; + if (index != -1) { + subject = content.substring(0, index); + body = content.substring(index); + } else { + // TODO should throw exception? + subject = content; + body = content; + } + + try { + Properties props = System.getProperties(); + // set smtp server + props.put("mail.smtp.host", ConfigUtil.getString(SMTP_HOST, + "localhost")); + Session session = Session.getDefaultInstance(props, null); + MimeMessage mimeMessage = new MimeMessage(session); + mimeMessage.setFrom(new InternetAddress(fromEmail)); + mimeMessage.setRecipients(Message.RecipientType.TO, toEmail); + // TODO i18n: encoding + mimeMessage.setSubject(subject, ConfigUtil.getString( + SUBJECT_ENCODING, "UTF-8")); + // TODO i18n: encoding + mimeMessage.setText(body, ConfigUtil.getString(BODY_ENCODING, + "UTF-8")); + mimeMessage.setHeader("Content-Type", "text/plain"); + mimeMessage.setSentDate(new Date()); + + Transport.send(mimeMessage); + } catch (Exception e) { + throw new ActionMessagesException( + "errors.failed_to_send_notification", new Object[] { + fromEmail, toEmail }, e); + } + + } +} Property changes on: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/NotificationUtil.java ___________________________________________________________________ Added: svn:eol-style + native Added: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/VelocityUtil.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/VelocityUtil.java (rev 0) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/VelocityUtil.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,246 @@ +package jp.sf.pal.scheduler.common.util; + +import java.io.IOException; +import java.io.Reader; +import java.io.Writer; +import java.util.Properties; + +import javax.servlet.ServletContext; + +import org.apache.commons.collections.ExtendedProperties; +import org.apache.velocity.Template; +import org.apache.velocity.app.VelocityEngine; +import org.apache.velocity.context.Context; +import org.apache.velocity.exception.MethodInvocationException; +import org.apache.velocity.exception.ParseErrorException; +import org.apache.velocity.exception.ResourceNotFoundException; +import org.apache.velocity.runtime.log.Log; + +public class VelocityUtil { + private static final String DEFAULT_TEMPLATE_PATH = "/WEB-INF/template/"; + + private static VelocityEngine velocityEngine; + + public static void init(ServletContext servletContext) throws Exception { + if (velocityEngine == null) { + velocityEngine = new VelocityEngine(); + + Properties props = new Properties(); + props.setProperty("resource.loader", "FILE"); + props + .setProperty("FILE.resource.loader.class", + "org.apache.velocity.runtime.resource.loader.FileResourceLoader"); + props.setProperty("FILE.resource.loader.cache", "true"); + props.setProperty("FILE.resource.loader.modificationCheckInterval", + "60"); + // TODO move to config file? + props.setProperty("FILE.resource.loader.path", servletContext + .getRealPath(DEFAULT_TEMPLATE_PATH)); + velocityEngine.init(props); + } + } + + /** + * @param key + * @param value + * @see org.apache.velocity.app.VelocityEngine#addProperty(java.lang.String, + * java.lang.Object) + */ + public static void addProperty(String key, Object value) { + velocityEngine.addProperty(key, value); + } + + /** + * @param key + * @see org.apache.velocity.app.VelocityEngine#clearProperty(java.lang.String) + */ + public static void clearProperty(String key) { + velocityEngine.clearProperty(key); + } + + /** + * @param arg0 + * @param arg1 + * @param arg2 + * @param arg3 + * @return + * @throws ParseErrorException + * @throws MethodInvocationException + * @throws ResourceNotFoundException + * @throws IOException + * @see org.apache.velocity.app.VelocityEngine#evaluate(org.apache.velocity.context.Context, + * java.io.Writer, java.lang.String, java.io.Reader) + */ + public static boolean evaluate(Context arg0, Writer arg1, String arg2, + Reader arg3) throws ParseErrorException, MethodInvocationException, + ResourceNotFoundException, IOException { + return velocityEngine.evaluate(arg0, arg1, arg2, arg3); + } + + /** + * @param context + * @param out + * @param logTag + * @param instring + * @return + * @throws ParseErrorException + * @throws MethodInvocationException + * @throws ResourceNotFoundException + * @throws IOException + * @see org.apache.velocity.app.VelocityEngine#evaluate(org.apache.velocity.context.Context, + * java.io.Writer, java.lang.String, java.lang.String) + */ + public static boolean evaluate(Context context, Writer out, String logTag, + String instring) throws ParseErrorException, + MethodInvocationException, ResourceNotFoundException, IOException { + return velocityEngine.evaluate(context, out, logTag, instring); + } + + /** + * @param key + * @return + * @see org.apache.velocity.app.VelocityEngine#getApplicationAttribute(java.lang.Object) + */ + public static Object getApplicationAttribute(Object key) { + return velocityEngine.getApplicationAttribute(key); + } + + /** + * @return + * @see org.apache.velocity.app.VelocityEngine#getLog() + */ + public static Log getLog() { + return velocityEngine.getLog(); + } + + /** + * @param key + * @return + * @see org.apache.velocity.app.VelocityEngine#getProperty(java.lang.String) + */ + public static Object getProperty(String key) { + return velocityEngine.getProperty(key); + } + + /** + * @param name + * @param encoding + * @return + * @throws ResourceNotFoundException + * @throws ParseErrorException + * @throws Exception + * @see org.apache.velocity.app.VelocityEngine#getTemplate(java.lang.String, + * java.lang.String) + */ + public static Template getTemplate(String name, String encoding) + throws ResourceNotFoundException, ParseErrorException, Exception { + return velocityEngine.getTemplate(name, encoding); + } + + /** + * @param name + * @return + * @throws ResourceNotFoundException + * @throws ParseErrorException + * @throws Exception + * @see org.apache.velocity.app.VelocityEngine#getTemplate(java.lang.String) + */ + public static Template getTemplate(String name) + throws ResourceNotFoundException, ParseErrorException, Exception { + return velocityEngine.getTemplate(name); + } + + /** + * @param arg0 + * @param arg1 + * @param arg2 + * @param arg3 + * @param arg4 + * @return + * @throws Exception + * @see org.apache.velocity.app.VelocityEngine#invokeVelocimacro(java.lang.String, + * java.lang.String, java.lang.String[], + * org.apache.velocity.context.Context, java.io.Writer) + */ + public static boolean invokeVelocimacro(String arg0, String arg1, + String[] arg2, Context arg3, Writer arg4) throws Exception { + return velocityEngine.invokeVelocimacro(arg0, arg1, arg2, arg3, arg4); + } + + /** + * @param templateName + * @param context + * @param writer + * @return + * @throws ResourceNotFoundException + * @throws ParseErrorException + * @throws MethodInvocationException + * @throws Exception + * @see org.apache.velocity.app.VelocityEngine#mergeTemplate(java.lang.String, + * org.apache.velocity.context.Context, java.io.Writer) + */ + public static boolean mergeTemplate(String templateName, Context context, + Writer writer) throws ResourceNotFoundException, + ParseErrorException, MethodInvocationException, Exception { + return velocityEngine.mergeTemplate(templateName, context, writer); + } + + /** + * @param templateName + * @param encoding + * @param context + * @param writer + * @return + * @throws ResourceNotFoundException + * @throws ParseErrorException + * @throws MethodInvocationException + * @throws Exception + * @see org.apache.velocity.app.VelocityEngine#mergeTemplate(java.lang.String, + * java.lang.String, org.apache.velocity.context.Context, + * java.io.Writer) + */ + public static boolean mergeTemplate(String templateName, String encoding, + Context context, Writer writer) throws ResourceNotFoundException, + ParseErrorException, MethodInvocationException, Exception { + return velocityEngine.mergeTemplate(templateName, encoding, context, + writer); + } + + /** + * @param resourceName + * @return + * @see org.apache.velocity.app.VelocityEngine#resourceExists(java.lang.String) + */ + public static boolean resourceExists(String resourceName) { + return velocityEngine.resourceExists(resourceName); + } + + /** + * @param key + * @param value + * @see org.apache.velocity.app.VelocityEngine#setApplicationAttribute(java.lang.Object, + * java.lang.Object) + */ + public static void setApplicationAttribute(Object key, Object value) { + velocityEngine.setApplicationAttribute(key, value); + } + + /** + * @param configuration + * @see org.apache.velocity.app.VelocityEngine#setExtendedProperties(org.apache.commons.collections.ExtendedProperties) + */ + public static void setExtendedProperties(ExtendedProperties configuration) { + velocityEngine.setExtendedProperties(configuration); + } + + /** + * @param key + * @param value + * @see org.apache.velocity.app.VelocityEngine#setProperty(java.lang.String, + * java.lang.Object) + */ + public static void setProperty(String key, Object value) { + velocityEngine.setProperty(key, value); + } + +} Property changes on: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/common/util/VelocityUtil.java ___________________________________________________________________ Added: svn:eol-style + native Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/EventSchedule.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/EventSchedule.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/db/exentity/EventSchedule.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -4,6 +4,8 @@ import java.util.LinkedList; import java.util.List; +import jp.sf.pal.scheduler.common.util.DateUtil; + /** * The entity of EVENT_SCHEDULE. * <p> @@ -123,4 +125,73 @@ this.updatedType = updatedType; } + public Integer getStartYear() { + if (getStartDate() != null) { + return DateUtil.getYear(getStartDate()) + 1900; + } + return null; + } + + public Integer getStartMonth() { + if (getStartDate() != null) { + return DateUtil.getMonth(getStartDate()) + 1; + } + return null; + } + + public Integer getStartDayOfMonth() { + if (getStartDate() != null) { + return DateUtil.getDate(getStartDate()); + } + return null; + } + + public Integer getStartHour() { + if (getStartTime() != null) { + return DateUtil.getHours(getStartTime()); + } + return null; + } + + public Integer getStartMinutes() { + if (getStartTime() != null) { + return DateUtil.getMinutes(getStartTime()); + } + return null; + } + + public Integer getEndYear() { + if (getEndDate() != null) { + return DateUtil.getYear(getEndDate()) + 1900; + } + return null; + } + + public Integer getEndMonth() { + if (getEndDate() != null) { + return DateUtil.getMonth(getEndDate()) + 1; + } + return null; + } + + public Integer getEndDayOfMonth() { + if (getEndDate() != null) { + return DateUtil.getDate(getEndDate()); + } + return null; + } + + public Integer getEndHour() { + if (getEndTime() != null) { + return DateUtil.getHours(getEndTime()); + } + return null; + } + + public Integer getEndMinutes() { + if (getEndTime() != null) { + return DateUtil.getMinutes(getEndTime()); + } + return null; + } } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/ConfigForm.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/ConfigForm.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/ConfigForm.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -11,4 +11,19 @@ @Required(target = "update") public String holidays; + @Required(target = "update") + public String notificationTemplateEncoding; + + @Required(target = "update") + public String notificationSmtpHost; + + @Required(target = "update") + public String notificationSubjectEncoding; + + @Required(target = "update") + public String notificationBodyEncoding; + + @Required(target = "update") + public String notificationDefaultFromEmail; + } Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/facility/OnetimeScheduleForm.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/facility/OnetimeScheduleForm.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/facility/OnetimeScheduleForm.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -149,6 +149,8 @@ @IntegerType public String tDate; + public boolean sendEmail; + public void initialize() { id = null; title = null; @@ -205,6 +207,7 @@ selectedFacilities = null; facilityGroupId = null; parentId = null; + sendEmail = false; } public String getStartDate() { Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/facility/RepeatScheduleForm.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/facility/RepeatScheduleForm.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/facility/RepeatScheduleForm.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -149,6 +149,8 @@ @IntegerType public String tDate; + public boolean sendEmail; + public void initialize() { id = null; title = null; @@ -206,6 +208,7 @@ selectedFacilities = null; facilityGroupId = null; parentId = null; + sendEmail = false; } public String getStartDate() { Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/OnetimeScheduleForm.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/OnetimeScheduleForm.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/OnetimeScheduleForm.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -146,6 +146,8 @@ @IntegerType public String tDate; + public boolean sendEmail; + public void initialize() { id = null; title = null; @@ -202,6 +204,7 @@ selectedFacilities = null; facilityGroupId = null; parentId = null; + sendEmail = false; } public String getStartDate() { Modified: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/RepeatScheduleForm.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/RepeatScheduleForm.java 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/form/user/schedule/RepeatScheduleForm.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -143,6 +143,8 @@ @IntegerType public String tDate; + public boolean sendEmail; + public void initialize() { id = null; title = null; @@ -197,6 +199,7 @@ selectedFacilities = null; facilityGroupId = null; parentId = null; + sendEmail = false; } public String getStartDate() { Added: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/NotificationService.java =================================================================== --- scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/NotificationService.java (rev 0) +++ scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/NotificationService.java 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,101 @@ +package jp.sf.pal.scheduler.service; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Locale; +import java.util.Map; + +import org.seasar.struts.exception.ActionMessagesException; + +import jp.sf.pal.scheduler.common.util.ConfigUtil; +import jp.sf.pal.scheduler.common.util.LocaleUtil; +import jp.sf.pal.scheduler.common.util.NotificationUtil; +import jp.sf.pal.scheduler.db.cbean.EventScheduleMappingCB; +import jp.sf.pal.scheduler.db.cbean.UserInfoCB; +import jp.sf.pal.scheduler.db.exbhv.EventScheduleMappingBhv; +import jp.sf.pal.scheduler.db.exbhv.UserInfoBhv; +import jp.sf.pal.scheduler.db.exentity.EventSchedule; +import jp.sf.pal.scheduler.db.exentity.EventScheduleMapping; +import jp.sf.pal.scheduler.db.exentity.UserInfo; + +public class NotificationService { + private EventScheduleMappingBhv eventScheduleMappingBhv; + + private UserInfoBhv userInfoBhv; + + public void send(String fromUserId, EventSchedule eventSchedule, + String templateName) { + if (fromUserId == null) { + throw new ActionMessagesException( + "errors.failed_to_retrieve_userinfo"); + } + EventScheduleMappingCB cb = new EventScheduleMappingCB(); + cb.setupSelect_UserInfo(); + cb.query().queryEventSchedule().setId_Equal(eventSchedule.getId()); + cb.query().queryEventSchedule().setDeletedBy_IsNull(); + List<EventScheduleMapping> esmList = eventScheduleMappingBhv + .selectList(cb); + + if (esmList != null && !esmList.isEmpty()) { + List<UserInfo> userInfoList = new ArrayList<UserInfo>(); + UserInfo fromUserInfo = null; + for (EventScheduleMapping esm : esmList) { + UserInfo userInfo = esm.getUserInfo(); + if (fromUserId.equals(userInfo.getUserId())) { + fromUserInfo = userInfo; + } + userInfoList.add(userInfo); + } + if (fromUserInfo == null) { + UserInfoCB cb1 = new UserInfoCB(); + cb1.query().setUserId_Equal(fromUserId); + cb1.query().setDeletedBy_IsNull(); + fromUserInfo = userInfoBhv.selectEntity(cb1); + if (fromUserInfo == null) { + throw new ActionMessagesException( + "errors.failed_to_retrieve_userinfo"); + } + } + + String fromEmail = fromUserInfo.getEmail(); + if (fromEmail == null) { + fromEmail = ConfigUtil.getString(NotificationUtil.DEFAULT_FROM, + "sched****@pal*****"); + } + for (UserInfo userInfo : userInfoList) { + if (userInfo.getEmail() != null) { + Locale locale = LocaleUtil.parse(userInfo.getLocale()); + if (locale != null) { + locale = Locale.ENGLISH; + } + + Map<String, Object> paramMap = new HashMap<String, Object>(); + paramMap.put("fromUserInfo", fromUserInfo); + paramMap.put("toUserInfo", userInfo); + paramMap.put("event", eventSchedule); + + NotificationUtil.send(templateName, locale, fromEmail, + userInfo.getEmail(), paramMap); + } + } + } + } + + public EventScheduleMappingBhv getEventScheduleMappingBhv() { + return eventScheduleMappingBhv; + } + + public void setEventScheduleMappingBhv( + EventScheduleMappingBhv eventScheduleMappingBhv) { + this.eventScheduleMappingBhv = eventScheduleMappingBhv; + } + + public UserInfoBhv getUserInfoBhv() { + return userInfoBhv; + } + + public void setUserInfoBhv(UserInfoBhv userInfoBhv) { + this.userInfoBhv = userInfoBhv; + } +} Property changes on: scheduler/trunk/src/main/java/jp/sf/pal/scheduler/service/NotificationService.java ___________________________________________________________________ Added: svn:eol-style + native Modified: scheduler/trunk/src/main/resources/application.properties =================================================================== --- scheduler/trunk/src/main/resources/application.properties 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/resources/application.properties 2009-01-23 22:21:45 UTC (rev 1697) @@ -45,7 +45,14 @@ success.movedown_facility=Moved the facility down. success.create_eventSchedule_for_repeat=Updated this event only. success.delete_this_eventSchedule_only=Deleted this event only. +success.update_eventSchedule_and_later=Updated the event and later. +errors.failed_to_init_velocity=Failed to initialize a notification. +errors.could_not_find_notification_template=Could not find a notification template({0}) at {1}. +errors.empty_notification_content=The notification content is empty. +errors.could_not_create_notification_content=Could not create a notification content. +errors.failed_to_send_notification=Failed to send a notification from {0} to {1}. + errors.could_not_find_facilityGroup=Could not find the facility group({0}). errors.failed_to_update_config=Failed to update the configuration. errors.invalid.mode=Invalid mode(expected value is {0}, but it's {1}). @@ -67,6 +74,7 @@ errors.failed_to_movedown_facility=Failed to move the facility down. errors.failed_to_create_eventSchedule_for_repeat=Failed to update this event. errors.failed_to_delete_this_eventSchedule_only=Failed to delete this event. +errors.failed_to_retrieve_userinfo=Failed to retrieve the user info to send email. labels.detail=Detail labels.create=Create @@ -226,4 +234,13 @@ labels.parent_id=Parent ID labels.edit_for_onetime=Edit Only This Day -labels.delete_it_only=Delete Only This Day \ No newline at end of file +labels.delete_it_only=Delete Only This Day +labels.update_it_and_later=Update This Day and Later +labels.email=Email +labels.send_email=Send to Assigned Members +labels.template_encoding=Encoding for Email Template +labels.smtp_host=SMTP Host +labels.subject_encoding=Encoding for Email Subject +labels.body_encoding=Encoding for Email Body +labels.default_from_email=Default Email Address + Modified: scheduler/trunk/src/main/resources/application_ja.properties =================================================================== --- scheduler/trunk/src/main/resources/application_ja.properties 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/resources/application_ja.properties 2009-01-23 22:21:45 UTC (rev 1697) @@ -38,7 +38,14 @@ success.movedown_facility=\u65bd\u8a2d\u3092\u4e0b\u3078\u79fb\u52d5\u3057\u307e\u3057\u305f\u3002 success.create_eventSchedule_for_repeat=\u3053\u306e\u30a4\u30d9\u30f3\u30c8\u3060\u3051\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002 success.delete_this_eventSchedule_only=\u3053\u306e\u30a4\u30d9\u30f3\u30c8\u3060\u3051\u524a\u9664\u3057\u307e\u3057\u305f\u3002 +success.update_eventSchedule_and_later=\u3053\u306e\u30a4\u30d9\u30f3\u30c8\u3068\u4ee5\u964d\u306e\u30a4\u30d9\u30f3\u30c8\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002 +errors.failed_to_init_velocity=\u901a\u77e5\u6a5f\u80fd\u306e\u521d\u671f\u5316\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 +errors.could_not_find_notification_template={1} \u3067\u901a\u77e5\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8({0}) \u304c\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3002 +errors.empty_notification_content=\u901a\u77e5\u5185\u5bb9\u304c\u7a7a\u3067\u3059\u3002 +errors.could_not_create_notification_content=\u901a\u4fe1\u5185\u5bb9\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 +errors.failed_to_send_notification={0} \u304b\u3089 {1} \u3078\u901a\u77e5\u3092\u9001\u4fe1\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 + errors.failed_to_update_config=\u8a2d\u5b9a\u306e\u66f4\u65b0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 errors.invalid.mode=\u30e2\u30fc\u30c9\u304c\u9055\u3044\u307e\u3059\u3002(\u6b63\u3057\u3044\u5024\u306f {0} \u3067\u3059\u304c\u3001\u5165\u529b\u3055\u308c\u305f\u5024\u306f {1} \u306b\u306a\u3063\u3066\u3044\u307e\u3059) errors.failed_to_create_eventSchedule=\u30a4\u30d9\u30f3\u30c8\u306e\u4f5c\u6210\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 @@ -59,6 +66,7 @@ errors.failed_to_movedown_facility=\u65bd\u8a2d\u3092\u4e0b\u3078\u79fb\u52d5\u3059\u308b\u3053\u3068\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 errors.failed_to_create_eventSchedule_for_repeat=\u3053\u306e\u30a4\u30d9\u30f3\u30c8\u306e\u66f4\u65b0\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 errors.failed_to_delete_this_eventSchedule_only=\u3053\u306e\u30a4\u30d9\u30f3\u30c8\u306e\u524a\u9664\u306b\u5931\u6557\u3057\u307e\u3057\u305f\u3002 +errors.failed_to_retrieve_userinfo=\u30e1\u30fc\u30eb\u3092\u9001\u4fe1\u3059\u308b\u305f\u3081\u306e\u30e6\u30fc\u30b6\u30fc\u60c5\u5831\u3092\u53d6\u5f97\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 labels.detail=\u8a73\u7d30 labels.create=\u4f5c\u6210 @@ -117,7 +125,7 @@ labels.privacy=\u30d7\u30e9\u30a4\u30d0\u30b7\u30fc labels.public=\u516c\u958b labels.private=\u975e\u516c\u958b -labels.assigned=\u62c5\u5f53\u8005 +labels.assigned=\u767b\u9332\u8005 labels.name=\u540d\u524d labels.select_facilities=\u65bd\u8a2d\u9078\u629e labels.facility_list=\u65bd\u8a2d\u30ea\u30b9\u30c8 @@ -217,5 +225,13 @@ labels.holiday_format=\u4f8b: YYYY-MM-DD labels.parent_id=\u89aa ID -labels.edit_for_onetime=\u3053\u306e\u65e5\u306e\u307f\u7de8\u96c6 -labels.delete_it_only=\u3053\u306e\u65e5\u306e\u307f\u524a\u9664 \ No newline at end of file +labels.edit_for_onetime=\u3053\u306e\u65e5\u306e\u307f\u3092\u7de8\u96c6 +labels.delete_it_only=\u3053\u306e\u65e5\u306e\u307f\u3092\u524a\u9664 +labels.update_it_and_later=\u3053\u306e\u65e5\u4ee5\u964d\u3092\u66f4\u65b0 +labels.email=\u30e1\u30fc\u30eb +labels.send_email=\u767b\u9332\u8005\u3078\u9001\u4fe1 +labels.template_encoding=\u30e1\u30fc\u30eb\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0 +labels.smtp_host=SMTP \u30db\u30b9\u30c8 +labels.subject_encoding=\u30e1\u30fc\u30eb\u4ef6\u540d\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0 +labels.body_encoding=\u30e1\u30fc\u30eb\u672c\u6587\u306e\u30a8\u30f3\u30b3\u30fc\u30c7\u30a3\u30f3\u30b0 +labels.default_from_email=\u5dee\u51fa\u4eba\u306e\u30c7\u30d5\u30a9\u30eb\u30c8\u30a2\u30c9\u30ec\u30b9 Added: scheduler/trunk/src/main/webapp/WEB-INF/template/create-onetime-facility.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/create-onetime-facility.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/create-onetime-facility.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +SCHEDULE: Create Facility Reservation By ${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} +${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} created a following facility reservation: + +Title: ${event.title} +Start Date: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +End Date: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +Schedule System Added: scheduler/trunk/src/main/webapp/WEB-INF/template/create-onetime-schedule.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/create-onetime-schedule.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/create-onetime-schedule.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +SCHEDULE: Create Schedule By ${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} +${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} created a following schedule: + +Title: ${event.title} +Start Date: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +End Date: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +Schedule System Added: scheduler/trunk/src/main/webapp/WEB-INF/template/create-repeat-facility.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/create-repeat-facility.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/create-repeat-facility.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +SCHEDULE: Create Facility Reservation By ${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} +${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} created a following facility reservation: + +Title: ${event.title} +Start Date: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +End Date: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +Schedule System Added: scheduler/trunk/src/main/webapp/WEB-INF/template/create-repeat-schedule.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/create-repeat-schedule.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/create-repeat-schedule.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +SCHEDULE: Create Schedule By ${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} +${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} created a following schedule: + +Title: ${event.title} +Start Date: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +End Date: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +Schedule System Added: scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-onetime-facility.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-onetime-facility.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-onetime-facility.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +[施設]: 施設予約登録 (${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0}) +${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0} さんは以下の施設予約を登録しました。 + +タイトル: ${event.title} +開始日時: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +終了日時: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +スケジュール予約システム Added: scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-onetime-schedule.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-onetime-schedule.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-onetime-schedule.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +[予定] スケジュール登録 (${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0}) +${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0} さんは以下のスケジュールを登録しました。 + +タイトル: ${event.title} +開始日時: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +終了日時: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +スケジュール予約システム Added: scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-repeat-facility.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-repeat-facility.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-repeat-facility.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +[施設]: 施設予約登録 (${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0}) +${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} さんは以下の施設予約を登録しました。 + +タイトル: ${event.title} +開始日時: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +終了日時: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +スケジュール予約システム Added: scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-repeat-schedule.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-repeat-schedule.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/ja/create-repeat-schedule.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +[予定] スケジュール登録 (${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0}) +${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0} さんは以下のスケジュールを登録しました。 + +タイトル: ${event.title} +開始日時: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +終了日時: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +スケジュール予約システム Added: scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-onetime-facility.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-onetime-facility.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-onetime-facility.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +[施設]: 施設予約更新 (${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0}) +${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} さんは以下の施設予約を更新しました。 + +タイトル: ${event.title} +開始日時: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +終了日時: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +スケジュール予約システム Added: scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-onetime-schedule.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-onetime-schedule.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-onetime-schedule.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +[予定] スケジュール更新 (${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0}) +${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0} さんは以下のスケジュールを更新しました。 + +タイトル: ${event.title} +開始日時: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +終了日時: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +スケジュール予約システム Added: scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-repeat-facility.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-repeat-facility.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-repeat-facility.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +[施設]: 施設予約更新 (${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0}) +${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} さんは以下の施設予約を更新しました。 + +タイトル: ${event.title} +開始日時: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +終了日時: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +スケジュール予約システム Added: scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-repeat-schedule.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-repeat-schedule.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/ja/update-repeat-schedule.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +[予定] スケジュール更新 (${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0}) +${fromUserInfo.nameArg1} ${fromUserInfo.nameArg0} さんは以下のスケジュールを更新しました。 + +タイトル: ${event.title} +開始日時: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +終了日時: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +スケジュール予約システム Added: scheduler/trunk/src/main/webapp/WEB-INF/template/update-onetime-facility.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/update-onetime-facility.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/update-onetime-facility.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +SCHEDULE: Update Facility Reservation By ${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} +${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} updated a following facility reservation: + +Title: ${event.title} +Start Date: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +End Date: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +Schedule System Added: scheduler/trunk/src/main/webapp/WEB-INF/template/update-onetime-schedule.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/update-onetime-schedule.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/update-onetime-schedule.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +SCHEDULE: Update Schedule By ${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} +${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} updated a following schedule: + +Title: ${event.title} +Start Date: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +End Date: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +Schedule System Added: scheduler/trunk/src/main/webapp/WEB-INF/template/update-repeat-facility.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/update-repeat-facility.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/update-repeat-facility.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +SCHEDULE: Update Facility Reservation By ${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} +${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} updated a following facility reservation: + +Title: ${event.title} +Start Date: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +End Date: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +Schedule System Added: scheduler/trunk/src/main/webapp/WEB-INF/template/update-repeat-schedule.vm =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/template/update-repeat-schedule.vm (rev 0) +++ scheduler/trunk/src/main/webapp/WEB-INF/template/update-repeat-schedule.vm 2009-01-23 22:21:45 UTC (rev 1697) @@ -0,0 +1,10 @@ +SCHEDULE: Update Schedule By ${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} +${fromUserInfo.nameArg0} ${fromUserInfo.nameArg1} updated a following schedule: + +Title: ${event.title} +Start Date: #if(${event.startDate})${event.startYear}/${event.startMonth}/${event.startDayOfMonth}#end #if(${event.startTime})${event.startHour}:${event.startMinutes}#end + +End Date: #if(${event.EndDate})${event.EndYear}/${event.EndMonth}/${event.EndDayOfMonth}#end #if(${event.EndTime})${event.EndHour}:${event.EndMinutes}#end + + +Schedule System Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/config/index.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/config/index.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/config/index.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -28,11 +28,31 @@ <caption><bean:message key="labels.config"/></caption> <tbody> <tr> - <th><bean:message key="labels.holiday_list"/></th> - <td><html:textarea property="holidays" cols="10" rows="5"/> + <th style="width: 100px;"><bean:message key="labels.holiday_list"/></th> + <td style="width: 200px;"><html:textarea property="holidays" cols="10" rows="5" style="width:100%;"/> <br/><bean:message key="labels.holiday_format"/> </td> </tr> + <tr> + <th><bean:message key="labels.template_encoding"/></th> + <td><html:text property="notificationTemplateEncoding" /></td> + </tr> + <tr> + <th><bean:message key="labels.smtp_host"/></th> + <td><html:text property="notificationSmtpHost" /></td> + </tr> + <tr> + <th><bean:message key="labels.subject_encoding"/></th> + <td><html:text property="notificationSubjectEncoding" /></td> + </tr> + <tr> + <th><bean:message key="labels.body_encoding"/></th> + <td><html:text property="notificationBodyEncoding" /></td> + </tr> + <tr> + <th><bean:message key="labels.default_from_email"/></th> + <td><html:text property="notificationDefaultFromEmail" /></td> + </tr> </tbody> <tfoot> <tr> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/confirm.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/confirm.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/confirm.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -52,6 +52,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> + <html:hidden property="sendEmail"/> <div class="form-table" style="margin-top:3px;"> <table style="width: 400px;"> <caption><bean:message key="labels.confirmation_of_event"/></caption> @@ -135,6 +136,12 @@ </html:select> </td> </tr> +<c:if test="${sendEmail}"> + <tr> + <th><bean:message key="labels.email"/></th> + <td><bean:message key="labels.send_email"/></td> + </tr> +</c:if> </tbody> <c:if test="${editable}"> <tfoot> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/edit.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/edit.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/edit.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -216,6 +216,10 @@ </html:select> </td> </tr> + <tr> + <th><bean:message key="labels.email"/></th> + <td><html:checkbox property="sendEmail"/><bean:message key="labels.send_email"/></td> + </tr> </tbody> <tfoot> <tr> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/facilitylist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/facilitylist.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/facilitylist.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -61,6 +61,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> +<html:hidden property="sendEmail"/> <html:select property="selectedUsers" multiple="true" style="display:none;"> <c:forEach var="u" varStatus="s" items="${selectedUserItems}"> <html:option value="${f:u(u.userId)}">${f:u(u.userId)}</html:option> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/userlist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/userlist.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/onetimeSchedule/userlist.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -61,6 +61,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> +<html:hidden property="sendEmail"/> <html:select property="selectedFacilities" multiple="true" style="display:none;"> <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> <html:option value="${f:u(f.id)}">${f:u(u.id)}</html:option> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/confirm.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/confirm.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/confirm.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -52,6 +52,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> + <html:hidden property="sendEmail"/> <div class="form-table" style="margin-top:3px;"> <table style="width: 400px;"> <caption><bean:message key="labels.confirmation_of_event"/></caption> @@ -148,6 +149,12 @@ </html:select> </td> </tr> +<c:if test="${sendEmail}"> + <tr> + <th><bean:message key="labels.email"/></th> + <td><bean:message key="labels.send_email"/></td> + </tr> +</c:if> </tbody> <c:if test="${editable}"> <tfoot> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/edit.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/edit.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/edit.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -233,6 +233,10 @@ </html:select> </td> </tr> + <tr> + <th><bean:message key="labels.email"/></th> + <td><html:checkbox property="sendEmail"/><bean:message key="labels.send_email"/></td> + </tr> </tbody> <tfoot> <tr> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/facilitylist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/facilitylist.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/facilitylist.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -61,6 +61,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> +<html:hidden property="sendEmail"/> <html:select property="selectedUsers" multiple="true" style="display:none;"> <c:forEach var="u" varStatus="s" items="${selectedUserItems}"> <html:option value="${f:u(u.userId)}">${f:u(u.userId)}</html:option> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/userlist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/userlist.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/facility/repeatSchedule/userlist.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -62,6 +62,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> +<html:hidden property="sendEmail"/> <html:select property="selectedFacilities" multiple="true" style="display:none;"> <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> <html:option value="${f:u(f.id)}">${f:u(u.id)}</html:option> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/confirm.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/confirm.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/confirm.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -51,6 +51,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> + <html:hidden property="sendEmail"/> <div class="form-table" style="margin-top:3px;"> <table style="width: 400px;"> <caption><bean:message key="labels.confirmation_of_event"/></caption> @@ -134,6 +135,12 @@ </html:select> </td> </tr> +<c:if test="${sendEmail}"> + <tr> + <th><bean:message key="labels.email"/></th> + <td><bean:message key="labels.send_email"/></td> + </tr> +</c:if> </tbody> <c:if test="${editable}"> <tfoot> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/edit.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/edit.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/edit.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -215,6 +215,10 @@ </html:select> </td> </tr> + <tr> + <th><bean:message key="labels.email"/></th> + <td><html:checkbox property="sendEmail"/><bean:message key="labels.send_email"/></td> + </tr> </tbody> <tfoot> <tr> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/facilitylist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/facilitylist.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/facilitylist.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -60,6 +60,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> +<html:hidden property="sendEmail"/> <html:select property="selectedUsers" multiple="true" style="display:none;"> <c:forEach var="u" varStatus="s" items="${selectedUserItems}"> <html:option value="${f:u(u.userId)}">${f:u(u.userId)}</html:option> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/userlist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/userlist.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/onetimeSchedule/userlist.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -60,6 +60,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> +<html:hidden property="sendEmail"/> <html:select property="selectedFacilities" multiple="true" style="display:none;"> <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> <html:option value="${f:u(f.id)}">${f:u(u.id)}</html:option> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/confirm.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/confirm.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/confirm.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -51,6 +51,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> + <html:hidden property="sendEmail"/> <div class="form-table" style="margin-top:3px;"> <table style="width: 400px;"> <caption><bean:message key="labels.confirmation_of_event"/></caption> @@ -147,6 +148,12 @@ </html:select> </td> </tr> +<c:if test="${sendEmail}"> + <tr> + <th><bean:message key="labels.email"/></th> + <td><bean:message key="labels.send_email"/></td> + </tr> +</c:if> </tbody> <c:if test="${editable}"> <tfoot> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/edit.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/edit.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/edit.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -232,6 +232,10 @@ </html:select> </td> </tr> + <tr> + <th><bean:message key="labels.email"/></th> + <td><html:checkbox property="sendEmail"/><bean:message key="labels.send_email"/></td> + </tr> </tbody> <tfoot> <tr> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/facilitylist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/facilitylist.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/facilitylist.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -60,6 +60,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> +<html:hidden property="sendEmail"/> <html:select property="selectedUsers" multiple="true" style="display:none;"> <c:forEach var="u" varStatus="s" items="${selectedUserItems}"> <html:option value="${f:u(u.userId)}">${f:u(u.userId)}</html:option> Modified: scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/userlist.jsp =================================================================== --- scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/userlist.jsp 2009-01-21 08:54:55 UTC (rev 1696) +++ scheduler/trunk/src/main/webapp/WEB-INF/view/user/schedule/repeatSchedule/userlist.jsp 2009-01-23 22:21:45 UTC (rev 1697) @@ -61,6 +61,7 @@ <html:hidden property="tYear"/> <html:hidden property="tMonth"/> <html:hidden property="tDate"/> +<html:hidden property="sendEmail"/> <html:select property="selectedFacilities" multiple="true" style="display:none;"> <c:forEach var="f" varStatus="s" items="${selectedFacilityItems}"> <html:option value="${f:u(f.id)}">${f:u(u.id)}</html:option>