View Javadoc

1   /*
2    *   @(#) $Id: AddDirectoryPartitionConfiguration.java 307079 2005-10-07 10:38:21Z trustin $
3    *
4    *   Copyright 2004 The Apache Software Foundation
5    *
6    *   Licensed under the Apache License, Version 2.0 (the "License");
7    *   you may not use this file except in compliance with the License.
8    *   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, software
13   *   distributed under the License is distributed on an "AS IS" BASIS,
14   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   *   See the License for the specific language governing permissions and
16   *   limitations under the License.
17   *
18   */
19  package org.apache.ldap.server.configuration;
20  
21  import org.apache.ldap.server.partition.DirectoryPartition;
22  import org.apache.ldap.server.partition.DirectoryPartitionNexus;
23  
24  /***
25   * A {@link Configuration} that adds a new {@link DirectoryPartition} to
26   * the current {@link DirectoryPartitionNexus}.
27   *
28   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
29   * @version $Rev: 307079 $, $Date: 2005-10-07 06:38:21 -0400 (Fri, 07 Oct 2005) $
30   */
31  public class AddDirectoryPartitionConfiguration extends Configuration
32  {
33      private static final long serialVersionUID = -6690435863387769527L;
34      
35      private final DirectoryPartitionConfiguration directoryPartitionConfiguration;
36  
37      public AddDirectoryPartitionConfiguration( DirectoryPartitionConfiguration directoryPartitionConfiguration )
38      {
39          if( directoryPartitionConfiguration == null )
40          {
41              throw new NullPointerException( "directoryPartitionConfiguration" );
42          }
43          
44          this.directoryPartitionConfiguration = directoryPartitionConfiguration;
45      }
46      
47      public DirectoryPartitionConfiguration getDirectoryPartitionConfiguration()
48      {
49          return directoryPartitionConfiguration;
50      }
51      
52      public void validate()
53      {
54          directoryPartitionConfiguration.validate();
55      }
56  }