View Javadoc
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.api.ldap.model.schema.registries;
21  
22  
23  import java.util.Set;
24  
25  import org.apache.directory.api.ldap.model.schema.SchemaObjectWrapper;
26  
27  
28  /**
29   * Base schema interface.
30   *
31   * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
32   */
33  public interface Schema
34  {
35      /**
36       * Checks whether or not this schema is enabled or disabled.
37       * 
38       * @return true if this schema is disabled, false otherwise
39       */
40      boolean isDisabled();
41  
42  
43      /**
44       * Disable the schema
45       */
46      void disable();
47  
48  
49      /**
50       * Checks whether or not this schema is enabled or disabled.
51       * 
52       * @return true if this schema is enabled, false otherwise
53       */
54      boolean isEnabled();
55  
56  
57      /**
58       * Enable the schema
59       */
60      void enable();
61  
62  
63      /**
64       * Gets the name of the owner of the schema objects within this
65       * Schema.
66       *
67       * @return the identifier for the owner of this set's objects
68       */
69      String getOwner();
70  
71  
72      /**
73       * Gets the name of the logical schema the objects of this Schema
74       * belong to: e.g. krb5-kdc may be the logical LDAP schema name.
75       *
76       * @return the name of the logical schema
77       */
78      String getSchemaName();
79  
80  
81      /**
82       * Gets the names of other schemas that the objects within this
83       * Schema depends upon.
84       *
85       * @return the String names of schema dependencies
86       */
87      String[] getDependencies();
88  
89  
90      /**
91       * Add a set of dependencies this schema uses.
92       *
93       * @param dependencies The dependencies to add
94       */
95      void addDependencies( String... dependencies );
96  
97  
98      /**
99       * Gets the set of SchemaObject elements declared in this schema
100      *
101      * @return The Set of associated SchemaObjects
102      */
103     Set<SchemaObjectWrapper> getContent();
104 }