1 package org.tigris.scarab.util; 2 3 48 49 import org.apache.fulcrum.template.DefaultTemplateContext; 50 51 import org.tigris.scarab.om.Issue; 52 import org.tigris.scarab.om.ScarabUser; 53 import org.tigris.scarab.om.Module; 54 import org.tigris.scarab.tools.ScarabGlobalTool; 55 import org.tigris.scarab.tools.ScarabLocalizationTool; 56 57 63 public class EmailContext 64 extends DefaultTemplateContext 65 { 66 private String subjectTemplate; 67 68 public EmailContext() 69 { 70 put("scarabG", new ScarabGlobalTool()); 71 } 72 73 public void setLocalizationTool(ScarabLocalizationTool l10n) 74 { 75 put("l10n", l10n); 76 } 77 78 public void setLinkTool(Object link) 79 { 80 put("link", link); 81 } 82 83 public void setUser(ScarabUser user) 84 { 85 put("user", user); 86 } 87 88 public void setIssue(Issue issue) 89 { 90 put("issue", issue); 91 } 92 93 public void setModule(Module module) 94 { 95 put("module", module); 96 } 97 98 public void setDefaultTextKey(String defaultTextKey) 99 { 100 put("defaultTextKey", defaultTextKey); 101 } 102 103 public void setSubjectTemplate(String subjectTemplate) 104 { 105 this.subjectTemplate = subjectTemplate; 106 } 107 108 public String getSubjectTemplate() 109 { 110 return subjectTemplate; 111 } 112 } 113 | Popular Tags |