KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > cactus > integration > ant > deployment > AbstractDeployableFile


1 /*
2  * ========================================================================
3  *
4  * Copyright 2003-2004 The Apache Software Foundation.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  *
18  * ========================================================================
19  */

20 package org.apache.cactus.integration.ant.deployment;
21
22 import java.io.File JavaDoc;
23
24 import org.apache.cactus.integration.ant.deployment.webapp.WarArchive;
25
26 /**
27  * Logic common to all deployable implementations (WAR and EAR
28  * deployments).
29  *
30  * @since Cactus 1.5
31  * @version $Id: AbstractDeployableFile.java,v 1.1 2004/05/31 20:05:22 vmassol Exp $
32  */

33 public abstract class AbstractDeployableFile
34     implements DeployableFile, Cloneable JavaDoc
35 {
36     /**
37      * The WAR or EAR file to deploy.
38      */

39     protected File JavaDoc deployableFile;
40
41     /**
42      * WAR deployment descriptor as a java object. In case of an EAR,
43      * it is the first WAR containing the Cactus Servlet redirector.
44      */

45     protected WarArchive warArchive;
46
47     /**
48      * Webapp context path containing the Cactus tests
49      */

50     protected String JavaDoc testContext;
51         
52     /**
53      * Servlet mapping of the Cactus Servlet redirector found
54      * in the warArchive WAR.
55      */

56     protected String JavaDoc servletRedirectorMapping;
57
58     /**
59      * Filter mapping of the Cactus Filter redirector found
60      * in the warArchive WAR.
61      */

62     protected String JavaDoc filterRedirectorMapping;
63
64     /**
65      * JSP mapping of the Cactus JSP redirector found
66      * in the warArchive WAR.
67      */

68     protected String JavaDoc jspRedirectorMapping;
69
70     /**
71      * @see DeployableFile#getFile()
72      */

73     public final File JavaDoc getFile()
74     {
75         return this.deployableFile;
76     }
77
78     /**
79      * @param theDeployableFile the file to deploy
80      */

81     public final void setFile(File JavaDoc theDeployableFile)
82     {
83         this.deployableFile = theDeployableFile;
84     }
85     
86     /**
87      * @see DeployableFile#getTestContext()
88      */

89     public final String JavaDoc getTestContext()
90     {
91         return this.testContext;
92     }
93
94     /**
95      * @see DeployableFile#setTestContext(String)
96      */

97     public final void setTestContext(String JavaDoc theTestContext)
98     {
99         this.testContext = theTestContext;
100     }
101     
102     /**
103      * @see DeployableFile#getServletRedirectorMapping()
104      */

105     public final String JavaDoc getServletRedirectorMapping()
106     {
107         return this.servletRedirectorMapping;
108     }
109
110     /**
111      * @param theMapping the servlet redirector mapping
112      */

113     public final void setServletRedirectorMapping(String JavaDoc theMapping)
114     {
115         this.servletRedirectorMapping = theMapping;
116     }
117     
118     /**
119      * @see DeployableFile#getFilterRedirectorMapping()
120      */

121     public final String JavaDoc getFilterRedirectorMapping()
122     {
123         return this.filterRedirectorMapping;
124     }
125
126     /**
127      * @param theMapping the filter redirector mapping
128      */

129     public final void setFilterRedirectorMapping(String JavaDoc theMapping)
130     {
131         this.filterRedirectorMapping = theMapping;
132     }
133
134     /**
135      * @see DeployableFile#getJspRedirectorMapping()
136      */

137     public final String JavaDoc getJspRedirectorMapping()
138     {
139         return this.jspRedirectorMapping;
140     }
141
142     /**
143      * @param theMapping the JSP redirector mapping
144      */

145     public final void setJspRedirectorMapping(String JavaDoc theMapping)
146     {
147         this.jspRedirectorMapping = theMapping;
148     }
149
150     /**
151      * @see DeployableFile#getWarArchive()
152      */

153     public final WarArchive getWarArchive()
154     {
155         return this.warArchive;
156     }
157
158     /**
159      * @see DeployableFile#clone()
160      */

161     public Object JavaDoc clone() throws CloneNotSupportedException JavaDoc
162     {
163         AbstractDeployableFile file = (AbstractDeployableFile) super.clone();
164         file.deployableFile = this.deployableFile;
165         file.warArchive = this.warArchive;
166         file.testContext = this.testContext;
167         file.servletRedirectorMapping = this.servletRedirectorMapping;
168         file.filterRedirectorMapping = this.filterRedirectorMapping;
169         file.jspRedirectorMapping = this.jspRedirectorMapping;
170         return file;
171     }
172     
173     /**
174      * @param theWarArchive the WAR archive object
175      */

176     public final void setWarArchive(WarArchive theWarArchive)
177     {
178         this.warArchive = theWarArchive;
179     }
180
181 }
182
Popular Tags