001: /*
002: * ========================================================================
003: *
004: * Copyright 2003-2004 The Apache Software Foundation.
005: *
006: * Licensed under the Apache License, Version 2.0 (the "License");
007: * you may not use this file except in compliance with the License.
008: * You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing, software
013: * distributed under the License is distributed on an "AS IS" BASIS,
014: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015: * See the License for the specific language governing permissions and
016: * limitations under the License.
017: *
018: * ========================================================================
019: */
020: package org.apache.cactus.integration.ant.deployment;
021:
022: import java.io.File;
023:
024: import org.apache.cactus.integration.ant.deployment.webapp.WarArchive;
025:
026: /**
027: * Represents a component to deploy in a container. It can either be
028: * a WAR or an EAR file.
029: *
030: * @version $Id: DeployableFile.java 239003 2004-05-31 20:05:27Z vmassol $
031: */
032: public interface DeployableFile {
033: /**
034: * @return the file to deploy in a container (either WAR or EAR)
035: */
036: File getFile();
037:
038: /**
039: * Returns whether the deployable file is a web-app archive (WAR).
040: *
041: * @return <code>true</code> if the deployable file is a WAR
042: */
043: boolean isWar();
044:
045: /**
046: * Returns whether the deployable file is an enterprise application archive
047: * (EAR).
048: *
049: * @return <code>true</code> if the deployable file is a EAR
050: */
051: boolean isEar();
052:
053: /**
054: * @return the WAR deployment descriptor object for the WAR containing
055: * the Cactus Servlet redirector
056: */
057: WarArchive getWarArchive();
058:
059: /**
060: * @return the webapp context which holds the Cactus tests
061: */
062: String getTestContext();
063:
064: /**
065: * @param theTestContext the test context that will be used to test if the
066: * container is started or not
067: */
068: void setTestContext(String theTestContext);
069:
070: /**
071: * Returns the first URL-pattern to which the Cactus servlet redirector is
072: * mapped in the deployment descriptor.
073: *
074: * @return The mapping, or <code>null</code> if the servlet redirector is
075: * not defined or mapped in the descriptor
076: */
077: String getServletRedirectorMapping();
078:
079: /**
080: * Returns the first URL-pattern to which the Cactus filter redirector is
081: * mapped in the deployment descriptor.
082: *
083: * @return The mapping, or <code>null</code> if the filter redirector is
084: * not defined or mapped in the descriptor
085: */
086: String getFilterRedirectorMapping();
087:
088: /**
089: * Returns the first URL-pattern to which the Cactus JSP redirector is
090: * mapped in the deployment descriptor.
091: *
092: * @return The mapping, or <code>null</code> if the JSP redirector is
093: * not defined or mapped in the descriptor
094: */
095: String getJspRedirectorMapping();
096:
097: /**
098: * Clone the object.
099: * @return the object clone
100: * @throws CloneNotSupportedException If clone is not supported (duh)
101: */
102: Object clone() throws CloneNotSupportedException;
103: }
|