1 package org.tigris.scarab.screens.entry; 2 3 48 49 import org.apache.turbine.RunData; 51 import org.apache.turbine.TemplateContext; 52 53 import org.tigris.scarab.tools.ScarabRequestTool; 55 import org.tigris.scarab.tools.ScarabLocalizationTool; 56 import org.tigris.scarab.screens.Default; 57 import org.tigris.scarab.om.Issue; 58 import org.tigris.scarab.om.IssueType; 59 import org.tigris.scarab.om.RModuleIssueType; 60 import org.tigris.scarab.util.Log; 61 62 68 public class Wizard1 extends Default 69 { 70 protected String getTitle(ScarabRequestTool scarabR, 71 ScarabLocalizationTool l10n, 72 RunData data, TemplateContext context) 73 throws Exception 74 { 75 Issue newIssue = scarabR.getReportingIssue(); 76 IssueType issueType = newIssue.getIssueType(); 77 RModuleIssueType rmit = newIssue.getModule() 78 .getRModuleIssueType(issueType); 79 String name; 80 if (rmit == null) 81 { 82 name = issueType.getName(); 83 Log.get().warn("Used global name of issueType, " + name + 84 ", but the module version should be available."); 85 } 86 else 87 { 88 name = rmit.getDisplayName(); 89 } 90 91 return l10n.format("EnterNewIssueType", name); 92 } 93 } 94 | Popular Tags |