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 */
020 package org.apache.directory.shared.ldap.schema.registries;
021
022 import java.util.Set;
023
024 import org.apache.directory.shared.ldap.schema.SchemaObjectWrapper;
025
026
027 /**
028 * Base schema interface.
029 *
030 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
031 * @version $Rev$
032 */
033 public interface Schema
034 {
035 /**
036 * Checks whether or not this schema is enabled or disabled.
037 *
038 * @return true if this schema is disabled, false otherwise
039 */
040 boolean isDisabled();
041
042
043 /**
044 * Disable the schema
045 */
046 void disable();
047
048
049 /**
050 * Checks whether or not this schema is enabled or disabled.
051 *
052 * @return true if this schema is enabled, false otherwise
053 */
054 boolean isEnabled();
055
056
057 /**
058 * Enable the schema
059 */
060 void enable();
061
062
063 /**
064 * Gets the name of the owner of the schema objects within this
065 * Schema.
066 *
067 * @return the identifier for the owner of this set's objects
068 */
069 String getOwner();
070
071
072 /**
073 * Gets the name of the logical schema the objects of this Schema
074 * belong to: e.g. krb5-kdc may be the logical LDAP schema name.
075 *
076 * @return the name of the logical schema
077 */
078 String getSchemaName();
079
080
081 /**
082 * Gets the names of other schemas that the objects within this
083 * Schema depends upon.
084 *
085 * @return the String names of schema dependencies
086 */
087 String[] getDependencies();
088
089
090 /**
091 * Add a set of dependencies this schema uses.
092 *
093 * @param strings The dependencies to add
094 */
095 void addDependencies( String... dependencies );
096
097
098 /**
099 * Gets the set of SchemaObject elements declared in this schema
100 *
101 * @return The Set of associated SchemaObjects
102 */
103 Set<SchemaObjectWrapper> getContent();
104 }