From 4f810483e5481321af338210c840cfb4e92e76e2 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Fri, 23 Nov 2012 18:33:52 +0000 Subject: [PATCH] user manager now returns a description key to be able to customize label on ui side git-svn-id: https://svn.apache.org/repos/asf/archiva/redback/redback-core/trunk@1413019 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/archiva/redback/users/UserManager.java | 6 ++++++ .../archiva/redback/users/cached/CachedUserManager.java | 5 +++++ .../redback/users/configurable/ConfigurableUserManager.java | 5 +++++ .../apache/archiva/redback/users/jdo/JdoUserManager.java | 5 +++++ .../apache/archiva/redback/users/ldap/LdapUserManager.java | 5 +++++ .../archiva/redback/users/memory/MemoryUserManager.java | 5 +++++ 6 files changed, 31 insertions(+) diff --git a/redback-users/redback-users-api/src/main/java/org/apache/archiva/redback/users/UserManager.java b/redback-users/redback-users-api/src/main/java/org/apache/archiva/redback/users/UserManager.java index 054a09e6..c5f94a03 100644 --- a/redback-users/redback-users-api/src/main/java/org/apache/archiva/redback/users/UserManager.java +++ b/redback-users/redback-users-api/src/main/java/org/apache/archiva/redback/users/UserManager.java @@ -212,4 +212,10 @@ public interface UserManager * @return true if this implementation is a final one and not a wrapper (configurable, cached) */ boolean isFinalImplementation(); + + /** + * @since 2.1 + * @return a key to be able to customize label in UI + */ + String getDescriptionKey(); } diff --git a/redback-users/redback-users-providers/redback-users-cached/src/main/java/org/apache/archiva/redback/users/cached/CachedUserManager.java b/redback-users/redback-users-providers/redback-users-cached/src/main/java/org/apache/archiva/redback/users/cached/CachedUserManager.java index 890841a6..6c3fc345 100644 --- a/redback-users/redback-users-providers/redback-users-cached/src/main/java/org/apache/archiva/redback/users/cached/CachedUserManager.java +++ b/redback-users/redback-users-providers/redback-users-cached/src/main/java/org/apache/archiva/redback/users/cached/CachedUserManager.java @@ -328,4 +328,9 @@ public class CachedUserManager { return false; } + + public String getDescriptionKey() + { + return "archiva.redback.usermanager.cached"; + } } diff --git a/redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/apache/archiva/redback/users/configurable/ConfigurableUserManager.java b/redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/apache/archiva/redback/users/configurable/ConfigurableUserManager.java index 54851a89..beee4dd8 100644 --- a/redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/apache/archiva/redback/users/configurable/ConfigurableUserManager.java +++ b/redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/apache/archiva/redback/users/configurable/ConfigurableUserManager.java @@ -182,4 +182,9 @@ public class ConfigurableUserManager { this.userManagerImpl = userManagerImpl; } + + public String getDescriptionKey() + { + return "archiva.redback.usermanager.configurable"; + } } diff --git a/redback-users/redback-users-providers/redback-users-jdo/src/main/java/org/apache/archiva/redback/users/jdo/JdoUserManager.java b/redback-users/redback-users-providers/redback-users-jdo/src/main/java/org/apache/archiva/redback/users/jdo/JdoUserManager.java index a334b4d6..526c356f 100644 --- a/redback-users/redback-users-providers/redback-users-jdo/src/main/java/org/apache/archiva/redback/users/jdo/JdoUserManager.java +++ b/redback-users/redback-users-providers/redback-users-jdo/src/main/java/org/apache/archiva/redback/users/jdo/JdoUserManager.java @@ -490,4 +490,9 @@ public class JdoUserManager { return true; } + + public String getDescriptionKey() + { + return "archiva.redback.usermanager.jdo"; + } } diff --git a/redback-users/redback-users-providers/redback-users-ldap/src/main/java/org/apache/archiva/redback/users/ldap/LdapUserManager.java b/redback-users/redback-users-providers/redback-users-ldap/src/main/java/org/apache/archiva/redback/users/ldap/LdapUserManager.java index 8bbd23f5..c069eddf 100644 --- a/redback-users/redback-users-providers/redback-users-ldap/src/main/java/org/apache/archiva/redback/users/ldap/LdapUserManager.java +++ b/redback-users/redback-users-providers/redback-users-ldap/src/main/java/org/apache/archiva/redback/users/ldap/LdapUserManager.java @@ -505,4 +505,9 @@ public class LdapUserManager { return true; } + + public String getDescriptionKey() + { + return "archiva.redback.usermanager.ldap"; + } } diff --git a/redback-users/redback-users-providers/redback-users-memory/src/main/java/org/apache/archiva/redback/users/memory/MemoryUserManager.java b/redback-users/redback-users-providers/redback-users-memory/src/main/java/org/apache/archiva/redback/users/memory/MemoryUserManager.java index 3bf7d6ea..61861e12 100644 --- a/redback-users/redback-users-providers/redback-users-memory/src/main/java/org/apache/archiva/redback/users/memory/MemoryUserManager.java +++ b/redback-users/redback-users-providers/redback-users-memory/src/main/java/org/apache/archiva/redback/users/memory/MemoryUserManager.java @@ -314,4 +314,9 @@ public class MemoryUserManager hasTriggeredInit = true; } } + + public String getDescriptionKey() + { + return "archiva.redback.usermanager.memory"; + } }