FileDocCategorySizeDatePackage
LocalUsersRepository.javaAPI DocApache James 2.3.13428Fri Jan 12 12:56:22 GMT 2007org.apache.james.core

LocalUsersRepository

public class LocalUsersRepository extends Object implements org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.activity.Initializable, org.apache.james.services.UsersRepository
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. *

Fields Summary
private org.apache.james.services.UsersStore
usersStore
private org.apache.james.services.UsersRepository
users
Constructors Summary
Methods Summary
public booleanaddUser(org.apache.james.services.User user)

        return users.addUser(user);
    
public voidaddUser(java.lang.String name, java.lang.Object attributes)

        users.addUser(name,attributes);
    
public booleanaddUser(java.lang.String username, java.lang.String password)

        return users.addUser(username, password);
    
public booleancontains(java.lang.String name)

        return users.contains(name);
    
public booleancontainsCaseInsensitive(java.lang.String name)

        return users.containsCaseInsensitive(name);
    
public intcountUsers()

        return users.countUsers();
    
public java.lang.StringgetRealName(java.lang.String name)

        return users.getRealName(name);
    
public org.apache.james.services.UsergetUserByName(java.lang.String name)

        return users.getUserByName(name);
    
public org.apache.james.services.UsergetUserByNameCaseInsensitive(java.lang.String name)

        return users.getUserByNameCaseInsensitive(name);
    
public voidinitialize()

        users = usersStore.getRepository("LocalUsers");
        if (users == null) {
            throw new ServiceException("","The user repository could not be found.");
        }
    
public java.util.Iteratorlist()

        return users.list();
    
public voidremoveUser(java.lang.String name)

        users.removeUser(name);
    
public voidservice(org.apache.avalon.framework.service.ServiceManager serviceManager)

        usersStore =
           (UsersStore) serviceManager.lookup(UsersStore.ROLE);
    
public booleantest(java.lang.String name, java.lang.String password)

        return users.test(name,password);
    
public booleanupdateUser(org.apache.james.services.User user)

        return users.updateUser(user);