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.config.beans;
21
22
23 import org.apache.directory.api.ldap.model.constants.SchemaConstants;
24 import org.apache.directory.api.ldap.model.name.Dn;
25 import org.apache.directory.server.config.ConfigurationElement;
26
27
28 /**
29 * A class used to store the KdcServer configuration.
30 *
31 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
32 */
33 public class DSBasedServerBean extends ServerBean
34 {
35 /**
36 * The single location where entries are stored. If this service
37 * is catalog based the store will search the system partition
38 * configuration for catalog entries. Otherwise it will use this
39 * search base as a single point of searching the DIT.
40 */
41 @ConfigurationElement(attributeType = SchemaConstants.ADS_SEARCH_BASE_DN, isOptional = true)
42 private Dn searchBaseDn;
43
44
45 /**
46 * Create a new JournalBean instance
47 */
48 public DSBasedServerBean()
49 {
50 }
51
52
53 /**
54 * Returns the search base Dn.
55 *
56 * @return The search base Dn.
57 */
58 public Dn getSearchBaseDn()
59 {
60 return searchBaseDn;
61 }
62
63
64 /**
65 * @param searchBaseDn The searchBaseDn to set.
66 */
67 public void setSearchBaseDn( Dn searchBaseDn )
68 {
69 this.searchBaseDn = searchBaseDn;
70 }
71
72
73 /**
74 * {@inheritDoc}
75 */
76 @Override
77 public String toString( String tabs )
78 {
79 StringBuilder sb = new StringBuilder();
80
81 sb.append( super.toString( tabs ) );
82 sb.append( toString( tabs, SchemaConstants.ADS_SEARCH_BASE_DN, searchBaseDn ) );
83
84 return sb.toString();
85 }
86
87
88 /**
89 * {@inheritDoc}
90 */
91 @Override
92 public String toString()
93 {
94 return toString( "" );
95 }
96 }