001 /* 002 * Copyright 2002-2004 the original author or authors. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 005 * use this file except in compliance with the License. You may obtain a copy of 006 * the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 012 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 013 * License for the specific language governing permissions and limitations under 014 * the License. 015 */ 016 package org.springframework.richclient.samples.vldocking.app; 017 018 import org.apache.commons.logging.Log; 019 import org.apache.commons.logging.LogFactory; 020 import org.springframework.richclient.application.ApplicationLauncher; 021 022 /** 023 * This application provides a very simple introduction to the Spring Richclient platform. It is intended to highlight 024 * the common models for working with the platform (including configuration and runtime access to platform services) and 025 * how to organize the basic pieces of an application using the platform. 026 * <p> 027 * This sample provides an implementation of a <em>trivial</em> address book. Trust me when I say trivial :-) It 028 * has no persistence, no security, and no complex business logic. The focus of the sample is how to work with the 029 * Spring Rich platform, not about how to build a great address book. 030 * <p> 031 * Other samples will introduce more complex topics like user management (security), alternate page/view layouts, 032 * complex data binding, remoting, etc. 033 * <p> 034 * The Spring Rich platform relies on the <a href="http://www.springframework.org/">Spring</a> project to manage the 035 * application context with all the associated benefits it offers. 036 * <p> 037 * A start at the Spring Rich Client documentation can be found on the <a 038 * href="http://opensource.atlassian.com/confluence/spring/display/RCP/Home">wiki</a>. 039 * </p> 040 * @author Larry Streepy 041 * @see The <a href="http://www.springframework.org/">Spring project</a> 042 * @see The <a href="http://opensource.atlassian.com/confluence/spring/display/RCP/Home">Spring Rich Wiki</a> 043 */ 044 public class SimpleVLDockingApp { 045 046 private static final Log logger = LogFactory.getLog(SimpleVLDockingApp.class); 047 048 /** 049 * Main routine for the simple sample application. 050 * @param args 051 */ 052 public static void main(String[] args) { 053 logger.info("SimpleVLDockingApp starting up"); 054 055 // The startup context defines elements that should be available 056 // quickly such as a splash screen image. 057 058 String startupContextPath = "/org/springframework/richclient/samples/simple/ctx" + "/richclient-startup-context.xml"; 059 060 String richclientApplicationContextPath = "/org/springframework/richclient/samples/vldocking/ctx" + "/richclient-application-context.xml"; 061 062 // The ApplicationLauncher is responsible for loading the contexts, 063 // presenting the splash screen, initializing the Application 064 // singleton instance, creating the application window to display 065 // the initial page. 066 067 try { 068 new ApplicationLauncher(startupContextPath, new String[] { richclientApplicationContextPath }); 069 } 070 catch (RuntimeException e) { 071 logger.error("RuntimeException during startup", e); 072 } 073 } 074 075 }