|
|||||||||||||||||||
| 30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
| Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
| BexeeEngineConfigurationFactory.java | 50% | 66.7% | 50% | 57.1% |
|
||||||||||||||
| 1 |
/*
|
|
| 2 |
* $Id: BexeeEngineConfigurationFactory.java,v 1.1 2004/12/15 14:18:15 patforna Exp $
|
|
| 3 |
*
|
|
| 4 |
* Copyright (c) 2004 Patric Fornasier, Pawel Kowalski
|
|
| 5 |
* Berne University of Applied Sciences
|
|
| 6 |
* School of Engineering and Information Technology
|
|
| 7 |
* All rights reserved.
|
|
| 8 |
*/
|
|
| 9 |
package bexee.axis;
|
|
| 10 |
|
|
| 11 |
import javax.servlet.ServletConfig;
|
|
| 12 |
|
|
| 13 |
import org.apache.axis.AxisProperties;
|
|
| 14 |
import org.apache.axis.EngineConfigurationFactory;
|
|
| 15 |
import org.apache.axis.configuration.EngineConfigurationFactoryServlet;
|
|
| 16 |
|
|
| 17 |
/**
|
|
| 18 |
* This class has exactly the same behaviour as its parent except that it uses a
|
|
| 19 |
* different server configuration file.
|
|
| 20 |
* <p>
|
|
| 21 |
* The config file is hard coded to <code>bexee-config.wsdd</code>.
|
|
| 22 |
*
|
|
| 23 |
* @version $Revision: 1.1 $, $Date: 2004/12/15 14:18:15 $
|
|
| 24 |
* @author Patric Fornasier
|
|
| 25 |
* @author Pawel Kowalski
|
|
| 26 |
*/
|
|
| 27 |
public class BexeeEngineConfigurationFactory extends |
|
| 28 |
EngineConfigurationFactoryServlet {
|
|
| 29 |
|
|
| 30 |
protected static final String SERVER_CONFIG_FILE = "bexee-config.wsdd"; |
|
| 31 |
|
|
| 32 |
/**
|
|
| 33 |
* Creates and returns a new EngineConfigurationFactory. If a factory cannot
|
|
| 34 |
* be created, return 'null'.
|
|
| 35 |
*
|
|
| 36 |
* The factory may return non-NULL only if:
|
|
| 37 |
* <ul>
|
|
| 38 |
* <li>it knows what to do with the param (param instanceof ServletConfig)
|
|
| 39 |
* </li>
|
|
| 40 |
* <li>it can find it's configuration information</li>
|
|
| 41 |
* </ul>
|
|
| 42 |
*
|
|
| 43 |
* @see org.apache.axis.configuration.EngineConfigurationFactoryServlet
|
|
| 44 |
*/
|
|
| 45 | 26 |
public static EngineConfigurationFactory newFactory(Object param) { |
| 46 |
|
|
| 47 | 26 |
AxisProperties.setProperty(OPTION_SERVER_CONFIG_FILE, |
| 48 |
SERVER_CONFIG_FILE); |
|
| 49 |
|
|
| 50 |
/*
|
|
| 51 |
* Default, let this one go through if we find a ServletContext.
|
|
| 52 |
*
|
|
| 53 |
* The REAL reason we are not trying to make any decision here is
|
|
| 54 |
* because it's impossible (without refactoring FileProvider) to
|
|
| 55 |
* determine if a *.wsdd file is present or not until the configuration
|
|
| 56 |
* is bound to an engine.
|
|
| 57 |
*/
|
|
| 58 | 26 |
return (param instanceof ServletConfig) ? new BexeeEngineConfigurationFactory( |
| 59 |
(ServletConfig) param) |
|
| 60 |
: null;
|
|
| 61 |
} |
|
| 62 |
|
|
| 63 |
/**
|
|
| 64 |
* Create the default engine configuration with the modified server config
|
|
| 65 |
* file.
|
|
| 66 |
*/
|
|
| 67 | 0 |
protected BexeeEngineConfigurationFactory(ServletConfig ctx) {
|
| 68 | 0 |
super(ctx);
|
| 69 |
} |
|
| 70 |
} |
|
||||||||||