• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RepositoryImpl类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.jackrabbit.core.RepositoryImpl的典型用法代码示例。如果您正苦于以下问题:Java RepositoryImpl类的具体用法?Java RepositoryImpl怎么用?Java RepositoryImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RepositoryImpl类属于org.apache.jackrabbit.core包,在下文中一共展示了RepositoryImpl类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: initRepositoryByXml

import org.apache.jackrabbit.core.RepositoryImpl; //导入依赖的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.RepositoryImpl; //导入依赖的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: buildRepository

import org.apache.jackrabbit.core.RepositoryImpl; //导入依赖的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


示例4: getRepositoryContext

import org.apache.jackrabbit.core.RepositoryImpl; //导入依赖的package包/类
private RepositoryContext getRepositoryContext(final Session session) throws NoSuchFieldException, IllegalAccessException {
    Field contextField = RepositoryImpl.class.getDeclaredField("context");
    if (!contextField.isAccessible()) {
        contextField.setAccessible(true);
    }
    return (RepositoryContext) contextField.get(RepositoryDecorator.unwrap(session.getRepository()));
}
 
开发者ID:jreijn,项目名称:hippo-addon-restful-webservices,代码行数:8,代码来源:StatsResource.java


示例5: setUp

import org.apache.jackrabbit.core.RepositoryImpl; //导入依赖的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


示例6: destroy

import org.apache.jackrabbit.core.RepositoryImpl; //导入依赖的package包/类
public void destroy() {
    log.info("Shutting down content repository...");
    // just to make sure...
    try {
        Session s = getSession();
        RepositoryImpl r = (RepositoryImpl) s.getRepository();
        s.logout();
        r.shutdown();
    } catch (Exception e) {
        log.error("Error shutting down repository!", e);
    }
}
 
开发者ID:brandt,项目名称:GridSphere,代码行数:13,代码来源:JCRServiceImpl.java


示例7: getRepository

import org.apache.jackrabbit.core.RepositoryImpl; //导入依赖的package包/类
public RepositoryImpl getRepository() {
	return repository;
}
 
开发者ID:youseries,项目名称:urule,代码行数:4,代码来源:RepositoryBuilder.java


示例8: getRootNodeState

import org.apache.jackrabbit.core.RepositoryImpl; //导入依赖的package包/类
protected static NodeState getRootNodeState(final PersistenceManager pm) throws ItemStateException {
    return loadNodeState(pm, RepositoryImpl.ROOT_NODE_ID);
}
 
开发者ID:code-distillery,项目名称:jackrabbit-pm-tools,代码行数:4,代码来源:AbstractCommand.java


示例9: initPM

import org.apache.jackrabbit.core.RepositoryImpl; //导入依赖的package包/类
private static void initPM(PersistenceManager pm, File home, FileSystem fs, NamespaceRegistry nr) throws Exception {
    pm.init(getPMContext(pm, home, fs, nr, RepositoryImpl.ROOT_NODE_ID));
}
 
开发者ID:code-distillery,项目名称:jackrabbit-pm-tools,代码行数:4,代码来源:PMExecutionContext.java


示例10: createRepository

import org.apache.jackrabbit.core.RepositoryImpl; //导入依赖的package包/类
/**
 * @see org.springframework.extensions.jcr.RepositoryFactoryBean#createRepository()
 */
protected Repository createRepository() throws Exception {
    // return JackRabbit repository.
    return RepositoryImpl.create(repositoryConfig);
}
 
开发者ID:MyCollab,项目名称:mycollab,代码行数:8,代码来源:RepositoryFactoryBean.java


示例11: getRepository

import org.apache.jackrabbit.core.RepositoryImpl; //导入依赖的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.RepositoryImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java NodeInfo类代码示例发布时间:2022-05-23
下一篇:
Java ModernRoboticsI2cGyro类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap