1 19 20 package org.apache.avalon.cornerstone.blocks.masterstore; 21 22 import org.apache.avalon.cornerstone.services.store.ObjectRepository; 23 24 import java.io.File ; 25 import java.io.IOException ; 26 27 33 public class CDIFilePersistentObjectRepository 34 extends AbstractFilePersistentObjectRepository 35 implements ObjectRepository 36 { 37 38 public CDIFilePersistentObjectRepository(FileRepositoryMonitor monitor, ObjectRespositoryConfig config) throws IOException { 39 m_baseDirectory = config.getBaseDirectory(); 40 this.monitor = monitor; 41 42 setDestination( config.getURL() ); 43 44 monitor.initialized(CDIFilePersistentObjectRepository.class); 45 m_name = RepositoryManager.getName(); 46 m_extension = "." + m_name + getExtensionDecorator(); 47 m_filter = new ExtensionFileFilter( m_extension ); 48 final File directory = new File ( m_path ); 49 directory.mkdirs(); 50 monitor.pathOpened(CDIFilePersistentObjectRepository.class, m_path); 51 } 52 53 protected void initializeChild(AbstractFileRepository child) throws Exception { 54 } 55 56 } 57 | Popular Tags |