You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@archiva.apache.org by ol...@apache.org on 2012/04/06 11:59:32 UTC

svn commit: r1310268 [39/42] - in /archiva/redback/redback-core/trunk: ./ redback-authentication/ redback-authentication/redback-authentication-api/ redback-authentication/redback-authentication-api/src/ redback-authentication/redback-authentication-ap...

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/Messages.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/Messages.java?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/Messages.java (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/Messages.java Fri Apr  6 09:58:14 2012
@@ -0,0 +1,91 @@
+package org.codehaus.plexus.redback.users;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+/**
+ * Localized Message Handling.
+ * 
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class Messages
+{
+    private static final String BUNDLE_NAME = "org.codehaus.plexus.redback.users.messages"; //$NON-NLS-1$
+
+    private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle.getBundle( BUNDLE_NAME );
+
+    /**
+     * Get a Message as-is from the Resource Bundle.
+     * 
+     * @param key the key for the message to get.
+     * @return the value of the key, or "!key!" if the key is not found.
+     */
+    public static String getString( String key )
+    {
+        try
+        {
+            return RESOURCE_BUNDLE.getString( key );
+        }
+        catch ( MissingResourceException e )
+        {
+            return '!' + key + '!';
+        }
+    }
+
+    /**
+     * Gets a Message from the Resource Bundle, with {1} and {2} style arguments.
+     * 
+     * @param key the key for the message to get.
+     * @param arg the argument to pass in.
+     * @return the value of the key, or "!key!" if the key is not found.
+     */
+    public static String getString( String key, Object arg )
+    {
+        return getString( key, new Object[] { arg } );
+    }
+
+    /**
+     * Gets a Message from the Resource Bundle, with {1} and {2} style arguments.
+     * 
+     * @param key the key for the message to get.
+     * @param args the arguments to pass in.
+     * @return the value of the key, or "!key!" if the key is not found.
+     */
+    public static String getString( String key, Object args[] )
+    {
+        try
+        {
+            String pattern = RESOURCE_BUNDLE.getString( key );
+            return MessageFormat.format( pattern, args );
+        }
+        catch ( MissingResourceException e )
+        {
+            return '!' + key + '!';
+        }
+    }
+
+    /**
+     * Prevent Instantiation.
+     */
+    private Messages()
+    {
+    }
+}

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/Messages.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/Messages.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/PermanentUserException.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/PermanentUserException.java?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/PermanentUserException.java (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/PermanentUserException.java Fri Apr  6 09:58:14 2012
@@ -0,0 +1,49 @@
+package org.codehaus.plexus.redback.users;
+
+/*
+ * Copyright 2001-2006 The Codehaus.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * PermanentUserException - tossed when a forbidden action against a permanent user
+ * occurs. 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class PermanentUserException
+    extends UserManagerException
+{
+
+    public PermanentUserException()
+    {
+        super();
+    }
+
+    public PermanentUserException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+
+    public PermanentUserException( String message )
+    {
+        super( message );
+    }
+
+    public PermanentUserException( Throwable cause )
+    {
+        super( cause );
+    }
+}

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/PermanentUserException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/PermanentUserException.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/User.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/User.java?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/User.java (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/User.java Fri Apr  6 09:58:14 2012
@@ -0,0 +1,298 @@
+package org.codehaus.plexus.redback.users;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * The User Object.
+ *
+ * @author Jason van Zyl
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ */
+public interface User
+    extends Serializable
+{
+
+    /**
+     * This is the object used to track the user within the provider.
+     *
+     * @return the principal for this user.
+     */
+    Object getPrincipal();
+
+    // --------------------------------------------------------------------
+    // Standard User Requirements.
+    // --------------------------------------------------------------------
+
+    /**
+     * Gets the User Name for this user.
+     * <p/>
+     * This field is required, and should never be empty.
+     *
+     * @return the user name.
+     */
+    String getUsername();
+
+    /**
+     * Sets the User Name for this user.
+     * <p/>
+     * This field is required, and should never be empty.
+     *
+     * @param name the user name.
+     */
+    void setUsername( String name );
+
+    /**
+     * Gets the Full Name for this user.
+     * <p/>
+     * This field is required, and should never be empty.
+     *
+     * @return the full name.
+     */
+    String getFullName();
+
+    /**
+     * Sets the Full Name for this user.
+     * <p/>
+     * This field is required, and should never be empty.
+     *
+     * @param name the full name.
+     */
+    void setFullName( String name );
+
+    /**
+     * Gets the email address for this user.
+     * <p/>
+     * This field is required, and should never be empty.
+     *
+     * @return the email address.
+     */
+    String getEmail();
+
+    /**
+     * Sets the email address for this user.
+     * <p/>
+     * This field is required, and should never be empty.
+     *
+     * @param address the email address.
+     */
+    void setEmail( String address );
+
+    // --------------------------------------------------------------------
+    // Password Requirements.
+    // --------------------------------------------------------------------
+
+    /**
+     * Gets the Raw (unencoded) Password.
+     * Used only on password change requests.
+     * <p/>
+     * <p>
+     * <b>Notes for User Providers</b>
+     * </p>
+     * <ol>
+     * <li>
+     * Providers need to look for a value in here to indicate if the user is
+     * intending to change their password.
+     * </li>
+     * <li>
+     * The providers of this interface need to use this field, encode the password, place it's value
+     * into the encodedPassword field, and clear out the raw unencoded password field.
+     * </li>
+     * <li>
+     * This field should never be stored on disk.
+     * </li>
+     * </ol>
+     *
+     * @return the raw encoded password.
+     */
+    String getPassword();
+
+    /**
+     * Sets the raw (unencoded) password for this user.
+     *
+     * @param rawPassword the raw unencoded password for this user.
+     * @see #getPassword()
+     */
+    void setPassword( String rawPassword );
+
+    /**
+     * Gets the Encoded Password.
+     *
+     * @return the encoded password.
+     */
+    String getEncodedPassword();
+
+    /**
+     * Sets the Encoded Password.
+     * <p/>
+     * This field is populated by the {@link UserManager} process.
+     *
+     * @param encodedPassword
+     */
+    void setEncodedPassword( String encodedPassword );
+
+    /**
+     * Gets the Date of the Last Password Change.
+     * <p/>
+     * Used by password management policies to enforce password expiration rules.
+     *
+     * @return the date of the last password change.
+     */
+    Date getLastPasswordChange();
+
+    /**
+     * Sets the Last Password Change Date.
+     * <p/>
+     * This field is populated by the {@link UserManager} process.
+     *
+     * @param passwordChangeDate the date that the last password change occured.
+     */
+    void setLastPasswordChange( Date passwordChangeDate );
+
+    /**
+     * Gets the list of previous password (in encoded format).
+     * <p/>
+     * Used by password management policies to enforce password reuse rules.
+     *
+     * @return the list of {@link String} objects.  Represents previous passwords (in encoded format).
+     */
+    List<String> getPreviousEncodedPasswords();
+
+    /**
+     * Sets the list of previous passwords (in encoded format)
+     *
+     * @param encodedPasswordList (list of {@link String} objects.) the previously passwords in encoded format.
+     */
+    void setPreviousEncodedPasswords( List<String> encodedPasswordList );
+
+    /**
+     * Add encoded password to previously passwords in encoded format.
+     *
+     * @param encodedPassword the encoded password to add.
+     */
+    void addPreviousEncodedPassword( String encodedPassword );
+
+    // --------------------------------------------------------------------
+    // State
+    // --------------------------------------------------------------------
+
+    /**
+     * Gets the flag indicating if this user is a permanent user or not.
+     * <p/>
+     * Usually Root / Admin / Guest users are flagged as such.
+     */
+    boolean isPermanent();
+
+    /**
+     * Sets the permanent flag for this user.
+     * <p/>
+     * Users such as Root / Admin / Guest are typically flagged as permanent.
+     *
+     * @param permanent true if permanent.
+     */
+    void setPermanent( boolean permanent );
+
+    /**
+     * Determines if this user account is locked from use or not.
+     * <p/>
+     * This state is set from an administrative point of view, or due to
+     * excessive failed login attempts.
+     *
+     * @return true if account is locked.
+     */
+    boolean isLocked();
+
+    /**
+     * Sets the locked state of this account.
+     *
+     * @param locked true if account is to be locked.
+     */
+    void setLocked( boolean locked );
+
+    /**
+     * Determines if this user account must change their password on next login.
+     *
+     * @return true if user must change password on next login.
+     */
+    boolean isPasswordChangeRequired();
+
+    /**
+     * Sets the flag to indicate if this user must change their password on next login.
+     *
+     * @param changeRequired true if user must change password on next login.
+     */
+    void setPasswordChangeRequired( boolean changeRequired );
+
+    /**
+     * Gets the flag indicating if this user has been validated (or not)
+     *
+     * @return true if validated.
+     */
+    boolean isValidated();
+
+    /**
+     * Sets the flag indicating if this user has been validated (or not)
+     *
+     * @param valid true if validated.
+     */
+    void setValidated( boolean valid );
+
+    // --------------------------------------------------------------------
+    // Statistics
+    // --------------------------------------------------------------------
+
+    /**
+     * Get Count of Failed Login Attempts.
+     *
+     * @return the count of failed login attempts.
+     */
+    int getCountFailedLoginAttempts();
+
+    /**
+     * Set the count of failed login attempts.
+     *
+     * @param count the count of failed login attempts.
+     */
+    void setCountFailedLoginAttempts( int count );
+
+    /**
+     * Get the Creation Date for this account.
+     *
+     * @return the date of creation for this account.
+     */
+    Date getAccountCreationDate();
+
+    /**
+     * Set the Creation Date for this account.
+     */
+    void setAccountCreationDate( Date date );
+
+    /**
+     * Get the Last Successful Login Date for this account.
+     *
+     * @return the date of the last successful login
+     */
+    Date getLastLoginDate();
+
+    /**
+     * Sets the Last Successful Login Date for this account.
+     */
+    void setLastLoginDate( Date date );
+}

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/User.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/User.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManager.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManager.java?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManager.java (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManager.java Fri Apr  6 09:58:14 2012
@@ -0,0 +1,198 @@
+package org.codehaus.plexus.redback.users;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.util.List;
+
+/**
+ * User Manager Interface
+ *
+ * @author Jason van Zyl
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ */
+public interface UserManager
+{
+    
+    static final String GUEST_USERNAME = "guest";
+
+    /**
+     * Is the UserManager read only?  if so then create and modify actions are to be disabled
+     *
+     * @return boolean true if user manager is disabled
+     */
+    boolean isReadOnly();
+
+    /**
+     * An Identifier for the UserManager.
+     *
+     * @return the user manager identifier.
+     */
+    String getId();
+
+    /**
+     * Add a {@link UserManagerListener} to track major events in the
+     * UserManager.
+     *
+     * @param listener the listener to add.
+     */
+    void addUserManagerListener( UserManagerListener listener );
+
+    /**
+     * Remove a {@link UserManagerListener} from the collection of listeners.
+     *
+     * @param listener the listener to remove.
+     */
+    void removeUserManagerListener( UserManagerListener listener );
+
+    /**
+     * Factory method to create new User Objects based on provider specific
+     * implementation.
+     * <p/>
+     * User objects created this way do not exist in the provider's underlying
+     * data store until a call to {@link #addUser(User)} is made.
+     *
+     * @param username     the username for this user.
+     * @param fullName     the full name for this user.
+     * @param emailAddress the email address for this user.
+     * @return the new user object ready to use.
+     */
+    User createUser( String username, String fullName, String emailAddress );
+
+    /**
+     * Factory method to create the guest user.
+     *
+     * @return The guest user
+     */
+    User createGuestUser();
+
+    /**
+     * Factory method to create {@link UserQuery}s based on provider specific
+     * implementations.
+     *
+     * @return the provider implementation of UserQuery
+     */
+    UserQuery createUserQuery();
+
+    /**
+     * Get the List of {@link User} objects.
+     *
+     * @return the List of {@link User} Objects.
+     */
+    List<User> getUsers();
+
+    List<User> getUsers( boolean orderAscending );
+
+    /**
+     * Add a User.
+     *
+     * @param user the user to add.
+     * @return the user that was just added.
+     */
+    User addUser( User user );
+
+    /**
+     * Update a User.
+     *
+     * @param user the user to update.
+     * @return the user that was just updated.
+     * @throws UserNotFoundException if the user was not found to update.
+     */
+    User updateUser( User user )
+        throws UserNotFoundException;
+
+    /**
+     * Find a User using a User name.
+     *
+     * @param username the username to find.
+     * @return the user.
+     * @throws UserNotFoundException if the user was not found.
+     */
+    User findUser( String username )
+        throws UserNotFoundException;
+
+    /**
+     * Get the guest user.
+     *
+     * @return the guest user.
+     */
+    User getGuestUser()
+        throws UserNotFoundException;
+
+    List<User> findUsersByUsernameKey( String usernameKey, boolean orderAscending );
+
+    List<User> findUsersByFullNameKey( String fullNameKey, boolean orderAscending );
+
+    List<User> findUsersByEmailKey( String emailKey, boolean orderAscending );
+
+    /**
+     * Find users matching properties, ordering and range as specified by the
+     * {@link UserQuery}.
+     *
+     * @param query the query.
+     * @return a List of {@link User} objects.
+     */
+    List<User> findUsersByQuery( UserQuery query );
+
+    /**
+     * Find a User using the principal.
+     *
+     * @param principal the principal to look for.
+     * @return the user.
+     * @throws UserNotFoundException if the user was not found.
+     */
+    User findUser( Object principal )
+        throws UserNotFoundException;
+
+    /**
+     * true if the user exists, false if it doesn't
+     *
+     * @param principal
+     * @return true, if user exists
+     */
+    boolean userExists( Object principal );
+
+    /**
+     * Delete a user using the principal.
+     *
+     * @param principal the principal to look for.
+     * @throws UserNotFoundException the user was not found.
+     */
+    void deleteUser( Object principal )
+        throws UserNotFoundException;
+
+    /**
+     * Delete a user using the username.
+     *
+     * @param username the username to look for.
+     * @throws UserNotFoundException the user was not found.
+     */
+    void deleteUser( String username )
+        throws UserNotFoundException;
+
+    /**
+     * Add a user to the database without checking for consistency or adjusting the password. Should only be used for
+     * re-importing known-good data.
+     *
+     * @param user the user to add
+     */
+    void addUserUnchecked( User user );
+
+    void eraseDatabase();
+
+    User updateUser( User user, boolean passwordChangeRequired )
+        throws UserNotFoundException;
+}

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManager.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerException.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerException.java?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerException.java (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerException.java Fri Apr  6 09:58:14 2012
@@ -0,0 +1,48 @@
+package org.codehaus.plexus.redback.users;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * UserManagerException 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class UserManagerException
+    extends RuntimeException
+{
+
+    public UserManagerException()
+    {
+        super();
+    }
+
+    public UserManagerException( String message, Throwable cause )
+    {
+        super( message, cause );
+    }
+
+    public UserManagerException( String message )
+    {
+        super( message );
+    }
+
+    public UserManagerException( Throwable cause )
+    {
+        super( cause );
+    }
+}

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerException.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerListener.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerListener.java?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerListener.java (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerListener.java Fri Apr  6 09:58:14 2012
@@ -0,0 +1,15 @@
+package org.codehaus.plexus.redback.users;
+
+/**
+ * UserManagerListener 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public interface UserManagerListener
+{
+    public void userManagerInit( boolean freshDatabase );
+    public void userManagerUserAdded( User user );
+    public void userManagerUserRemoved( User user );
+    public void userManagerUserUpdated( User user );
+}

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerListener.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserManagerListener.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserNotFoundException.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserNotFoundException.java?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserNotFoundException.java (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserNotFoundException.java Fri Apr  6 09:58:14 2012
@@ -0,0 +1,24 @@
+package org.codehaus.plexus.redback.users;
+
+/**
+ * @author Jason van Zyl
+ */
+public class UserNotFoundException
+    extends Exception
+{
+    public UserNotFoundException( String string )
+    {
+        super( string );
+    }
+
+    public UserNotFoundException( String string,
+                                  Throwable throwable )
+    {
+        super( string, throwable );
+    }
+
+    public UserNotFoundException( Throwable throwable )
+    {
+        super( throwable );
+    }
+}

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserNotFoundException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserNotFoundException.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserQuery.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserQuery.java?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserQuery.java (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserQuery.java Fri Apr  6 09:58:14 2012
@@ -0,0 +1,134 @@
+package org.codehaus.plexus.redback.users;
+
+/*
+ * Copyright 2001-2006 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import java.util.Set;
+import java.util.HashSet;
+import java.util.Arrays;
+
+
+public interface UserQuery
+{
+    final static String ORDER_BY_USERNAME = "username";
+
+    final static String ORDER_BY_FULLNAME = "fullname";
+
+    final static String ORDER_BY_EMAIL = "email";
+
+    final static Set<String> ALLOWED_ORDER_FIELDS =
+        new HashSet<String>( Arrays.asList( ORDER_BY_USERNAME, ORDER_BY_FULLNAME, ORDER_BY_EMAIL ) );
+
+    /**
+     * Returns the case insensitive substring user name criteria.
+     *
+     * @return the username criteria.
+     */
+    String getUsername();
+
+    /**
+     * Sets the case insensitive substring user name criteria.
+     *
+     * @param userName the username criteria
+     */
+    void setUsername( String userName );
+
+    /**
+     * Returns the case insensitive substring full name criteria.
+     *
+     * @return the username criteria.
+     */
+    String getFullName();
+
+    /**
+     * Sets the case insensitive substring full name criteria.
+     *
+     * @param fullName the full name criteria
+     */
+    void setFullName( String fullName );
+
+    /**
+     * Returns the case insensitive substring email criteria.
+     *
+     * @return the email criteria.
+     */
+    String getEmail();
+
+    /**
+     * Sets the case insensitive substring email criteria.
+     *
+     * @param email the email criteria
+     */
+    void setEmail( String email );
+
+    /**
+     * Returns the index (zero based) of the first result to include. Useful for paging.
+     *
+     * @return the first index
+     */
+    long getFirstResult();
+
+    /**
+     * Sets the index (zero based) of the first result to include. Useful for paging.
+     *
+     * @param firstResult the first index
+     */
+    void setFirstResult( int firstResult );
+
+    /**
+     * Returns the maximum number of users to return.
+     *
+     * @return the maximum number of users to return.
+     */
+    long getMaxResults();
+
+    /**
+     * Sets the maximum number of users to return.
+     *
+     * @param maxResults the maximum number of users to return.
+     */
+    void setMaxResults( int maxResults );
+
+    /**
+     * Returns the property used to order the results of this query.
+     * This is one of {@link #ORDER_BY_USERNAME}, {@link #ORDER_BY_FULLNAME} or {@link #ORDER_BY_EMAIL}.
+     *
+     * @return the order property.
+     */
+    String getOrderBy();
+
+    /**
+     * Sets the property used to order the results of this query.
+     * This is one of {@link #ORDER_BY_USERNAME}, {@link #ORDER_BY_FULLNAME} or {@link #ORDER_BY_EMAIL}.
+     *
+     * @param orderBy the order property.
+     */
+    void setOrderBy( String orderBy );
+
+    /**
+     * Returns true if the results should be returned in ascending order.
+     *
+     * @return ascending
+     */
+    boolean isAscending();
+
+    /**
+     * Set this to true if the results should be returned in ascending order.
+     *
+     * @param ascending true if the results should be returned in ascending
+     */
+    void setAscending( boolean ascending );
+}

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserQuery.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/java/org/codehaus/plexus/redback/users/UserQuery.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/resources/org/codehaus/plexus/redback/users/messages.properties
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/resources/org/codehaus/plexus/redback/users/messages.properties?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/resources/org/codehaus/plexus/redback/users/messages.properties (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/resources/org/codehaus/plexus/redback/users/messages.properties Fri Apr  6 09:58:14 2012
@@ -0,0 +1,10 @@
+password.encoder.no.such.algoritm=The specified algorithm {0} is not available in the JAAS Implementation of this JVM.
+password.encoder.unsupported.encoding=The UTF-8 Encoding is not available in the JAAS Implementation of this JVM.
+user.password.violation.missing=You must provide a password.
+user.password.violation.length=You must provide a password between {0} and {1} characters in length.
+user.password.violation.length.misconfigured=Password Length Rule is misconfigured.  Specified minimum of ({0}) is larger than specified maximum of ({1}).  Rule disabled.
+user.password.violation.alpha=You must provide a password containing at least {0} alphabetic character(s).
+user.password.violation.numeric=You must provide a password containing at least {0} numeric character(s).
+user.password.violation.reuse=Your password cannot match any of your previous {0} password(s).
+user.password.violation.alphanum.only=You must provide a password containing all alpha-numeric characters.
+user.password.violation.whitespace.detected=You must provide a password without whitespace characters.
\ No newline at end of file

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/resources/org/codehaus/plexus/redback/users/messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-api/src/main/resources/org/codehaus/plexus/redback/users/messages.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/pom.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/pom.xml?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/pom.xml (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/pom.xml Fri Apr  6 09:58:14 2012
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2006 The Codehaus.
+  ~ 
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ 
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.codehaus.redback</groupId>
+    <artifactId>redback-users</artifactId>
+    <version>1.5-SNAPSHOT</version>
+  </parent>
+  <artifactId>redback-users-providers</artifactId>
+  <name>Redback :: Users Providers</name>
+  <packaging>pom</packaging>
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.redback</groupId>
+      <artifactId>redback-users-api</artifactId>
+    </dependency>
+  </dependencies>
+  <modules>
+    <module>redback-users-cached</module>
+    <module>redback-users-memory</module>
+    <module>redback-users-jdo</module>
+    <module>redback-users-ldap</module>
+    <module>redback-users-configurable</module>
+  </modules>
+</project>

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/pom.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/pom.xml?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/pom.xml (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/pom.xml Fri Apr  6 09:58:14 2012
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2006 The Codehaus.
+  ~ 
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ 
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.codehaus.redback</groupId>
+    <artifactId>redback-users-providers</artifactId>
+    <version>1.5-SNAPSHOT</version>
+  </parent>
+  <artifactId>redback-users-cached</artifactId>
+  <name>Redback :: Users Provider :: Cached</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.redback</groupId>
+      <artifactId>redback-policy</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.redback.components.cache</groupId>
+      <artifactId>spring-cache-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.redback.components.cache</groupId>
+      <artifactId>spring-cache-ehcache</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>net.sf.ehcache</groupId>
+      <artifactId>ehcache-core</artifactId>
+    </dependency>     
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+    </dependency>   
+    <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>jsr250-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.redback</groupId>
+      <artifactId>redback-users-jdo</artifactId>      
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.redback</groupId>
+      <artifactId>redback-users-tests</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.redback</groupId>
+      <artifactId>redback-users-memory</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/java/org/codehaus/plexus/redback/users/cached/CachedUserManager.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/java/org/codehaus/plexus/redback/users/cached/CachedUserManager.java?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/java/org/codehaus/plexus/redback/users/cached/CachedUserManager.java (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/java/org/codehaus/plexus/redback/users/cached/CachedUserManager.java Fri Apr  6 09:58:14 2012
@@ -0,0 +1,318 @@
+package org.codehaus.plexus.redback.users.cached;
+
+/*
+ * Copyright 2001-2006 The Codehaus.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.codehaus.plexus.cache.Cache;
+import org.codehaus.plexus.redback.users.User;
+import org.codehaus.plexus.redback.users.UserManager;
+import org.codehaus.plexus.redback.users.UserManagerListener;
+import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.codehaus.plexus.redback.users.UserQuery;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Service;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+import java.util.List;
+
+/**
+ * CachedUserManager
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+@Service( "userManager#cached" )
+public class CachedUserManager
+    implements UserManager, UserManagerListener
+{
+
+    private Logger log = LoggerFactory.getLogger( getClass() );
+
+    @Inject
+    @Named( value = "userManager#jdo" )
+    private UserManager userImpl;
+
+    @Inject
+    @Named( value = "cache#users" )
+    private Cache usersCache;
+
+    public boolean isReadOnly()
+    {
+        return userImpl.isReadOnly();
+    }
+
+    public User createGuestUser()
+    {
+        return userImpl.createGuestUser();
+    }
+
+    public User addUser( User user )
+    {
+        if ( user != null )
+        {
+            usersCache.remove( user.getPrincipal() );
+        }
+        return this.userImpl.addUser( user );
+    }
+
+    public void addUserManagerListener( UserManagerListener listener )
+    {
+        this.userImpl.addUserManagerListener( listener );
+    }
+
+    public void addUserUnchecked( User user )
+    {
+        if ( user != null )
+        {
+            usersCache.remove( user.getPrincipal() );
+        }
+        this.userImpl.addUserUnchecked( user );
+    }
+
+    public User createUser( String username, String fullName, String emailAddress )
+    {
+        usersCache.remove( username );
+        return this.userImpl.createUser( username, fullName, emailAddress );
+    }
+
+    public void deleteUser( Object principal )
+        throws UserNotFoundException
+    {
+        usersCache.remove( principal );
+        this.userImpl.deleteUser( principal );
+    }
+
+    public void deleteUser( String username )
+        throws UserNotFoundException
+    {
+        usersCache.remove( username );
+        this.userImpl.deleteUser( username );
+    }
+
+    public void eraseDatabase()
+    {
+        try
+        {
+            this.userImpl.eraseDatabase();
+        }
+        finally
+        {
+            usersCache.clear();
+        }
+    }
+
+    public User findUser( String username )
+        throws UserNotFoundException
+    {
+        if ( GUEST_USERNAME.equals( username ) )
+        {
+            return getGuestUser();
+        }
+
+        Object el = usersCache.get( username );
+        if ( el != null )
+        {
+            return (User) el;
+        }
+        else
+        {
+            User user = this.userImpl.findUser( username );
+            usersCache.put( username, user );
+            return user;
+        }
+    }
+
+    public User getGuestUser()
+        throws UserNotFoundException
+    {
+        Object el = usersCache.get( GUEST_USERNAME );
+        if ( el != null )
+        {
+            return (User) el;
+        }
+        else
+        {
+            User user = this.userImpl.getGuestUser();
+            usersCache.put( GUEST_USERNAME, user );
+            return user;
+        }
+    }
+
+    public User findUser( Object principal )
+        throws UserNotFoundException
+    {
+        Object el = usersCache.get( principal );
+        if ( el != null )
+        {
+            return (User) el;
+        }
+        else
+        {
+            User user = this.userImpl.findUser( principal );
+            usersCache.put( principal, user );
+            return user;
+        }
+    }
+
+    public UserQuery createUserQuery()
+    {
+        return userImpl.createUserQuery();
+    }
+
+
+    public List<User> findUsersByQuery( UserQuery query )
+    {
+        log.debug( "NOT CACHED - .findUsersByQuery(UserQuery)" );
+        return this.userImpl.findUsersByQuery( query );
+    }
+
+    public List<User> findUsersByEmailKey( String emailKey, boolean orderAscending )
+    {
+        log.debug( "NOT CACHED - .findUsersByEmailKey(String, boolean)" );
+        return this.userImpl.findUsersByEmailKey( emailKey, orderAscending );
+    }
+
+    public List<User> findUsersByFullNameKey( String fullNameKey, boolean orderAscending )
+    {
+        log.debug( "NOT CACHED - .findUsersByFullNameKey(String, boolean)" );
+        return this.userImpl.findUsersByFullNameKey( fullNameKey, orderAscending );
+    }
+
+    public List<User> findUsersByUsernameKey( String usernameKey, boolean orderAscending )
+    {
+        log.debug( "NOT CACHED - .findUsersByUsernameKey(String, boolean)" );
+        return this.userImpl.findUsersByUsernameKey( usernameKey, orderAscending );
+    }
+
+    public String getId()
+    {
+        return "Cached User Manager [" + this.userImpl.getId() + "]";
+    }
+
+    public List<User> getUsers()
+    {
+        log.debug( "NOT CACHED - .getUsers()" );
+        return this.userImpl.getUsers();
+    }
+
+    public List<User> getUsers( boolean orderAscending )
+    {
+        log.debug( "NOT CACHED - .getUsers(boolean)" );
+        return this.userImpl.getUsers( orderAscending );
+    }
+
+    public void removeUserManagerListener( UserManagerListener listener )
+    {
+        this.userImpl.removeUserManagerListener( listener );
+    }
+
+    public User updateUser( User user )
+        throws UserNotFoundException
+    {
+        return updateUser( user, false );
+    }
+
+    public User updateUser( User user, boolean passwordChangeRequired )
+        throws UserNotFoundException
+    {
+        if ( user != null )
+        {
+            usersCache.remove( user.getPrincipal() );
+        }
+        return this.userImpl.updateUser( user, passwordChangeRequired );
+    }
+
+    public boolean userExists( Object principal )
+    {
+        if ( usersCache.hasKey( principal ) )
+        {
+            return true;
+        }
+
+        return this.userImpl.userExists( principal );
+    }
+
+    public void userManagerInit( boolean freshDatabase )
+    {
+        if ( userImpl instanceof UserManager )
+        {
+            ( (UserManagerListener) this.userImpl ).userManagerInit( freshDatabase );
+        }
+
+        usersCache.clear();
+    }
+
+    public void userManagerUserAdded( User user )
+    {
+        if ( userImpl instanceof UserManager )
+        {
+            ( (UserManagerListener) this.userImpl ).userManagerUserAdded( user );
+        }
+
+        if ( user != null )
+        {
+            usersCache.remove( user.getPrincipal() );
+        }
+    }
+
+    public void userManagerUserRemoved( User user )
+    {
+        if ( userImpl instanceof UserManager )
+        {
+            ( (UserManagerListener) this.userImpl ).userManagerUserRemoved( user );
+        }
+
+        if ( user != null )
+        {
+            usersCache.remove( user.getPrincipal() );
+        }
+    }
+
+    public void userManagerUserUpdated( User user )
+    {
+        if ( userImpl instanceof UserManager )
+        {
+            ( (UserManagerListener) this.userImpl ).userManagerUserUpdated( user );
+        }
+
+        if ( user != null )
+        {
+            usersCache.remove( user.getPrincipal() );
+        }
+    }
+
+    public UserManager getUserImpl()
+    {
+        return userImpl;
+    }
+
+    public void setUserImpl( UserManager userImpl )
+    {
+        this.userImpl = userImpl;
+    }
+
+    public Cache getUsersCache()
+    {
+        return usersCache;
+    }
+
+    public void setUsersCache( Cache usersCache )
+    {
+        this.usersCache = usersCache;
+    }
+}

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/java/org/codehaus/plexus/redback/users/cached/CachedUserManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/java/org/codehaus/plexus/redback/users/cached/CachedUserManager.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/resources/META-INF/spring-context.xml?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/resources/META-INF/spring-context.xml (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/resources/META-INF/spring-context.xml Fri Apr  6 09:58:14 2012
@@ -0,0 +1,45 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+           http://www.springframework.org/schema/context 
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+       default-lazy-init="true">
+
+  <context:annotation-config />
+  <context:component-scan 
+    base-package="org.codehaus.plexus.redback.users.cached"/>
+
+  <bean name="cache#users" class="org.codehaus.plexus.cache.ehcache.EhcacheCache"
+      init-method="initialize">
+    <property name="diskPersistent" value="false"/>
+    <property name="eternal" value="false"/>
+    <property name="maxElementsInMemory" value="1000"/>
+    <property name="memoryEvictionPolicy" value="LRU"/>
+    <property name="name" value="usersCache"/>
+    <property name="timeToIdleSeconds" value="1800"/>
+    <property name="timeToLiveSeconds" value="14400"/>
+  </bean>
+ 
+</beans>
\ No newline at end of file

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/resources/META-INF/spring-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/main/resources/META-INF/spring-context.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/java/org/codehaus/plexus/redback/users/cached/CachedUserManagerTest.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/java/org/codehaus/plexus/redback/users/cached/CachedUserManagerTest.java?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/java/org/codehaus/plexus/redback/users/cached/CachedUserManagerTest.java (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/java/org/codehaus/plexus/redback/users/cached/CachedUserManagerTest.java Fri Apr  6 09:58:14 2012
@@ -0,0 +1,67 @@
+package org.codehaus.plexus.redback.users.cached;
+
+/*
+ * Copyright 2001-2006 The Codehaus.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import net.sf.ehcache.CacheManager;
+
+import org.codehaus.plexus.redback.users.UserManager;
+import org.codehaus.plexus.redback.users.provider.test.AbstractUserManagerTestCase;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
+/**
+ * CachedUserManagerTest 
+ *
+ * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
+ * @version $Id$
+ */
+public class CachedUserManagerTest
+    extends AbstractUserManagerTestCase
+{
+
+    @Inject @Named(value = "userManager#cached")
+    UserManager userManager;
+
+
+    @Before
+    public void setUp()
+        throws Exception
+    {
+        super.setUp();
+
+        setUserManager( userManager );
+
+        assertTrue( getUserManager() instanceof CachedUserManager );
+    }
+
+    @After
+    public void tearDown()
+        throws Exception
+    {
+        super.tearDown();
+    }
+
+    @AfterClass
+    public static void cleanCache()
+    {
+        CacheManager.getInstance().removalAll();
+    }
+}

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/java/org/codehaus/plexus/redback/users/cached/CachedUserManagerTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/java/org/codehaus/plexus/redback/users/cached/CachedUserManagerTest.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/org/codehaus/plexus/redback/config-defaults.properties
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/org/codehaus/plexus/redback/config-defaults.properties?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/org/codehaus/plexus/redback/config-defaults.properties (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/org/codehaus/plexus/redback/config-defaults.properties Fri Apr  6 09:58:14 2012
@@ -0,0 +1,127 @@
+#
+# Copyright 2006 The Codehaus.
+# 
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+# --------------------------------------------------------------------
+# Application Configuration
+
+application.timestamp=EEE d MMM yyyy HH:mm:ss Z
+
+# --------------------------------------------------------------------
+# JDBC Setup
+
+jdbc.driver.name=org.hsqldb.jdbcDriver
+jdbc.url=jdbc:hsqldb:mem:redback-test
+jdbc.username=sa
+jdbc.password=
+
+# --------------------------------------------------------------------
+# Email Settings
+
+email.jndiSessionName=java:comp/env/mail/Session
+email.smtp.host=localhost
+email.smtp.port=25
+email.smtp.ssl.enabled=false
+email.smtp.tls.enabled=false
+email.smtp.username=
+email.smtp.password=
+
+#TODO: move description elsewhere, remove bad default
+# All emails sent by the system will be from the following address
+#email.from.address=${user.name}@localhost
+# All emails sent by the system will be from the following user name (used in conjunction with address)
+#email.from.name=Unconfigured Username
+
+# If all email addresses (from new user registration) require an account validation email. 
+email.validation.required=true
+# Timeout (in minutes) for the key generated for an email validation to remain valid.
+# 2880 minutes = 48 hours
+email.validation.timeout=2880
+# The subject line for the email message.
+email.validation.subject=Welcome
+
+#TODO: move description elsewhere, remove bad default
+# Get the Feedback to use for any outgoing emails.
+# NOTE: if feedback.path starts with a "/" it is appended to the end of the value provided in application.url
+# This value can be in the format/syntax of "/feedback.action" or even "mailto:feedback@application.com"
+#email.feedback.path=/feedback.action
+
+#Set the application base URL. The default is to derive it from the HTTP request
+#application.url=http://myurl.mycompany.com
+
+# --------------------------------------------------------------------
+# Auto Login Settings
+
+security.rememberme.enabled=true
+# Timeout in minutes ( 525600 minutes = 1 year )
+security.rememberme.timeout=525600
+
+# Single Sign On
+# Timeout in minutes
+security.signon.timeout=30
+
+# --------------------------------------------------------------------
+# Default Username Values
+redback.default.admin=admin
+
+# --------------------------------------------------------------------
+# Security Policies
+
+#security.policy.password.encoder=
+security.policy.password.previous.count=6
+security.policy.password.expiration.enabled=true
+security.policy.password.expiration.days=90
+security.policy.password.expiration.notify.days=10
+security.policy.allowed.login.attempt=10
+
+# turn off the perclick enforcement of various security policies, slightly
+# more heavyweight since it will ensure that the User object on each click
+# is up to date
+security.policy.strict.enforcement.enabled=true
+security.policy.strict.force.password.change.enabled=true
+
+# --------------------------------------------------------------------
+# Password Rules
+security.policy.password.rule.alphanumeric.enabled=false
+security.policy.password.rule.alphacount.enabled=true
+security.policy.password.rule.alphacount.minimum=1
+security.policy.password.rule.characterlength.enabled=true
+security.policy.password.rule.characterlength.minimum=1
+security.policy.password.rule.characterlength.maximum=24
+security.policy.password.rule.musthave.enabled=true
+security.policy.password.rule.numericalcount.enabled=true
+security.policy.password.rule.numericalcount.minimum=1
+security.policy.password.rule.reuse.enabled=true
+security.policy.password.rule.nowhitespace.enabled=true
+
+# --------------------------------------------------------------------
+# ldap settings
+#
+ldap.bind.authenticator.enabled=false
+
+# ldap options for configuration via properties file
+#ldap.config.hostname=
+#ldap.config.port=
+#ldap.config.base.dn=
+#ldap.config.context.factory=
+#ldap.config.bind.dn=
+#ldap.config.password=
+#ldap.config.authentication.method=
+
+# config parameter for the ConfigurableUserManager
+user.manager.impl=cached
+
+
+

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/org/codehaus/plexus/redback/config-defaults.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/org/codehaus/plexus/redback/config-defaults.properties
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/spring-context.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/spring-context.xml?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/spring-context.xml (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/spring-context.xml Fri Apr  6 09:58:14 2012
@@ -0,0 +1,47 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+           http://www.springframework.org/schema/context 
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+       default-lazy-init="true">
+
+  <bean name="userManager#cached" class="org.codehaus.plexus.redback.users.cached.CachedUserManager">
+    <property name="userImpl" ref="userManager#memory"/>
+    <property name="usersCache" ref="cache#users"/>
+  </bean>
+
+  <bean name="cache#users" class="org.codehaus.plexus.cache.ehcache.EhcacheCache"
+      init-method="initialize">
+    <property name="diskPersistent" value="false"/>
+    <property name="eternal" value="false"/>
+    <property name="maxElementsInMemory" value="1000"/>
+    <property name="memoryEvictionPolicy" value="LRU"/>
+    <property name="name" value="usersCache"/>
+    <property name="timeToIdleSeconds" value="1800"/>
+    <property name="timeToLiveSeconds" value="14400"/>
+  </bean>
+
+
+</beans>
\ No newline at end of file

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/spring-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-cached/src/test/resources/spring-context.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/pom.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/pom.xml?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/pom.xml (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/pom.xml Fri Apr  6 09:58:14 2012
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2006 The Codehaus.
+  ~ 
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ 
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.codehaus.redback</groupId>
+    <artifactId>redback-users-providers</artifactId>
+    <version>1.5-SNAPSHOT</version>
+  </parent>
+  <artifactId>redback-users-configurable</artifactId>
+  <name>Redback :: Users Provider :: Configurable</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.redback</groupId>
+      <artifactId>redback-policy</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+    </dependency>   
+    <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>jsr250-api</artifactId>
+    </dependency>     
+    <dependency>
+      <groupId>org.codehaus.redback</groupId>
+      <artifactId>redback-users-tests</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+</project>

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/codehaus/plexus/redback/users/configurable/ConfigurableUserManager.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/codehaus/plexus/redback/users/configurable/ConfigurableUserManager.java?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/codehaus/plexus/redback/users/configurable/ConfigurableUserManager.java (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/codehaus/plexus/redback/users/configurable/ConfigurableUserManager.java Fri Apr  6 09:58:14 2012
@@ -0,0 +1,179 @@
+package org.codehaus.plexus.redback.users.configurable;
+
+/*
+ * Copyright 2001-2007 The Apache Software Foundation.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+import org.codehaus.plexus.redback.configuration.UserConfiguration;
+import org.codehaus.plexus.redback.users.AbstractUserManager;
+import org.codehaus.plexus.redback.users.User;
+import org.codehaus.plexus.redback.users.UserManager;
+import org.codehaus.plexus.redback.users.UserNotFoundException;
+import org.codehaus.plexus.redback.users.UserQuery;
+import org.springframework.context.ApplicationContext;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.PostConstruct;
+import javax.inject.Inject;
+import javax.inject.Named;
+import java.util.List;
+
+/**
+ * @author <a href="jesse@codehaus.org"> jesse
+ * @version "Id$
+ */
+@Service( "userManager#configurable" )
+public class ConfigurableUserManager
+    extends AbstractUserManager
+{
+    @Inject
+    @Named( value = "userConfiguration" )
+    private UserConfiguration config;
+
+    @Inject
+    private ApplicationContext applicationContext;
+
+    private UserManager userManagerImpl;
+
+    public static final String USER_MANAGER_IMPL = "user.manager.impl";
+
+    @PostConstruct
+    public void initialize()
+    {
+        String userManagerRole = config.getString( USER_MANAGER_IMPL );
+
+        if ( userManagerRole == null )
+        {
+            throw new RuntimeException(
+                "User Manager Configuration Missing: " + USER_MANAGER_IMPL + " configuration property" );
+        }
+
+        userManagerImpl = applicationContext.getBean( "userManager#" + userManagerRole, UserManager.class );
+        // (UserManager) container.lookup( UserManager.class.getName(), userManagerRole );
+    }
+
+    public User addUser( User user )
+    {
+        return userManagerImpl.addUser( user );
+    }
+
+    public void addUserUnchecked( User user )
+    {
+        userManagerImpl.addUserUnchecked( user );
+    }
+
+    public User createUser( String username, String fullName, String emailAddress )
+    {
+        return userManagerImpl.createUser( username, fullName, emailAddress );
+    }
+
+    public UserQuery createUserQuery()
+    {
+        return userManagerImpl.createUserQuery();
+    }
+
+    public void deleteUser( Object principal )
+        throws UserNotFoundException
+    {
+        userManagerImpl.deleteUser( principal );
+    }
+
+    public void deleteUser( String username )
+        throws UserNotFoundException
+    {
+        userManagerImpl.deleteUser( username );
+    }
+
+    public void eraseDatabase()
+    {
+        userManagerImpl.eraseDatabase();
+    }
+
+    public User findUser( String username )
+        throws UserNotFoundException
+    {
+        return userManagerImpl.findUser( username );
+    }
+
+    public User findUser( Object principal )
+        throws UserNotFoundException
+    {
+        return userManagerImpl.findUser( principal );
+    }
+
+    @Override
+    public User getGuestUser()
+        throws UserNotFoundException
+    {
+        return userManagerImpl.getGuestUser();
+    }
+
+    public List<User> findUsersByEmailKey( String emailKey, boolean orderAscending )
+    {
+        return userManagerImpl.findUsersByEmailKey( emailKey, orderAscending );
+    }
+
+    public List<User> findUsersByFullNameKey( String fullNameKey, boolean orderAscending )
+    {
+        return userManagerImpl.findUsersByFullNameKey( fullNameKey, orderAscending );
+    }
+
+    public List<User> findUsersByQuery( UserQuery query )
+    {
+        return userManagerImpl.findUsersByQuery( query );
+    }
+
+    public List<User> findUsersByUsernameKey( String usernameKey, boolean orderAscending )
+    {
+        return userManagerImpl.findUsersByUsernameKey( usernameKey, orderAscending );
+    }
+
+    public String getId()
+    {
+        return ConfigurableUserManager.class.getName() + " wrapping " + userManagerImpl.getId();
+    }
+
+    public List<User> getUsers()
+    {
+        return userManagerImpl.getUsers();
+    }
+
+    public List<User> getUsers( boolean orderAscending )
+    {
+        return userManagerImpl.getUsers( orderAscending );
+    }
+
+    public boolean isReadOnly()
+    {
+        return userManagerImpl.isReadOnly();
+    }
+
+    public User updateUser( User user )
+        throws UserNotFoundException
+    {
+        return updateUser( user, false );
+    }
+
+    public User updateUser( User user, boolean passwordChangeRequired )
+        throws UserNotFoundException
+    {
+        return userManagerImpl.updateUser( user, passwordChangeRequired );
+    }
+
+    public boolean userExists( Object principal )
+    {
+        return userManagerImpl.userExists( principal );
+    }
+}

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/codehaus/plexus/redback/users/configurable/ConfigurableUserManager.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/java/org/codehaus/plexus/redback/users/configurable/ConfigurableUserManager.java
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/resources/META-INF/spring-context.xml?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/resources/META-INF/spring-context.xml (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/resources/META-INF/spring-context.xml Fri Apr  6 09:58:14 2012
@@ -0,0 +1,33 @@
+<?xml version="1.0"?>
+
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~   http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:context="http://www.springframework.org/schema/context"
+       xsi:schemaLocation="http://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+           http://www.springframework.org/schema/context 
+           http://www.springframework.org/schema/context/spring-context-3.0.xsd"
+       default-lazy-init="true">
+
+  <context:annotation-config />
+  <context:component-scan base-package="org.codehaus.plexus.redback.users.configurable"/>
+ 
+</beans>
\ No newline at end of file

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/resources/META-INF/spring-context.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-configurable/src/main/resources/META-INF/spring-context.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-jdo/pom.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-jdo/pom.xml?rev=1310268&view=auto
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-jdo/pom.xml (added)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-jdo/pom.xml Fri Apr  6 09:58:14 2012
@@ -0,0 +1,143 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright 2006 The Codehaus.
+  ~ 
+  ~ Licensed under the Apache License, Version 2.0 (the "License");
+  ~ you may not use this file except in compliance with the License.
+  ~ You may obtain a copy of the License at
+  ~ 
+  ~      http://www.apache.org/licenses/LICENSE-2.0
+  ~ 
+  ~ Unless required by applicable law or agreed to in writing, software
+  ~ distributed under the License is distributed on an "AS IS" BASIS,
+  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  ~ See the License for the specific language governing permissions and
+  ~ limitations under the License.
+  -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>org.codehaus.redback</groupId>
+    <artifactId>redback-users-providers</artifactId>
+    <version>1.5-SNAPSHOT</version>
+  </parent>
+  <artifactId>redback-users-jdo</artifactId>
+  <name>Redback :: Users Provider :: JDO</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.codehaus.plexus</groupId>
+      <artifactId>plexus-utils</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.redback</groupId>
+      <artifactId>redback-common-jdo</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.redback</groupId>
+      <artifactId>redback-policy</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.springframework</groupId>
+      <artifactId>spring-context-support</artifactId>
+    </dependency>   
+    <dependency>
+      <groupId>javax.annotation</groupId>
+      <artifactId>jsr250-api</artifactId>
+    </dependency>     
+    <dependency>
+      <groupId>org.codehaus.redback</groupId>
+      <artifactId>redback-users-tests</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.hsqldb</groupId>
+      <artifactId>hsqldb</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>net.java.dev.stax-utils</groupId>
+      <artifactId>stax-utils</artifactId>
+      <version>20060502</version>
+      <exclusions>
+        <exclusion>
+          <groupId>com.bea.xml</groupId>
+          <artifactId>jsr173-ri</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>javax.xml.stream</groupId>
+      <artifactId>stax-api</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.codehaus.woodstox</groupId>
+      <artifactId>wstx-asl</artifactId>
+      <version>3.2.0</version>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>stax</groupId>
+          <artifactId>stax-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-simple</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.derby</groupId>
+      <artifactId>derby</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.codehaus.modello</groupId>
+        <artifactId>modello-maven-plugin</artifactId>
+        <version>1.0-alpha-15</version>
+        <configuration>
+          <version>1.0.1</version>
+          <packageWithVersion>false</packageWithVersion>
+          <model>src/main/mdo/user.xml</model>
+        </configuration>
+        <executions>
+          <execution>
+            <id>modello-java</id>
+            <goals>
+              <goal>java</goal>
+              <goal>jpox-metadata-class</goal>
+              <goal>stax-reader</goal>
+              <goal>stax-writer</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>jpox-jdo-mapping</id>
+            <goals>
+              <goal>jpox-jdo-mapping</goal>
+            </goals>
+            <configuration>
+              <outputDirectory>${basedir}/target/classes/org/codehaus/plexus/redback/users/jdo</outputDirectory>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>jpox-maven-plugin</artifactId>
+        <executions>
+          <execution>
+            <goals>
+              <goal>enhance</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</project>

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-jdo/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-jdo/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision