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;
021    
022    import java.io.Serializable;
023    
024    
025    /**
026     * Most schema objects have some common attributes. This super interface
027     * represents the minimum set of properties exposed by a SchemaObject.
028     * 
029     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
030     * @version $Rev: 664290 $
031     */
032    public interface SchemaObject extends Serializable
033    {
034        /**
035         * Gets whether or not this SchemaObject has been inactivated. All
036         * SchemaObjects except Syntaxes allow for this parameter within their
037         * definition. For Syntaxes this property should always return false in
038         * which case it is never included in the description.
039         * 
040         * @return true if inactive, false if active
041         */
042        boolean isObsolete();
043    
044    
045        /**
046         * Gets usually what is the numeric object identifier assigned to this
047         * SchemaObject. All schema objects except for MatchingRuleUses have an OID
048         * assigned specifically to then. A MatchingRuleUse's OID really is the OID
049         * of it's MatchingRule and not specific to the MatchingRuleUse. This
050         * effects how MatchingRuleUse objects are maintained by the system.
051         * 
052         * @return an OID for this SchemaObject or its MatchingRule if this
053         *         SchemaObject is a MatchingRuleUse object
054         */
055        String getOid();
056    
057    
058        /**
059         * Gets short names for this SchemaObject if any exists for it.
060         * 
061         * @return the names for this SchemaObject
062         */
063        String[] getNamesRef();
064    
065    
066        /**
067         * Gets the first name in the set of short names for this SchemaObject if
068         * any exists for it.
069         * 
070         * @return the first of the names for this SchemaObject or null if one does
071         *         not exist
072         */
073        String getName();
074    
075    
076        /**
077         * Gets a short description about this SchemaObject.
078         * 
079         * @return a short description about this SchemaObject
080         */
081        String getDescription();
082        
083        
084        /**
085         * Gets the name of the schema this SchemaObject is associated with.
086         *
087         * @return the name of the schema associated with this schemaObject
088         */
089        String getSchema();
090    
091    
092        /**
093         * Sets the name of the schema this SchemaObject is associated with.
094         * 
095         * @param schemaName the new schema name
096         */
097        void setSchema( String schemaName );
098    }