KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > avalon > phoenix > components > deployer > installer > Installation


1 /*
2  * Copyright (C) The Apache Software Foundation. All rights reserved.
3  *
4  * This software is published under the terms of the Apache Software License
5  * version 1.1, a copy of which has been included with this distribution in
6  * the LICENSE.txt file.
7  */

8 package org.apache.avalon.phoenix.components.deployer.installer;
9
10 import java.io.File JavaDoc;
11
12 /**
13  * Descriptor for installation.
14  * This descriptor contains all the information relating to
15  * installed application. In particular it locates all the
16  * jars in Classpath, config files and installation directory.
17  *
18  * @author <a HREF="mailto:peter at apache.org">Peter Donald</a>
19  * @version $Revision: 1.2 $ $Date: 2002/08/06 11:57:40 $
20  */

21 public final class Installation
22 {
23     ///The source of installation (usually a directory in .sar format or a .sar file)
24
private final File JavaDoc m_source;
25
26     ///Directory in which application is installed
27
private final File JavaDoc m_directory;
28
29     ///Directory in which application temporary/work data is stored
30
private final File JavaDoc m_workDirectory;
31
32     ///URL to block configuration data
33
private final String JavaDoc m_config;
34
35     ///URL to assembly data
36
private final String JavaDoc m_assembly;
37
38     ///URL to application configuration data
39
private final String JavaDoc m_environment;
40
41     ///ClassPath for application
42
private final String JavaDoc[] m_classPath;
43
44     ///Info for expanded files
45
private final FileDigest[] m_digests;
46
47     ///Installation timestamp
48
private final long m_timestamp;
49
50     public Installation( final File JavaDoc source,
51                          final File JavaDoc directory,
52                          final File JavaDoc workDirectory,
53                          final String JavaDoc config,
54                          final String JavaDoc assembly,
55                          final String JavaDoc environment,
56                          final String JavaDoc[] classPath,
57                          final FileDigest[] digests,
58                          final long timestamp )
59     {
60         m_source = source;
61         m_directory = directory;
62         m_workDirectory = workDirectory;
63         m_config = config;
64         m_assembly = assembly;
65         m_environment = environment;
66         m_classPath = classPath;
67         m_digests = digests;
68         m_timestamp = timestamp;
69     }
70
71     /**
72      * Get the source of application. (Usually a
73      * directory in .sar format or a .sar)
74      *
75      * @return the source of application
76      */

77     public File JavaDoc getSource()
78     {
79         return m_source;
80     }
81
82     /**
83      * Get directory application is installed into.
84      *
85      * @return the applications base directory
86      */

87     public File JavaDoc getDirectory()
88     {
89         return m_directory;
90     }
91
92     /**
93      * Get the directory in which temporary data for this application
94      * is stored.
95      *
96      * @return the work directory for application.
97      */

98     public File JavaDoc getWorkDirectory()
99     {
100         return m_workDirectory;
101     }
102
103     /**
104      * Retrieve location of applications config.xml file.
105      *
106      * @return url to config.xml file
107      */

108     public String JavaDoc getConfig()
109     {
110         return m_config;
111     }
112
113     /**
114      * Retrieve location of applications assembly.xml file.
115      *
116      * @return url to assembly.xml file
117      */

118     public String JavaDoc getAssembly()
119     {
120         return m_assembly;
121     }
122
123     /**
124      * Retrieve location of applications environment.xml file.
125      *
126      * @return url to environment.xml file
127      */

128     public String JavaDoc getEnvironment()
129     {
130         return m_environment;
131     }
132
133     /**
134      * Retrieve ClassPath for application.
135      *
136      * @return the classpath
137      */

138     public String JavaDoc[] getClassPath()
139     {
140         return m_classPath;
141     }
142
143     /** Retrieve file digests.
144      *
145      * @return the file digest list.
146      */

147     public FileDigest[] getFileDigests()
148     {
149         return m_digests;
150     }
151
152     /** Retrieve the timestamp.
153      *
154      * @return the timestamp when installation occured.
155      */

156     public long getTimestamp()
157     {
158         return m_timestamp;
159     }
160 }
161
Popular Tags