1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.deployment;
18
19 import java.io.File;
20 import java.io.IOException;
21 import java.io.InputStream;
22
23 /***
24 * <p>
25 * DeploymentObject
26 * </p>
27 * <p>
28 * Object representation of a deployment artifact of some type.
29 * </p>
30 *
31 * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
32 * @version $Id: DeploymentObject.java 516448 2007-03-09 16:25:47Z ate $
33 *
34 */
35 public interface DeploymentObject
36 {
37
38 /***
39 * Closes any resources that may have been opend during the use
40 * of this ObjectHandler.
41 * @throws IOException
42 */
43 void close() throws IOException;
44
45 /***
46 * retreives the the configuration for this deployment artifact
47 * based on the artifact-relative <code>configPath</code>
48 * provided.
49 * @param configPath artifact-relative path to the confiuration file
50 * @return Configuration of this artificat or <code>null</code> if the
51 * configuration is not present in the artifact.
52 * @throws IOException error opening the configuration
53 */
54 InputStream getConfiguration(String configPath) throws IOException;
55 /***
56 *
57 * <p>
58 * getName
59 * </p>
60 *
61 * @return name of the deployment object. Yeilds the same result as if you were
62 * to invoke: <code>new java.io.File(getPath()).getName()</code>
63 */
64 String getName();
65
66 /***
67 *
68 * <p>
69 * getPath
70 * </p>
71 *
72 * @return path the deployment object's source directory or jar/war file.
73 */
74 String getPath();
75
76 /***
77 *
78 * @return the underlying File object
79 */
80 File getFile();
81 }