Coverage report

  %line %branch
mnemosyne.system.PersistentSystemFactory
0% 
0% 

 1  
 /*
 2  
  * Copyright 2004 Charles Blaxland
 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  
 package mnemosyne.system;
 17  
 
 18  
 import mnemosyne.core.VersionManager;
 19  
 import mnemosyne.core.DefaultPersistentObjectFactory;
 20  
 import mnemosyne.guid.RmiUidGuidGenerator;
 21  
 import mnemosyne.aop.aspectwerkz.AspectwerkzAopSystem;
 22  
 import mnemosyne.archiver.FileSystemArchiver;
 23  
 import org.picocontainer.MutablePicoContainer;
 24  
 import org.picocontainer.Parameter;
 25  
 import org.picocontainer.defaults.DefaultPicoContainer;
 26  
 import org.picocontainer.defaults.ComponentParameter;
 27  
 import org.picocontainer.defaults.ConstantParameter;
 28  
 
 29  
 /**
 30  
  * @version $Id: PersistentSystemFactory.java,v 1.1 2004/08/12 14:01:06 charlesblaxland Exp $
 31  
  */
 32  0
 public class PersistentSystemFactory
 33  
 {
 34  
     public static final String DEFAULT_DATA_DIR = "data";
 35  
 
 36  
     public PersistentSystem createPersistentSystem()
 37  
     {
 38  0
         return createPersistentSystem(DEFAULT_DATA_DIR);
 39  
     }
 40  
 
 41  
     public PersistentSystem createPersistentSystem(String dataDirectory)
 42  
     {
 43  0
         MutablePicoContainer pico = new DefaultPicoContainer();
 44  0
         pico.registerComponentImplementation(VersionManager.class);
 45  0
         pico.registerComponentImplementation(RmiUidGuidGenerator.class);
 46  0
         pico.registerComponentImplementation(AspectwerkzAopSystem.class);
 47  0
         pico.registerComponentImplementation(DefaultPersistentObjectFactory.class);
 48  0
         pico.registerComponentImplementation(FileSystemArchiver.class, FileSystemArchiver.class, new Parameter[] {
 49  
             new ComponentParameter(), class="keyword">new ComponentParameter(),
 50  
             new ConstantParameter(dataDirectory)
 51  
         });
 52  0
         pico.registerComponentImplementation(LocalPersistentSystem.class);
 53  0
         return (LocalPersistentSystem) pico.getComponentInstanceOfType(LocalPersistentSystem.class);
 54  
     }
 55  
 }

This report is generated by jcoverage, Maven and Maven JCoverage Plugin.