Source for org.jfree.repository.LibRepositoryBoot

   1: /**
   2:  * ===========================================================
   3:  * LibRepository : a free Java content repository access layer
   4:  * ===========================================================
   5:  *
   6:  * Project Info:  http://jfreereport.pentaho.org/librepository/
   7:  *
   8:  * (C) Copyright 2006, by Pentaho Corporation and Contributors.
   9:  *
  10:  * This library is free software; you can redistribute it and/or modify it under the terms
  11:  * of the GNU Lesser General Public License as published by the Free Software Foundation;
  12:  * either version 2.1 of the License, or (at your option) any later version.
  13:  *
  14:  * This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  15:  * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16:  * See the GNU Lesser General Public License for more details.
  17:  *
  18:  * You should have received a copy of the GNU Lesser General Public License along with this
  19:  * library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  20:  * Boston, MA 02111-1307, USA.
  21:  *
  22:  * [Java is a trademark or registered trademark of Sun Microsystems, Inc.
  23:  * in the United States and other countries.]
  24:  *
  25:  * ------------
  26:  * LibRepositoryBoot.java
  27:  * ------------
  28:  * (C) Copyright 2006, by Pentaho Corporation.
  29:  */
  30: 
  31: package org.jfree.repository;
  32: 
  33: import org.jfree.base.AbstractBoot;
  34: import org.jfree.base.BootableProjectInfo;
  35: import org.jfree.util.Configuration;
  36: 
  37: /**
  38:  * Creation-Date: 13.11.2006, 11:27:20
  39:  *
  40:  * @author Thomas Morgner
  41:  */
  42: public class LibRepositoryBoot extends AbstractBoot
  43: {
  44:   public static final String REPOSITORY_DOMAIN = "org.jfree.repository";
  45:   public static final String SIZE_ATTRIBUTE = "size";
  46:   public static final String VERSION_ATTRIBUTE = "version";
  47:   public static final String CONTENT_TYPE = "content-type";
  48: 
  49:   private static LibRepositoryBoot instance;
  50: 
  51:   public static synchronized LibRepositoryBoot getInstance()
  52:   {
  53:     if (instance == null)
  54:     {
  55:       instance = new LibRepositoryBoot();
  56:     }
  57:     return instance;
  58:   }
  59: 
  60:   private LibRepositoryBoot()
  61:   {
  62:   }
  63: 
  64:   protected Configuration loadConfiguration()
  65:   {
  66:     return createDefaultHierarchicalConfiguration
  67:             ("/org/jfree/repository/librepository.properties",
  68:              "/librepository.properties", true);
  69: 
  70:   }
  71: 
  72:   protected void performBoot()
  73:   {
  74:   }
  75: 
  76:   protected BootableProjectInfo getProjectInfo()
  77:   {
  78:     return LibRepositoryInfo.getInstance();
  79:   }
  80: }