1 /******************************************************************************* 2 * Copyright (c) 2006, 2007 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Eclipse Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/epl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package org.eclipse.help; 12 13 import org.eclipse.help.internal.HelpPlugin; 14 15 /** 16 * An <code>AbstractContentExtensionProvider</code> is a mechanism to provide 17 * arbitrary content extensions (e.g. contributions to anchors or element 18 * replacements). <code>AbstractContentExtensionProvider</code>s must be 19 * registered via the <code>org.eclipse.help.contentExtension</code> 20 * extension point. 21 * 22 * @since 3.3 23 */ 24 public abstract class AbstractContentExtensionProvider { 25 26 /** 27 * Returns all extensions for this provider. Providers are free to 28 * provide any number of contributions (zero or more). 29 * 30 * @param locale the locale for which to get contributions 31 * @return all the content extensions for this provider 32 */ 33 public abstract IContentExtension[] getContentExtensions(String locale); 34 35 /** 36 * Notifies the platform that the content managed by this provider may 37 * have changed since the last time <code>getContentExtensions()</code> 38 * was called, and needs to be updated. 39 */ 40 protected void contentChanged() { 41 // will force a reload next time around 42 HelpPlugin.getContentExtensionManager().clearCache(); 43 } 44 } 45