1 /***
2 * Copyright (C) 2008 Jeremy Thomerson (jthomerson@users.sourceforge.net)
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package net.sf.vcaperture.web;
18
19 import net.sf.vcaperture.model.IApplicationContext;
20 import net.sf.vcaperture.util.spring.ApplicationContextFactory;
21 import net.sf.vcaperture.web.urls.BrowseStrategy;
22
23 import org.apache.wicket.protocol.http.WebApplication;
24
25
26 /***
27 * Application object for the Aperture web application. If you want to run this
28 * application without deploying, run the web.wicket.Start class.
29 *
30 * @see net.sf.vcaperture.web.Start#main(String[])
31 * @author Jeremy Thomerson (jthomerson@users.sourceforge.net)
32 */
33 public class ApertureWebApp extends WebApplication {
34
35 /***
36 * Constructor
37 */
38 public ApertureWebApp() {
39 }
40
41 /***
42 * @see org.apache.wicket.protocol.http.WebApplication#init()
43 */
44 @Override
45 protected void init() {
46 super.init();
47
48 getMarkupSettings().setStripWicketTags(true);
49 getMarkupSettings().setStripXmlDeclarationFromOutput(true);
50 getMarkupSettings().setStripComments(true);
51 getMarkupSettings().setCompressWhitespace(true);
52
53 getDebugSettings().setComponentUseCheck(false);
54
55 getPageSettings().setAutomaticMultiWindowSupport(false);
56 getPageSettings().setVersionPagesByDefault(false);
57
58 mount(new BrowseStrategy("browse"));
59 }
60
61 /***
62 * @see org.apache.wicket.Application#getHomePage()
63 */
64 public Class getHomePage() {
65 return HomePage.class;
66 }
67
68 /***
69 * @return The application context for this WebApp.
70 */
71 public IApplicationContext getContext() {
72 return ApplicationContextFactory.getFactory().getContext();
73 }
74 }