|
|||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| AbstractDeployableFile.java | - | 91.7% | 91.7% | 91.7% |
|
||||||||||||||
| 1 |
/*
|
|
| 2 |
* ====================================================================
|
|
| 3 |
*
|
|
| 4 |
* The Apache Software License, Version 1.1
|
|
| 5 |
*
|
|
| 6 |
* Copyright (c) 2003 The Apache Software Foundation. All rights
|
|
| 7 |
* reserved.
|
|
| 8 |
*
|
|
| 9 |
* Redistribution and use in source and binary forms, with or without
|
|
| 10 |
* modification, are permitted provided that the following conditions
|
|
| 11 |
* are met:
|
|
| 12 |
*
|
|
| 13 |
* 1. Redistributions of source code must retain the above copyright
|
|
| 14 |
* notice, this list of conditions and the following disclaimer.
|
|
| 15 |
*
|
|
| 16 |
* 2. Redistributions in binary form must reproduce the above copyright
|
|
| 17 |
* notice, this list of conditions and the following disclaimer in
|
|
| 18 |
* the documentation and/or other materials provided with the
|
|
| 19 |
* distribution.
|
|
| 20 |
*
|
|
| 21 |
* 3. The end-user documentation included with the redistribution, if
|
|
| 22 |
* any, must include the following acknowlegement:
|
|
| 23 |
* "This product includes software developed by the
|
|
| 24 |
* Apache Software Foundation (http://www.apache.org/)."
|
|
| 25 |
* Alternately, this acknowlegement may appear in the software itself,
|
|
| 26 |
* if and wherever such third-party acknowlegements normally appear.
|
|
| 27 |
*
|
|
| 28 |
* 4. The names "The Jakarta Project", "Cactus" and "Apache Software
|
|
| 29 |
* Foundation" must not be used to endorse or promote products
|
|
| 30 |
* derived from this software without prior written permission. For
|
|
| 31 |
* written permission, please contact apache@apache.org.
|
|
| 32 |
*
|
|
| 33 |
* 5. Products derived from this software may not be called "Apache"
|
|
| 34 |
* nor may "Apache" appear in their names without prior written
|
|
| 35 |
* permission of the Apache Group.
|
|
| 36 |
*
|
|
| 37 |
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
|
|
| 38 |
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
| 39 |
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
| 40 |
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
|
|
| 41 |
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
| 42 |
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
| 43 |
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
|
| 44 |
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
| 45 |
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
| 46 |
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
|
|
| 47 |
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
| 48 |
* SUCH DAMAGE.
|
|
| 49 |
* ====================================================================
|
|
| 50 |
*
|
|
| 51 |
* This software consists of voluntary contributions made by many
|
|
| 52 |
* individuals on behalf of the Apache Software Foundation. For more
|
|
| 53 |
* information on the Apache Software Foundation, please see
|
|
| 54 |
* <http://www.apache.org/>.
|
|
| 55 |
*
|
|
| 56 |
*/
|
|
| 57 |
package org.apache.cactus.integration.ant.container;
|
|
| 58 |
|
|
| 59 |
import java.io.File;
|
|
| 60 |
|
|
| 61 |
import org.apache.cactus.integration.ant.deployment.WarArchive;
|
|
| 62 |
|
|
| 63 |
/**
|
|
| 64 |
* Logic common to all deployable implementations (WAR and EAR
|
|
| 65 |
* deployments).
|
|
| 66 |
*
|
|
| 67 |
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
|
|
| 68 |
*
|
|
| 69 |
* @since Cactus 1.5
|
|
| 70 |
* @version $Id: AbstractDeployableFile.java,v 1.1.2.2 2003/10/25 17:22:05 vmassol Exp $
|
|
| 71 |
*/
|
|
| 72 |
public abstract class AbstractDeployableFile implements DeployableFile |
|
| 73 |
{
|
|
| 74 |
/**
|
|
| 75 |
* The WAR or EAR file to deploy.
|
|
| 76 |
*/
|
|
| 77 |
protected File deployableFile;
|
|
| 78 |
|
|
| 79 |
/**
|
|
| 80 |
* WAR deployment descriptor as a java object. In case of an EAR,
|
|
| 81 |
* it is the first WAR containing the Cactus Servlet redirector.
|
|
| 82 |
*/
|
|
| 83 |
protected WarArchive warArchive;
|
|
| 84 |
|
|
| 85 |
/**
|
|
| 86 |
* Webapp context path containing the Cactus tests
|
|
| 87 |
*/
|
|
| 88 |
protected String testContext;
|
|
| 89 |
|
|
| 90 |
/**
|
|
| 91 |
* Servlet mapping of the Cactus Servlet redirector found
|
|
| 92 |
* in the warArchive WAR.
|
|
| 93 |
*/
|
|
| 94 |
protected String servletRedirectorMapping;
|
|
| 95 |
|
|
| 96 |
/**
|
|
| 97 |
* Filter mapping of the Cactus Filter redirector found
|
|
| 98 |
* in the warArchive WAR.
|
|
| 99 |
*/
|
|
| 100 |
protected String filterRedirectorMapping;
|
|
| 101 |
|
|
| 102 |
/**
|
|
| 103 |
* JSP mapping of the Cactus JSP redirector found
|
|
| 104 |
* in the warArchive WAR.
|
|
| 105 |
*/
|
|
| 106 |
protected String jspRedirectorMapping;
|
|
| 107 |
|
|
| 108 |
/**
|
|
| 109 |
* @see DeployableFile#getFile()
|
|
| 110 |
*/
|
|
| 111 | 0 |
public final File getFile()
|
| 112 |
{
|
|
| 113 | 0 |
return this.deployableFile; |
| 114 |
} |
|
| 115 |
|
|
| 116 |
/**
|
|
| 117 |
* @param theDeployableFile the file to deploy
|
|
| 118 |
*/
|
|
| 119 | 7 |
public final void setFile(File theDeployableFile) |
| 120 |
{
|
|
| 121 | 7 |
this.deployableFile = theDeployableFile;
|
| 122 |
} |
|
| 123 |
|
|
| 124 |
/**
|
|
| 125 |
* @see DeployableFile#getTestContext()
|
|
| 126 |
*/
|
|
| 127 | 1 |
public final String getTestContext()
|
| 128 |
{
|
|
| 129 | 1 |
return this.testContext; |
| 130 |
} |
|
| 131 |
|
|
| 132 |
/**
|
|
| 133 |
* @param theTestContext the test context that will be used to test if the
|
|
| 134 |
* container is started or not
|
|
| 135 |
*/
|
|
| 136 | 4 |
public final void setTestContext(String theTestContext) |
| 137 |
{
|
|
| 138 | 4 |
this.testContext = theTestContext;
|
| 139 |
} |
|
| 140 |
|
|
| 141 |
/**
|
|
| 142 |
* @see DeployableFile#getServletRedirectorMapping()
|
|
| 143 |
*/
|
|
| 144 | 3 |
public final String getServletRedirectorMapping()
|
| 145 |
{
|
|
| 146 | 3 |
return this.servletRedirectorMapping; |
| 147 |
} |
|
| 148 |
|
|
| 149 |
/**
|
|
| 150 |
* @param theMapping the servlet redirector mapping
|
|
| 151 |
*/
|
|
| 152 | 4 |
public final void setServletRedirectorMapping(String theMapping) |
| 153 |
{
|
|
| 154 | 4 |
this.servletRedirectorMapping = theMapping;
|
| 155 |
} |
|
| 156 |
|
|
| 157 |
/**
|
|
| 158 |
* @see DeployableFile#getFilterRedirectorMapping()
|
|
| 159 |
*/
|
|
| 160 | 3 |
public final String getFilterRedirectorMapping()
|
| 161 |
{
|
|
| 162 | 3 |
return this.filterRedirectorMapping; |
| 163 |
} |
|
| 164 |
|
|
| 165 |
/**
|
|
| 166 |
* @param theMapping the filter redirector mapping
|
|
| 167 |
*/
|
|
| 168 | 4 |
public final void setFilterRedirectorMapping(String theMapping) |
| 169 |
{
|
|
| 170 | 4 |
this.filterRedirectorMapping = theMapping;
|
| 171 |
} |
|
| 172 |
|
|
| 173 |
/**
|
|
| 174 |
* @see DeployableFile#getJspRedirectorMapping()
|
|
| 175 |
*/
|
|
| 176 | 3 |
public final String getJspRedirectorMapping()
|
| 177 |
{
|
|
| 178 | 3 |
return this.jspRedirectorMapping; |
| 179 |
} |
|
| 180 |
|
|
| 181 |
/**
|
|
| 182 |
* @param theMapping the JSP redirector mapping
|
|
| 183 |
*/
|
|
| 184 | 4 |
public final void setJspRedirectorMapping(String theMapping) |
| 185 |
{
|
|
| 186 | 4 |
this.jspRedirectorMapping = theMapping;
|
| 187 |
} |
|
| 188 |
|
|
| 189 |
/**
|
|
| 190 |
* @see DeployableFile#getWarArchive()
|
|
| 191 |
*/
|
|
| 192 | 12 |
public final WarArchive getWarArchive()
|
| 193 |
{
|
|
| 194 | 12 |
return this.warArchive; |
| 195 |
} |
|
| 196 |
|
|
| 197 |
/**
|
|
| 198 |
* @param theWarArchive the WAR archive object
|
|
| 199 |
*/
|
|
| 200 | 4 |
public final void setWarArchive(WarArchive theWarArchive) |
| 201 |
{
|
|
| 202 | 4 |
this.warArchive = theWarArchive;
|
| 203 |
} |
|
| 204 |
} |
|
| 205 |
|
|
||||||||||