01: /*
02: * ProviderPackageFile.java
03: *
04: * Created on October 10, 2001, 11:24 AM
05: */
06:
07: package com.sun.portal.desktop.deployment;
08:
09: import java.io.InputStream;
10:
11: import java.io.File;
12:
13: import java.util.zip.ZipEntry;
14:
15: import com.sun.portal.util.Platform;
16:
17: /**
18: * Abstract class to encapsulate file specifications when building a .par file.
19: * Specific instances know what types of operations (provider/channel) they apply to,
20: * how to obtain an input stream to their contents, how to add an inclusion to themselves
21: * to the manifest, and how to obtain a zip entry for themselves from the manifest.
22: *
23: * @author yabob
24: * @version
25: */
26: public abstract class ProviderPackageFile {
27:
28: public ProviderPackageFile(int types) {
29: m_Types = types;
30: }
31:
32: public int getTypes() {
33: return m_Types;
34: }
35:
36: public abstract InputStream getStream() throws ParFileException;
37:
38: public abstract void addManifestInclusion(ParManifest man,
39: String name) throws ParFileException;
40:
41: public abstract ZipEntry getZipEntry(ParManifest man)
42: throws ParFileException;
43:
44: protected int m_Types;
45: public static final String FS = Platform.fs;
46: }
|