KickJava   Java API By Example, From Geeks To Geeks.

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


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  * Represents a component to deploy in a container. It can either be
28  * a WAR or an EAR file.
29  *
30  * @version $Id: DeployableFile.java,v 1.1 2004/05/31 20:05:22 vmassol Exp $
31  */

32 public interface DeployableFile
33 {
34     /**
35      * @return the file to deploy in a container (either WAR or EAR)
36      */

37     File JavaDoc getFile();
38
39     /**
40      * Returns whether the deployable file is a web-app archive (WAR).
41      *
42      * @return <code>true</code> if the deployable file is a WAR
43      */

44     boolean isWar();
45
46     /**
47      * Returns whether the deployable file is an enterprise application archive
48      * (EAR).
49      *
50      * @return <code>true</code> if the deployable file is a EAR
51      */

52     boolean isEar();
53
54     /**
55      * @return the WAR deployment descriptor object for the WAR containing
56      * the Cactus Servlet redirector
57      */

58     WarArchive getWarArchive();
59     
60     /**
61      * @return the webapp context which holds the Cactus tests
62      */

63     String JavaDoc getTestContext();
64
65     /**
66      * @param theTestContext the test context that will be used to test if the
67      * container is started or not
68      */

69     void setTestContext(String JavaDoc theTestContext);
70     
71     /**
72      * Returns the first URL-pattern to which the Cactus servlet redirector is
73      * mapped in the deployment descriptor.
74      *
75      * @return The mapping, or <code>null</code> if the servlet redirector is
76      * not defined or mapped in the descriptor
77      */

78     String JavaDoc getServletRedirectorMapping();
79
80     /**
81      * Returns the first URL-pattern to which the Cactus filter redirector is
82      * mapped in the deployment descriptor.
83      *
84      * @return The mapping, or <code>null</code> if the filter redirector is
85      * not defined or mapped in the descriptor
86      */

87     String JavaDoc getFilterRedirectorMapping();
88
89     /**
90      * Returns the first URL-pattern to which the Cactus JSP redirector is
91      * mapped in the deployment descriptor.
92      *
93      * @return The mapping, or <code>null</code> if the JSP redirector is
94      * not defined or mapped in the descriptor
95      */

96     String JavaDoc getJspRedirectorMapping();
97
98     /**
99      * Clone the object.
100      * @return the object clone
101      * @throws CloneNotSupportedException If clone is not supported (duh)
102      */

103     Object JavaDoc clone() throws CloneNotSupportedException JavaDoc;
104 }
105
Popular Tags