Search in sources :

Example 1 with NameValidatorProvider

use of org.apache.jackrabbit.oak.plugins.name.NameValidatorProvider in project sling by apache.

the class OakSlingRepositoryManager method acquireRepository.

@Override
protected Repository acquireRepository() {
    final BundleContext bundleContext = componentContext.getBundleContext();
    final Whiteboard whiteboard = new OsgiWhiteboard(bundleContext);
    this.indexProvider.start(whiteboard);
    this.indexEditorProvider.start(whiteboard);
    this.oakExecutorServiceReference = bundleContext.registerService(Executor.class.getName(), new Executor() {

        @Override
        public void execute(Runnable command) {
            threadPool.execute(command);
        }
    }, new Hashtable<String, Object>());
    final Oak oak = new Oak(nodeStore).withAsyncIndexing("async", 5);
    final Jcr jcr = new Jcr(oak, false).with(new InitialContent()).with(new ExtraSlingContent()).with(JcrConflictHandler.createJcrConflictHandler()).with(new VersionHook()).with(securityProvider).with(new NameValidatorProvider()).with(new NamespaceEditorProvider()).with(new TypeEditorProvider()).with(new ConflictValidatorProvider()).with(indexProvider).with(indexEditorProvider).with(getDefaultWorkspace()).with(whiteboard).withFastQueryResultSize(true).withObservationQueueLength(configuration.oak_observation_queue_length());
    if (commitRateLimiter != null) {
        jcr.with(commitRateLimiter);
    }
    jcr.createContentRepository();
    return new TcclWrappingJackrabbitRepository((JackrabbitRepository) jcr.createRepository());
}
Also used : NamespaceEditorProvider(org.apache.jackrabbit.oak.plugins.name.NamespaceEditorProvider) Hashtable(java.util.Hashtable) VersionHook(org.apache.jackrabbit.oak.plugins.version.VersionHook) NameValidatorProvider(org.apache.jackrabbit.oak.plugins.name.NameValidatorProvider) ConflictValidatorProvider(org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider) InitialContent(org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent) Executor(java.util.concurrent.Executor) OsgiWhiteboard(org.apache.jackrabbit.oak.osgi.OsgiWhiteboard) TypeEditorProvider(org.apache.jackrabbit.oak.plugins.nodetype.TypeEditorProvider) Oak(org.apache.jackrabbit.oak.Oak) Jcr(org.apache.jackrabbit.oak.jcr.Jcr) Whiteboard(org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard) OsgiWhiteboard(org.apache.jackrabbit.oak.osgi.OsgiWhiteboard) BundleContext(org.osgi.framework.BundleContext)

Aggregations

Hashtable (java.util.Hashtable)1 Executor (java.util.concurrent.Executor)1 Oak (org.apache.jackrabbit.oak.Oak)1 Jcr (org.apache.jackrabbit.oak.jcr.Jcr)1 OsgiWhiteboard (org.apache.jackrabbit.oak.osgi.OsgiWhiteboard)1 ConflictValidatorProvider (org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider)1 NameValidatorProvider (org.apache.jackrabbit.oak.plugins.name.NameValidatorProvider)1 NamespaceEditorProvider (org.apache.jackrabbit.oak.plugins.name.NamespaceEditorProvider)1 TypeEditorProvider (org.apache.jackrabbit.oak.plugins.nodetype.TypeEditorProvider)1 InitialContent (org.apache.jackrabbit.oak.plugins.nodetype.write.InitialContent)1 VersionHook (org.apache.jackrabbit.oak.plugins.version.VersionHook)1 Whiteboard (org.apache.jackrabbit.oak.spi.whiteboard.Whiteboard)1 BundleContext (org.osgi.framework.BundleContext)1