@Test public void testAccessTemplateForApp() { links.add("https: String msg = textProcessor.getMessage(appName, UserInfo.Username.valueOf("Jabb0r"), EmailLinksList.withEmailLinksList(links).build()); assertTrue(StringUtils.containsIgnoreCase(msg, appName.toString())); assertTrue(StringUtils.containsIgnoreCase(msg, "Jabb0r")); }
@Override public String getMessage(Application.Name app, UserInfo.Username username, EmailLinksList links) { ST appAccess = new ST(APP_ACCESS); Map<String, String> variables = new HashMap<>(); put(variables, APPLICATION_NAME, String.valueOf(app)); put(variables, USER_NAME, String.valueOf(username)); put(variables, EMAIL_LINKS, links.toString()); return replaceVariablesInTemplate(variables, appAccess); }
EmailTextProcessorImpl implements EmailTextProcessor { @Override public String getMessage(Application.Name app, UserInfo.Username username, EmailLinksList links) { ST appAccess = new ST(APP_ACCESS); Map<String, String> variables = new HashMap<>(); put(variables, APPLICATION_NAME, String.valueOf(app)); put(variables, USER_NAME, String.valueOf(username)); put(variables, EMAIL_LINKS, links.toString()); return replaceVariablesInTemplate(variables, appAccess); } }
EmailTextProcessorImpl implements EmailTextProcessor { @Override public String getMessage(Application.Name app, UserInfo.Username username, EmailLinksList links) { ST appAccess = new ST(APP_ACCESS); Map<String, String> variables = new HashMap<>(); put(variables, APPLICATION_NAME, String.valueOf(app)); put(variables, USER_NAME, String.valueOf(username)); put(variables, EMAIL_LINKS, links.toString()); return replaceVariablesInTemplate(variables, appAccess); } @Inject  EmailTextProcessorImpl(final AuthorizationRepository authorizationRepository); }
EmailTextProcessorImpl implements EmailTextProcessor { @Override public String getMessage(Application.Name app, UserInfo.Username username, EmailLinksList links) { ST appAccess = new ST(APP_ACCESS); Map<String, String> variables = new HashMap<>(); put(variables, APPLICATION_NAME, String.valueOf(app)); put(variables, USER_NAME, String.valueOf(username)); put(variables, EMAIL_LINKS, links.toString()); return replaceVariablesInTemplate(variables, appAccess); } @Inject  EmailTextProcessorImpl(final AuthorizationRepository authorizationRepository); @Override Set<String> getAddressees(EventLogEvent event); @Override Set<String> getAddressees(Application.Name app); @Override String getMessage(Application.Name app, UserInfo.Username username, EmailLinksList links); @Override String getSubject(Application.Name app); @Override String getSubject(EventLogEvent event); @Override String getMessage(EventLogEvent event); }
EmailTextProcessorImpl implements EmailTextProcessor { @Override public String getMessage(Application.Name app, UserInfo.Username username, EmailLinksList links) { ST appAccess = new ST(APP_ACCESS); Map<String, String> variables = new HashMap<>(); put(variables, APPLICATION_NAME, String.valueOf(app)); put(variables, USER_NAME, String.valueOf(username)); put(variables, EMAIL_LINKS, links.toString()); return replaceVariablesInTemplate(variables, appAccess); } @Inject  EmailTextProcessorImpl(final AuthorizationRepository authorizationRepository); @Override Set<String> getAddressees(EventLogEvent event); @Override Set<String> getAddressees(Application.Name app); @Override String getMessage(Application.Name app, UserInfo.Username username, EmailLinksList links); @Override String getSubject(Application.Name app); @Override String getSubject(EventLogEvent event); @Override String getMessage(EventLogEvent event);  }