1package org.apache.archiva.redback.users.ldap.ctl;
23/*4 * Licensed to the Apache Software Foundation (ASF) under one5 * or more contributor license agreements. See the NOTICE file6 * distributed with this work for additional information7 * regarding copyright ownership. The ASF licenses this file8 * to you under the Apache License, Version 2.0 (the9 * "License"); you may not use this file except in compliance10 * with the License. You may obtain a copy of the License at11 *12 * http://www.apache.org/licenses/LICENSE-2.013 *14 * Unless required by applicable law or agreed to in writing,15 * software distributed under the License is distributed on an16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY17 * KIND, either express or implied. See the License for the18 * specific language governing permissions and limitations19 * under the License.20 */2122import org.apache.archiva.redback.common.ldap.user.LdapUser;
23import org.apache.archiva.redback.users.User;
24import org.apache.archiva.redback.common.ldap.MappingException;
25import org.apache.archiva.redback.users.ldap.LdapUserQuery;
2627import javax.naming.directory.DirContext;
28import java.util.Collection;
29import java.util.List;
30import java.util.Map;
3132/**33 *34 */35publicinterfaceLdapController36 {
3738void removeUser( String principal, DirContext context )
39throws LdapControllerException;
4041void updateUser( User user, DirContext context )
42throws LdapControllerException, MappingException;
4344boolean userExists( String key, DirContext context )
45throws LdapControllerException;
4647 Collection<User> getUsers( DirContext context )
48throws LdapControllerException, MappingException;
4950void createUser( User user, DirContext context, boolean encodePasswordIfChanged )
51throws LdapControllerException, MappingException;
5253LdapUser getUser( String key, DirContext context )
54throws LdapControllerException, MappingException;
5556 List<User> getUsersByQuery( LdapUserQuery query, DirContext context )
57throws LdapControllerException, MappingException;
5859void initialize();
6061/**62 * @param dirContext63 * @return Map key == username and value == list of role names64 * @throws LdapControllerException65 */66 Map<String, Collection<String>> findUsersWithRoles( DirContext dirContext )
67throws LdapControllerException;
68 }