diff options
author | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-07-21 11:45:41 +0400 |
---|---|---|
committer | Evgeny Mandrikov <mandrikov@gmail.com> | 2011-07-22 18:52:15 +0400 |
commit | 957e62ce77e23d31d59f9369657e91a9dd616c84 (patch) | |
tree | b78bf8831d41c82fa34cd071a3783f756f08d745 /sonar-plugin-api | |
parent | e0e528211faad3fdf469c83bcbc7aecf6c25a234 (diff) | |
download | sonarqube-957e62ce77e23d31d59f9369657e91a9dd616c84.tar.gz sonarqube-957e62ce77e23d31d59f9369657e91a9dd616c84.zip |
SONAR-2607 Provide email notifications on review changes
* Add email templates.
* Add server component - UserFinder.
Diffstat (limited to 'sonar-plugin-api')
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/notifications/Notification.java | 4 | ||||
-rw-r--r-- | sonar-plugin-api/src/main/java/org/sonar/api/security/UserFinder.java | 32 |
2 files changed, 34 insertions, 2 deletions
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<String, String> fields = Maps.newHashMap(); + private HashMap<String, String> 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); + +} |