KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > core > IContentConsumer


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 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.update.core;
12
13 import org.eclipse.core.runtime.CoreException;
14 import org.eclipse.core.runtime.IProgressMonitor;
15
16 /**
17  * Generic content consumer.
18  * A generic content consumer is used to store plug-in and non-plug-in files
19  * for a feature.
20  * <p>
21  * Clients may implement this interface. However, in most cases clients
22  * will only use the content consumer provided by the feature type(s)
23  * implemented by the platform.
24  * </p>
25  * <p>
26  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
27  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
28  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
29  * (repeatedly) as the API evolves.
30  * </p>
31  * @see org.eclipse.update.core.IFeatureContentConsumer
32  * @since 2.0
33  */

34 public interface IContentConsumer {
35
36     /**
37      * Stores a file.
38      *
39      * @see IFeatureContentConsumer#open(IPluginEntry)
40      * @see IFeatureContentConsumer#open(INonPluginEntry)
41      * @param contentReference reference to the file to store
42      * @param monitor progress monitor, can be <code>null</code>
43      * @exception CoreException
44      * @since 2.0
45      */

46     public void store(ContentReference contentReference, IProgressMonitor monitor)
47         throws CoreException;
48
49     /**
50      * Indicates successful completion of the store operations for this
51      * consumer
52      *
53      * @exception CoreException
54      * @since 2.0
55      */

56     public void close() throws CoreException;
57
58 }
59
Popular Tags