本文整理汇总了Java中org.apache.jackrabbit.core.config.RepositoryConfig类的典型用法代码示例。如果您正苦于以下问题:Java RepositoryConfig类的具体用法?Java RepositoryConfig怎么用?Java RepositoryConfig使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RepositoryConfig类属于org.apache.jackrabbit.core.config包,在下文中一共展示了RepositoryConfig类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initRepositoryByXml
import org.apache.jackrabbit.core.config.RepositoryConfig; //导入依赖的package包/类
private void initRepositoryByXml(String xml)throws Exception {
log.info("Build repository from user custom xml file...");
InputStream inputStream=null;
try{
inputStream=this.applicationContext.getResource(xml).getInputStream();
String tempRepoHomeDir=System.getProperty("java.io.tmpdir");
if(StringUtils.isNotBlank(tempRepoHomeDir) && tempRepoHomeDir.length()>1){
if(tempRepoHomeDir.endsWith("/") || tempRepoHomeDir.endsWith("\\")){
tempRepoHomeDir+="urule-temp-repo-home/";
}else{
tempRepoHomeDir+="/urule-temp-repo-home/";
}
File tempDir=new File(tempRepoHomeDir);
clearTempDir(tempDir);
}else{
tempRepoHomeDir="";
}
RepositoryConfig repositoryConfig = RepositoryConfig.create(inputStream,tempRepoHomeDir);
repository=RepositoryImpl.create(repositoryConfig);
}finally{
if(inputStream!=null){
inputStream.close();
}
}
}
开发者ID:youseries,项目名称:urule,代码行数:26,代码来源:RepositoryBuilder.java
示例2: initDefaultRepository
import org.apache.jackrabbit.core.config.RepositoryConfig; //导入依赖的package包/类
private void initDefaultRepository()throws Exception {
SecurityConfig securityConfig=buildSecurityConfig();
FileSystemFactory fileSystemFactory=buildFileSystemFactory("repository");
String workspaceDirectory=""+repoHomeDir+"/workspaces";
String workspaceConfigDirectory=null;
String defaultWorkspace="default";
int workspaceMaxIdleTime=0;
VersioningConfig versioningConfig=buildVersioningConfig();
QueryHandlerFactory queryHandlerFactory=null;
ClusterConfig clusterConfig=null;
DataStoreFactory dataStoreFactory=buildDataStoreFactory();
RepositoryLockMechanismFactory repositoryLockMechanismFactory=buildRepositoryLockMechanismFactory();
DataSourceConfig dataSourceConfig=new DataSourceConfig();
ConnectionFactory connectionFactory=new ConnectionFactory();
RepositoryConfigurationParser repositoryConfigurationParser=new RepositoryConfigurationParser(new Properties());
initWorkspaceTemplate();
RepositoryConfig repositoryConfig = new RepositoryConfig(repoHomeDir, securityConfig,
fileSystemFactory, workspaceDirectory,
workspaceConfigDirectory, defaultWorkspace,
workspaceMaxIdleTime, workspaceTemplate, versioningConfig,
queryHandlerFactory, clusterConfig, dataStoreFactory,
repositoryLockMechanismFactory, dataSourceConfig,
connectionFactory, repositoryConfigurationParser);
repositoryConfig.init();
repository=RepositoryImpl.create(repositoryConfig);
}
开发者ID:youseries,项目名称:urule,代码行数:27,代码来源:RepositoryBuilder.java
示例3: create
import org.apache.jackrabbit.core.config.RepositoryConfig; //导入依赖的package包/类
public static RepositoryConfig create( String file, String home )
throws ConfigurationException
{
File homeFile = new File( home );
if ( !homeFile.exists( ) )
{
homeFile.mkdirs( );
}
File configurationFile = new File( file );
if ( !configurationFile.exists( ) )
{
String resourcePath = "org/apache/archiva/metadata/repository/jcr/repository.xml";
LoggerFactory.getLogger( ArchivaJcrRepositoryConfig.class ).info(
"no repository.xml file in path {} so use default from resources path {}", file, resourcePath );
// use bundled repository.xml
return RepositoryConfig.create(
Thread.currentThread( ).getContextClassLoader( ).getResourceAsStream( resourcePath ), home );
}
return RepositoryConfig.create( file, home );
}
开发者ID:ruikom,项目名称:apache-archiva,代码行数:23,代码来源:ArchivaJcrRepositoryConfig.java
示例4: buildRepository
import org.apache.jackrabbit.core.config.RepositoryConfig; //导入依赖的package包/类
Repository buildRepository(final JackrabbitConfiguration configuration) {
try {
ManagedRepository managedRepository = null;
MetricRegistry metricRegistry = null;
final RepositoryConfig config = RepositoryConfig.install(new File(configuration.getRepositoryXml()),
new File(configuration.getHomeDir()));
repository = RepositoryImpl.create(config);
managedRepository = new ManagedRepositoryImpl(repository, metricRegistry);
// final RepositoryConfig config1 = getRepositoryConfig();
// LOGGER.info("Connecting to local repository at {}",
// config1.getHomeDir());
// Repository rep1 = RepositoryImpl.create(config1);
return managedRepository;
} catch (Exception e) {
throw new RuntimeException("Could not create repository.", e);
}
}
开发者ID:justcoke,项目名称:dropwizard-jcr-module,代码行数:22,代码来源:JackrabbitBundle.java
示例5: resolveConfigurationResource
import org.apache.jackrabbit.core.config.RepositoryConfig; //导入依赖的package包/类
/**
* @see org.springframework.extensions.jcr.RepositoryFactoryBean#resolveConfigurationResource()
*/
protected void resolveConfigurationResource() throws Exception {
// read the configuration object
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());
}
开发者ID:MyCollab,项目名称:mycollab,代码行数:23,代码来源:RepositoryFactoryBean.java
示例6: setUp
import org.apache.jackrabbit.core.config.RepositoryConfig; //导入依赖的package包/类
protected void setUp() throws Exception {
File home = new File(JACKRABBIT_HOME);
if (home.exists()) {
delete(home);
}
RepositoryConfig config = RepositoryConfig.create(new InputSource(this.getClass().getClassLoader().getResourceAsStream("test-repository.xml")), JACKRABBIT_HOME);
repository = RepositoryImpl.create(config);
super.setUp();
}
开发者ID:twachan,项目名称:James,代码行数:10,代码来源:JcrUserRepositoryTest.java
示例7: getRepositoryConfig
import org.apache.jackrabbit.core.config.RepositoryConfig; //导入依赖的package包/类
/**
* @return Returns the repositryConfig.
*/
public RepositoryConfig getRepositoryConfig() {
return this.repositoryConfig;
}
开发者ID:MyCollab,项目名称:mycollab,代码行数:7,代码来源:RepositoryFactoryBean.java
示例8: setRepositoryConfig
import org.apache.jackrabbit.core.config.RepositoryConfig; //导入依赖的package包/类
/**
* @param repositoryConfig The repositryConfig to set.
*/
public void setRepositoryConfig(RepositoryConfig repositoryConfig) {
this.repositoryConfig = repositoryConfig;
}
开发者ID:MyCollab,项目名称:mycollab,代码行数:7,代码来源:RepositoryFactoryBean.java
示例9: getRepository
import org.apache.jackrabbit.core.config.RepositoryConfig; //导入依赖的package包/类
public JackrabbitRepository getRepository() throws RepositoryException {
RepositoryConfig repConfig=RepositoryConfig.create(conf, dir);
JackrabbitRepository repo=RepositoryImpl.create(repConfig);
return repo;
}
开发者ID:sltang,项目名称:jackrabbit-migration,代码行数:6,代码来源:RepositoryFactoryImpl.java
注:本文中的org.apache.jackrabbit.core.config.RepositoryConfig类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论