KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > backend > DeploymentEventInfo


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23
24 /*
25  * DeploymentEventInfo.java
26  *
27  * Created on April 21, 2003.
28  */

29
30 package com.sun.enterprise.deployment.backend;
31
32 import java.io.File JavaDoc;
33
34 import com.sun.enterprise.deployment.Application;
35
36 /**
37  * A <code>DeploymentEventInfo</code> is used to store all necessary
38  * information for the <code>DeploymentEvent</code> event that gets delivered
39  * whenever a <code>DeploymentEventListener</code> registers itself with the
40  * <code>DeploymentEventManager</code>.
41  *
42  * This class does not have setXXX methods as all the values are set
43  * during instance construction.
44  * @author Marina Vatkina
45  */

46 public class DeploymentEventInfo
47 {
48     /** The directory where the archive has been exploded */
49     private File JavaDoc srcDir;
50
51     /** The directory where all the code is generated and being compiled */
52     private File JavaDoc stubsDir;
53
54     /** The directory where the previous code version was generated and compiled */
55     private File JavaDoc oldStubsDir;
56
57     /** The Application deployment descriptor object */
58     private Application application;
59
60     /** The deployment request object */
61     private DeploymentRequest request;
62
63     /** Constructs <code>DeploymentEventInfo</code> from all neccessary
64      * elements.
65      * @param srcDir the directory where the archive has been exploded.
66      * @param stubsDir the directory where all the code is generated and being compiled.
67      * @param application the Application deployment descriptor object for the event.
68      * @param request the deployment request object.
69      */

70     public DeploymentEventInfo(File JavaDoc srcDir, File JavaDoc stubsDir, Application application,
71         DeploymentRequest request) {
72
73         this.srcDir = srcDir;
74         this.stubsDir = stubsDir;
75         this.application = application;
76         this.request = request;
77         this.oldStubsDir = null;
78        
79     }
80
81     /** Constructs <code>DeploymentEventInfo</code> from all neccessary
82      * elements.
83      * @param srcDir the directory where the archive has been exploded.
84      * @param stubsDir the directory where all the code is generated and being compiled.
85      * @param oldStubsDir the directory where the previous code version was generated and compiled.
86      * @param application the Application deployment descriptor object for the event.
87      * @param request the deployment request object.
88      */

89     public DeploymentEventInfo(File JavaDoc srcDir, File JavaDoc stubsDir, File JavaDoc oldStubsDir,
90         Application application, DeploymentRequest request) {
91
92         this.srcDir = srcDir;
93         this.stubsDir = stubsDir;
94         this.oldStubsDir = oldStubsDir;
95         this.application = application;
96         this.request = request;
97        
98     }
99      
100      /**
101       * Constructs DeploymentEventInfo with request object
102       * @param DeploymentRequest
103       * @return DeploymentEventInfo
104       */

105      public DeploymentEventInfo(DeploymentRequest request) {
106          this.request = request;
107      }
108
109
110     /** Returns the directory where the archive has been exploded.
111      * @return directory where the archive has been exploded.
112      */

113     public File JavaDoc getSrcDir() {
114         return srcDir;
115     }
116
117     /** Returns the directory where all the code is generated and being compiled.
118      * @return directory where all the code is generated and being compiled.
119      */

120     public File JavaDoc getStubsDir() {
121         return stubsDir;
122     }
123
124     /** Returns the directory where the previous code version was generated and compiled.
125      * @return directory where the previous code version was generated and compiled.
126      */

127     public File JavaDoc getOldStubsDir() {
128         return oldStubsDir;
129     }
130
131     /** Returns the Application deployment descriptor object.
132      * @return application deployment descriptor object.
133      */

134     public Application getApplicationDescriptor() {
135         return application;
136     }
137
138     /** Returns the deployment request object.
139      * @return request the deployment request object.
140      */

141     public DeploymentRequest getDeploymentRequest() {
142         return request;
143     }
144
145 }
146
Popular Tags