001    // Copyright 2004, 2005 The Apache Software Foundation
002    //
003    // Licensed under the Apache License, Version 2.0 (the "License");
004    // you may not use this file except in compliance with the License.
005    // You may obtain a copy of the License at
006    //
007    //     http://www.apache.org/licenses/LICENSE-2.0
008    //
009    // Unless required by applicable law or agreed to in writing, software
010    // distributed under the License is distributed on an "AS IS" BASIS,
011    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
012    // See the License for the specific language governing permissions and
013    // limitations under the License.
014    
015    package org.apache.hivemind.internal;
016    
017    import org.apache.commons.logging.Log;
018    import org.apache.hivemind.ErrorLog;
019    import org.apache.hivemind.Locatable;
020    
021    /**
022     * Base interface for service and configuration extension points.
023     * 
024     * @author Howard Lewis Ship
025     */
026    public interface ExtensionPoint extends Locatable
027    {
028        /**
029         * Returns the fully qualified id of the extension point.
030         */
031        public String getExtensionPointId();
032    
033        /**
034         * Returns the {@link Module} containing the extension point.
035         */
036        public Module getModule();
037    
038        /**
039         * Returns true if the extension point is visible to the specified module.
040         * 
041         * @param module
042         *            The module to check for, may be null (in which case the extension is visible only
043         *            if public)
044         * @since 1.1
045         */
046    
047        public boolean visibleToModule(Module module);
048    
049        /**
050         * Returns the Log instance for this extension point.
051         */
052    
053        public Log getLog();
054    
055        /**
056         * Returns an {@link org.apache.hivemind.ErrorLog} used to report any recoverable errors related
057         * to the extension point.
058         * 
059         * @since 1.1
060         */
061    
062        public ErrorLog getErrorLog();
063        
064    }