@Test public void testResolveConfigurationResource() throws Exception { factory.resolveConfigurationResource(); DefaultResourceLoader loader = new DefaultResourceLoader(); Resource res = loader.getResource("/repository.xml"); assertEquals(res, factory.getConfiguration()); assertEquals(".", factory.getHomeDir().getFilename()); }
protected void resolveConfigurationResource() throws Exception { if (repositoryConfig != null) return; if (this.configuration == null) { if (LOG.isDebugEnabled()) LOG.debug("no configuration resource specified, using the default one:" + DEFAULT_CONF_FILE); configuration = new ClassPathResource(DEFAULT_CONF_FILE); } if (homeDir == null) { if (LOG.isDebugEnabled()) LOG.debug("no repository home dir specified, using the default one:" + DEFAULT_REP_DIR); homeDir = new FileSystemResource(DEFAULT_REP_DIR); } repositoryConfig = RepositoryConfig.create(new InputSource(configuration.getInputStream()), homeDir.getFile().getAbsolutePath()); }
RepositoryFactoryBean extends org.springframework.extensions.jcr.RepositoryFactoryBean { protected void resolveConfigurationResource() throws Exception { if (repositoryConfig != null) return; if (this.configuration == null) { if (LOG.isDebugEnabled()) LOG.debug("no configuration resource specified, using the default one:" + DEFAULT_CONF_FILE); configuration = new ClassPathResource(DEFAULT_CONF_FILE); } if (homeDir == null) { if (LOG.isDebugEnabled()) LOG.debug("no repository home dir specified, using the default one:" + DEFAULT_REP_DIR); homeDir = new FileSystemResource(DEFAULT_REP_DIR); } repositoryConfig = RepositoryConfig.create(new InputSource(configuration.getInputStream()), homeDir.getFile().getAbsolutePath()); } }
RepositoryFactoryBean extends org.springframework.extensions.jcr.RepositoryFactoryBean { protected void resolveConfigurationResource() throws Exception { if (repositoryConfig != null) return; if (this.configuration == null) { if (LOG.isDebugEnabled()) LOG.debug("no configuration resource specified, using the default one:" + DEFAULT_CONF_FILE); configuration = new ClassPathResource(DEFAULT_CONF_FILE); } if (homeDir == null) { if (LOG.isDebugEnabled()) LOG.debug("no repository home dir specified, using the default one:" + DEFAULT_REP_DIR); homeDir = new FileSystemResource(DEFAULT_REP_DIR); } repositoryConfig = RepositoryConfig.create(new InputSource(configuration.getInputStream()), homeDir.getFile().getAbsolutePath()); }  }
RepositoryFactoryBean extends org.springframework.extensions.jcr.RepositoryFactoryBean { protected void resolveConfigurationResource() throws Exception { if (repositoryConfig != null) return; if (this.configuration == null) { if (LOG.isDebugEnabled()) LOG.debug("no configuration resource specified, using the default one:" + DEFAULT_CONF_FILE); configuration = new ClassPathResource(DEFAULT_CONF_FILE); } if (homeDir == null) { if (LOG.isDebugEnabled()) LOG.debug("no repository home dir specified, using the default one:" + DEFAULT_REP_DIR); homeDir = new FileSystemResource(DEFAULT_REP_DIR); } repositoryConfig = RepositoryConfig.create(new InputSource(configuration.getInputStream()), homeDir.getFile().getAbsolutePath()); }  void destroy(); Resource getHomeDir(); void setHomeDir(Resource defaultRepDir); RepositoryConfig getRepositoryConfig(); void setRepositoryConfig(RepositoryConfig repositoryConfig); }
RepositoryFactoryBean extends org.springframework.extensions.jcr.RepositoryFactoryBean { protected void resolveConfigurationResource() throws Exception { if (repositoryConfig != null) return; if (this.configuration == null) { if (LOG.isDebugEnabled()) LOG.debug("no configuration resource specified, using the default one:" + DEFAULT_CONF_FILE); configuration = new ClassPathResource(DEFAULT_CONF_FILE); } if (homeDir == null) { if (LOG.isDebugEnabled()) LOG.debug("no repository home dir specified, using the default one:" + DEFAULT_REP_DIR); homeDir = new FileSystemResource(DEFAULT_REP_DIR); } repositoryConfig = RepositoryConfig.create(new InputSource(configuration.getInputStream()), homeDir.getFile().getAbsolutePath()); }  void destroy(); Resource getHomeDir(); void setHomeDir(Resource defaultRepDir); RepositoryConfig getRepositoryConfig(); void setRepositoryConfig(RepositoryConfig repositoryConfig);  }