Return-Path: X-Original-To: apmail-archiva-commits-archive@www.apache.org Delivered-To: apmail-archiva-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4337FEB52 for ; Sat, 23 Feb 2013 18:37:19 +0000 (UTC) Received: (qmail 77119 invoked by uid 500); 23 Feb 2013 18:37:19 -0000 Delivered-To: apmail-archiva-commits-archive@archiva.apache.org Received: (qmail 77090 invoked by uid 500); 23 Feb 2013 18:37:19 -0000 Mailing-List: contact commits-help@archiva.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@archiva.apache.org Delivered-To: mailing list commits@archiva.apache.org Received: (qmail 77083 invoked by uid 99); 23 Feb 2013 18:37:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Feb 2013 18:37:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 23 Feb 2013 18:37:16 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id D3C132388B43; Sat, 23 Feb 2013 18:36:55 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1449388 - /archiva/redback/redback-core/trunk/redback-system/src/test/java/org/apache/archiva/redback/system/MockUserManager.java Date: Sat, 23 Feb 2013 18:36:55 -0000 To: commits@archiva.apache.org From: olamy@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130223183655.D3C132388B43@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: olamy Date: Sat Feb 23 18:36:55 2013 New Revision: 1449388 URL: http://svn.apache.org/r1449388 Log: add mock for testing Added: archiva/redback/redback-core/trunk/redback-system/src/test/java/org/apache/archiva/redback/system/MockUserManager.java (with props) Added: archiva/redback/redback-core/trunk/redback-system/src/test/java/org/apache/archiva/redback/system/MockUserManager.java URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-system/src/test/java/org/apache/archiva/redback/system/MockUserManager.java?rev=1449388&view=auto ============================================================================== --- archiva/redback/redback-core/trunk/redback-system/src/test/java/org/apache/archiva/redback/system/MockUserManager.java (added) +++ archiva/redback/redback-core/trunk/redback-system/src/test/java/org/apache/archiva/redback/system/MockUserManager.java Sat Feb 23 18:36:55 2013 @@ -0,0 +1,175 @@ +package org.apache.archiva.redback.system; +/* + * 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. + */ + +import org.apache.archiva.redback.users.User; +import org.apache.archiva.redback.users.UserManager; +import org.apache.archiva.redback.users.UserManagerException; +import org.apache.archiva.redback.users.UserManagerListener; +import org.apache.archiva.redback.users.UserNotFoundException; +import org.apache.archiva.redback.users.UserQuery; + +import java.util.List; + +/** + * @author Olivier Lamy + */ +public class MockUserManager implements UserManager +{ + public boolean isReadOnly() + { + return false; //To change body of implemented methods use File | Settings | File Templates. + } + + public String getId() + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public void addUserManagerListener( UserManagerListener listener ) + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void removeUserManagerListener( UserManagerListener listener ) + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public User createUser( String username, String fullName, String emailAddress ) + throws UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public User createGuestUser() + throws UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public UserQuery createUserQuery() + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public List getUsers() + throws UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public List getUsers( boolean orderAscending ) + throws UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public User addUser( User user ) + throws UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public User updateUser( User user ) + throws UserNotFoundException, UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public User findUser( String username ) + throws UserNotFoundException, UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public User getGuestUser() + throws UserNotFoundException, UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public List findUsersByUsernameKey( String usernameKey, boolean orderAscending ) + throws UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public List findUsersByFullNameKey( String fullNameKey, boolean orderAscending ) + throws UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public List findUsersByEmailKey( String emailKey, boolean orderAscending ) + throws UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public List findUsersByQuery( UserQuery query ) + throws UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public boolean userExists( String principal ) + throws UserManagerException + { + return false; //To change body of implemented methods use File | Settings | File Templates. + } + + public void deleteUser( String username ) + throws UserNotFoundException, UserManagerException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void addUserUnchecked( User user ) + throws UserManagerException + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public void eraseDatabase() + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public User updateUser( User user, boolean passwordChangeRequired ) + throws UserNotFoundException, UserManagerException + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } + + public void initialize() + { + //To change body of implemented methods use File | Settings | File Templates. + } + + public boolean isFinalImplementation() + { + return false; //To change body of implemented methods use File | Settings | File Templates. + } + + public String getDescriptionKey() + { + return null; //To change body of implemented methods use File | Settings | File Templates. + } +} Propchange: archiva/redback/redback-core/trunk/redback-system/src/test/java/org/apache/archiva/redback/system/MockUserManager.java ------------------------------------------------------------------------------ svn:eol-style = native Propchange: archiva/redback/redback-core/trunk/redback-system/src/test/java/org/apache/archiva/redback/system/MockUserManager.java ------------------------------------------------------------------------------ svn:keywords = Author Date Id Revision