1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 * 19 */ 20 package org.apache.directory.server.protocol.shared; 21 22 import org.apache.directory.server.constants.ServerDNConstants; 23 24 25 /** 26 * Base class shared by all protocol providers for configuration. 27 * 28 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 29 * @version $Rev: 603104 $, $Date: 2007-12-11 01:19:02 +0100 (Di, 11 Dez 2007) $ 30 */ 31 public abstract class DirectoryBackedService extends AbstractProtocolService 32 { 33 /** 34 * The single location where entries are stored. If this service 35 * is catalog based the store will search the system partition 36 * configuration for catalog entries. Otherwise it will use this 37 * search base as a single point of searching the DIT. 38 */ 39 private String searchBaseDn = ServerDNConstants.USER_EXAMPLE_COM_DN; 40 41 /** determines if the search base is pointer to a catelog or a single entry point */ 42 private boolean catelogBased; 43 44 45 /** 46 * Returns the search base DN. 47 * 48 * @return The search base DN. 49 */ 50 public String getSearchBaseDn() 51 { 52 return searchBaseDn; 53 } 54 55 56 /** 57 * @param searchBaseDn The searchBaseDn to set. 58 */ 59 public void setSearchBaseDn( String searchBaseDn ) 60 { 61 this.searchBaseDn = searchBaseDn; 62 } 63 64 65 /** 66 * Gets true if this service uses a catelog for searching different 67 * regions of the DIT for its data. 68 * 69 * @return true if the search base dn is for a catelog, false otherwise 70 */ 71 public boolean isCatelogBased() 72 { 73 return catelogBased; 74 } 75 76 77 /** 78 * Set true if this service uses a catelog for searching different 79 * regions of the DIT for its data. 80 * 81 * @param catelogBased if the search base dn is for a catelog, false otherwise 82 */ 83 public void setCatelogBased( boolean catelogBased ) 84 { 85 this.catelogBased = catelogBased; 86 } 87 }