Skip to main content
summaryrefslogtreecommitdiffstats
blob: d3bce2cb3c05498a48b56aa2ae09bce7878248a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*******************************************************************************
 * Copyright (c) 2001, 2004 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 * IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jst.j2ee.commonarchivecore.internal.strategy;



import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.jst.j2ee.commonarchivecore.internal.File;
import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.ArchiveManifest;
import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.FileIterator;
import org.eclipse.jst.j2ee.commonarchivecore.internal.helpers.SaveFilter;


/**
 * Knows how to export the contents of an archive file. This provides a delegation model saving the
 * archive. Examples might include exporting to a zip output stream, to the file system, or into a
 * workbench.
 */
public interface SaveStrategy extends ArchiveStrategy {
	/**
	 * Close and release any resources being held by this object
	 */
	public void close() throws java.io.IOException;

	/**
	 * Notify resources if necessary that save is complete for this archive, being careful not to
	 * close any resources that a parent archive might still be using
	 */
	public void finish() throws java.io.IOException;

	public SaveFilter getFilter();

	/**
	 * Returns whether this archive is saving files to a directory on the file system
	 */
	public boolean isDirectory();

	public void save() throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;

	public void save(ArchiveManifest aManifest) throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;

	public void save(File aFile, FileIterator iterator) throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;

	public void save(File aFile, java.io.InputStream in) throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;

	public void saveMofResource(Resource aResource) throws org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException;

	public void setFilter(SaveFilter aFilter);
}

Back to the top