From 957e62ce77e23d31d59f9369657e91a9dd616c84 Mon Sep 17 00:00:00 2001 From: Evgeny Mandrikov Date: Thu, 21 Jul 2011 11:45:41 +0400 Subject: SONAR-2607 Provide email notifications on review changes * Add email templates. * Add server component - UserFinder. --- .../org/sonar/api/notifications/Notification.java | 4 +-- .../java/org/sonar/api/security/UserFinder.java | 32 ++++++++++++++++++++++ 2 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 sonar-plugin-api/src/main/java/org/sonar/api/security/UserFinder.java (limited to 'sonar-plugin-api') diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/notifications/Notification.java b/sonar-plugin-api/src/main/java/org/sonar/api/notifications/Notification.java index 8ec915cb0d0..5547acae2bc 100644 --- a/sonar-plugin-api/src/main/java/org/sonar/api/notifications/Notification.java +++ b/sonar-plugin-api/src/main/java/org/sonar/api/notifications/Notification.java @@ -24,7 +24,7 @@ import org.apache.commons.lang.builder.ReflectionToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import java.io.Serializable; -import java.util.Map; +import java.util.HashMap; /** * @since 2.10 @@ -33,7 +33,7 @@ public class Notification implements Serializable { private String type; - private Map fields = Maps.newHashMap(); + private HashMap fields = Maps.newHashMap(); // NOSONAR false-positive due to serialization : usage of HashMap instead of Map public Notification(String type) { this.type = type; diff --git a/sonar-plugin-api/src/main/java/org/sonar/api/security/UserFinder.java b/sonar-plugin-api/src/main/java/org/sonar/api/security/UserFinder.java new file mode 100644 index 00000000000..3f283ff504e --- /dev/null +++ b/sonar-plugin-api/src/main/java/org/sonar/api/security/UserFinder.java @@ -0,0 +1,32 @@ +/* + * Sonar, open source software quality management tool. + * Copyright (C) 2008-2011 SonarSource + * mailto:contact AT sonarsource DOT com + * + * Sonar is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 3 of the License, or (at your option) any later version. + * + * Sonar is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with Sonar; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02 + */ +package org.sonar.api.security; + +import org.sonar.api.ServerComponent; +import org.sonar.api.database.model.User; + +/** + * @since 2.10 + */ +public interface UserFinder extends ServerComponent { + + User findByLogin(String login); + +} -- cgit v1.2.3