001/* 002 * (C) Copyright 2006-2011 Nuxeo SA (http://nuxeo.com/) and others. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 * 016 * Contributors: 017 * Nuxeo - initial API and implementation 018 * $Id$ 019 */ 020 021package org.nuxeo.runtime.model; 022 023/** 024 * A component extension point. 025 * <p> 026 * Extension points are described by a name and a list of optional contribution object classes. 027 * <p> 028 * When defined, the contribution object classes are the type of objects accepted by this extension point. 029 * <p> 030 * The extension point is also responsible for extracting contribution objects from the extension data, if any. 031 * 032 * @author <a href="mailto:bs@nuxeo.com">Bogdan Stefanescu</a> 033 */ 034public interface ExtensionPoint { 035 036 /** 037 * Gets the extension point name. 038 * 039 * @return the extension point name 040 */ 041 String getName(); 042 043 /** 044 * Gets the object types of the contributions accepted by this extension point. 045 * 046 * @return the accepted contribution types 047 */ 048 Class<?>[] getContributions(); 049 050 /** 051 * Gets the comment attached to this extension point if any. 052 * 053 * @return the comment 054 */ 055 String getDocumentation(); 056 057 /** 058 * Get the component owning the base extension which this one extends. 059 * <p> 060 * If this method returns null, it means the current extension point is extending another extension point and should 061 * forward any contribution to the base extension. The base extension has the same name as this one but it is 062 * declared in another component. 063 * 064 * @return the base extension point if this extension point is extending another extension point, or null if none 065 */ 066 String getSuperComponent(); 067 068}