01: /*******************************************************************************
02: * Copyright (c) 2000, 2005 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.jdt.ui.jarpackager;
11:
12: import org.eclipse.core.runtime.CoreException;
13: import org.eclipse.core.runtime.IStatus;
14:
15: /**
16: * Reads the description file of a JAR package data object
17: * into such an object.
18: * <p>
19: * The format is defined by the client who implements the
20: * reader/writer pair.
21: * </p>
22: *
23: * @see org.eclipse.jdt.ui.jarpackager.JarPackageData
24: * @see org.eclipse.jdt.ui.jarpackager.IJarDescriptionWriter
25: * @since 2.0
26: */
27: public interface IJarDescriptionReader {
28:
29: /**
30: * Reads Jar Package description and fills data into
31: * the JAR Package data object.
32: * <p>
33: * It is the client's responsibility to close this reader.
34: * </p>
35: *
36: * @param jarPackageData the object into which data is filled
37: * @throws CoreException if read failed, e.g. I/O error during read operation
38: */
39: public void read(JarPackageData jarPackageData)
40: throws CoreException;
41:
42: /**
43: * Closes this reader.
44: * <p>
45: * It is the client's responsibility to close this reader.
46: * </p>
47: *
48: * @throws CoreException if closing fails, e.g. I/O error during close operation
49: */
50: public void close() throws CoreException;
51:
52: /**
53: * Returns the status of this reader.
54: * If there were any errors, the result is a status object containing
55: * individual status objects for each error.
56: * If there were no errors, the result is a status object with error code <code>OK</code>.
57: *
58: * @return the status of this operation
59: */
60: public IStatus getStatus();
61: }
|