001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 * 019 */ 020package org.apache.directory.shared.ldap.model.schema; 021 022import java.util.Map; 023 024 025/** 026 * A class is used to resolve the normalizer mapping hash used for normalization. 027 * This interface is implemented and passed into several kinds of parsers that 028 * need to handle the normalization of LDAP name strings. 029 * 030 * Why you may ask are we doing this? Why not just pass in the map of 031 * normalizers to these parsers and let them use that? First off this mapping 032 * will not be static when dynamic updates are enabled to schema. So if 033 * we just passed in the map then there would be no way to set a new map or 034 * trigger the change of the map when schema changes. Secondly we cannot just 035 * pass server side objects that return this mapping because these parsers may 036 * and will be used in client side applications. They will not have access to 037 * these server side objects that generate these mappings. Instead when a 038 * resolver is used we can create mock or almost right implementations. 039 * 040 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 041 */ 042public interface NormalizerMappingResolver<E extends Normalizer> 043{ 044 Map<String, E> getNormalizerMapping() throws Exception; 045}