001 /** 002 * =================================================== 003 * JCommon-Serializer : a free serialization framework 004 * =================================================== 005 * 006 * Project Info: http://www.jfree.org/jfreereport/jcommon-serializer/ 007 * Project Lead: Thomas Morgner; 008 * 009 * (C) Copyright 2006, by Object Refinery Limited and Pentaho Corporation. 010 * 011 * This library is free software; you can redistribute it and/or modify it under the terms 012 * of the GNU Lesser General Public License as published by the Free Software Foundation; 013 * either version 2.1 of the License, or (at your option) any later version. 014 * 015 * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 016 * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 017 * See the GNU Lesser General Public License for more details. 018 * 019 * You should have received a copy of the GNU Lesser General Public License along with this 020 * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, 021 * Boston, MA 02111-1307, USA. 022 * 023 * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 024 * in the United States and other countries.] 025 * 026 * ------------ 027 * JCommonSerializerBoot.java 028 * ------------ 029 * (C) Copyright 2006, by Object Refinery Limited and Pentaho Corporation. 030 * 031 * Original Author: Thomas Morgner; 032 * Contributor(s): -; 033 * 034 * $Id: JCommonSerializerBoot.java 3044 2007-07-28 17:52:44Z tmorgner $ 035 * 036 * Changes 037 * ------- 038 * 039 * 040 */ 041 package org.jfree.serializer; 042 043 import org.jfree.base.AbstractBoot; 044 import org.jfree.base.BootableProjectInfo; 045 import org.jfree.util.Configuration; 046 047 /** 048 * Creation-Date: 17.02.2006, 21:54:24 049 * 050 * @author Thomas Morgner 051 */ 052 public class JCommonSerializerBoot extends AbstractBoot 053 { 054 private static JCommonSerializerBoot instance; 055 056 public static synchronized JCommonSerializerBoot getInstance() 057 { 058 if (instance == null) 059 { 060 instance = new JCommonSerializerBoot(); 061 } 062 return instance; 063 } 064 065 private JCommonSerializerBoot() 066 { 067 } 068 069 /** 070 * Loads the configuration. This will be called exactly once. 071 * 072 * @return The configuration. 073 */ 074 protected Configuration loadConfiguration() 075 { 076 return createDefaultHierarchicalConfiguration 077 ("/org/jfree/serializer/jcommon-serializer.properties", 078 "/jcommon-serializer.properties", true); 079 } 080 081 /** Performs the boot. */ 082 protected void performBoot() 083 { 084 085 } 086 087 /** 088 * Returns the project info. 089 * 090 * @return The project info. 091 */ 092 protected BootableProjectInfo getProjectInfo() 093 { 094 return JCommonSerializerInfo.getInstance(); 095 } 096 }