Changeset 2825
- Timestamp:
- 04/22/13 13:18:09 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
vlo/trunk/vlo_web_app/src/main/java/eu/clarin/cmdi/vlo/VloWebApplication.java
r2768 r2825 9 9 10 10 /** 11 * {@literal VLO} web application. <br><br>11 * {@literal VLO} web application. 12 12 * 13 * The web application class defines an object representing the VLO web 14 * application. 15 * 13 16 * Because the VloWebApplication class extends WebApplication, a class instance 14 * will normally reside inside a web server container. By running the Start15 * classhowever, an instance of the application will reside outside a server17 * will reside inside a web server container. By running the Start class 18 * however, an instance of the application will reside outside a server 16 19 * container. 17 *18 20 */ 19 21 public class VloWebApplication extends WebApplication { … … 21 23 private SearchResultsDao searchResults; 22 24 23 // flag indicating whether or not the application object lives in a context 25 /** 26 * Flag indicating whether or not the application object lives in a web 27 * server context. 28 */ 24 29 boolean inContext; 25 30 26 31 /** 27 * Method that will be invoked when the application starts<br><br> 28 * 32 * Method that will be invoked when the application starts. 29 33 */ 30 34 @Override … … 38 42 servletContext = this.getServletContext(); 39 43 40 /* *44 /* 41 45 * Send the application context to the configuration object to 42 46 * enable it to read an external {@literal VloConfig.xml} … … 53 57 54 58 /** 55 * Web application constructor <br><br>59 * Web application constructor. 56 60 * 57 61 * Create an application instance configured to be living inside a web … … 60 64 public VloWebApplication() { 61 65 62 /* *66 /* 63 67 * Read the application's packaged configuration. 64 68 * … … 77 81 78 82 /** 79 * Web application constructor <br><br>83 * Web application constructor. 80 84 * 81 * Create an application instance configured to be living without a web 82 * server container context.<br><br> 83 * 84 * @param testConfig a configuration that could be different from the 85 * packaged parameters 86 * 87 * An instance like this can for example be used for testing purposes. In 88 * the case of testing, the constructor is invoked from a class in a test 89 * package. Within such a class a configuration object can be manipulated 90 * according to specific needs. <br><br> 91 * 92 * Please note that in the case of a test configuration, while the 93 * application object could reside inside a web server container, the 94 * context associated with this container will be ignored. 85 * Allows for the creation of an application instance that does not rely on 86 * a web server context. When send the message 'false', this constructor 87 * will create an object that will not look for an external configuration 88 * file; it will exclusively rely on the packaged configuration. Typically, 89 * the application's tests will send false to the application constructor. 90 * 91 * @param inContext If and only if this parameter equals true. later on, the 92 * {@literal init} method will try to determine the web server's container 93 * context so that, if it is defined in it, an external configuration can be 94 * switched to. 95 95 */ 96 public VloWebApplication(Boolean param) {96 public VloWebApplication(Boolean inContext) { 97 97 98 98 // remember that the application does not live in a web server context 99 99 100 inContext = param;100 this.inContext = inContext; 101 101 102 102 searchResults = new SearchResultsDao();
Note: See TracChangeset
for help on using the changeset viewer.