Search in sources :

Example 1 with ReferenceIndexProvider

use of org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndexProvider in project jackrabbit-oak by apache.

the class ClusterPermissionsTest method before.

@Before
public void before() throws Exception {
    MemoryDocumentStore ds = new MemoryDocumentStore();
    MemoryBlobStore bs = new MemoryBlobStore();
    DocumentMK.Builder builder;
    builder = new DocumentMK.Builder();
    builder.setDocumentStore(ds).setBlobStore(bs).setAsyncDelay(0);
    ns1 = builder.setClusterId(1).getNodeStore();
    builder = new DocumentMK.Builder();
    builder.setDocumentStore(ds).setBlobStore(bs).setAsyncDelay(0);
    ns2 = builder.setClusterId(2).getNodeStore();
    Oak oak = new Oak(ns1).with(new InitialContent()).with(new ReferenceEditorProvider()).with(new ReferenceIndexProvider()).with(new PropertyIndexEditorProvider()).with(new PropertyIndexProvider()).with(new TypeEditorProvider()).with(securityProvider1 = new SecurityProviderImpl(getSecurityConfigParameters()));
    contentRepository1 = oak.createContentRepository();
    adminSession1 = login1(getAdminCredentials());
    root1 = adminSession1.getLatestRoot();
    userManager1 = securityProvider1.getConfiguration(UserConfiguration.class).getUserManager(root1, namePathMapper);
    aclMgr1 = securityProvider1.getConfiguration(AuthorizationConfiguration.class).getAccessControlManager(root1, namePathMapper);
    // make sure initial content is visible to ns2
    syncClusterNodes();
    oak = new Oak(ns2).with(new InitialContent()).with(new ReferenceEditorProvider()).with(new ReferenceIndexProvider()).with(new PropertyIndexEditorProvider()).with(new PropertyIndexProvider()).with(new TypeEditorProvider()).with(securityProvider2 = new SecurityProviderImpl(getSecurityConfigParameters()));
    contentRepository2 = oak.createContentRepository();
    adminSession2 = login2(getAdminCredentials());
    root2 = adminSession2.getLatestRoot();
    userManager2 = securityProvider2.getConfiguration(UserConfiguration.class).getUserManager(root2, namePathMapper);
    aclMgr2 = securityProvider2.getConfiguration(AuthorizationConfiguration.class).getAccessControlManager(root2, namePathMapper);
}
Also used : InitialContent(org.apache.jackrabbit.oak.InitialContent) ReferenceEditorProvider(org.apache.jackrabbit.oak.plugins.index.reference.ReferenceEditorProvider) ReferenceIndexProvider(org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndexProvider) PropertyIndexProvider(org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider) MemoryDocumentStore(org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore) TypeEditorProvider(org.apache.jackrabbit.oak.plugins.nodetype.TypeEditorProvider) DocumentMK(org.apache.jackrabbit.oak.plugins.document.DocumentMK) Oak(org.apache.jackrabbit.oak.Oak) PropertyIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider) MemoryBlobStore(org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore) SecurityProviderImpl(org.apache.jackrabbit.oak.security.SecurityProviderImpl) Before(org.junit.Before)

Example 2 with ReferenceIndexProvider

use of org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndexProvider in project jackrabbit-oak by apache.

the class AbstractOak2OakTest method createSession.

protected void createSession() throws RepositoryException, IOException {
    destination = getDestinationContainer().open();
    repository = (RepositoryImpl) new Jcr(destination).with("oak.sling").with(new ReferenceIndexProvider()).createRepository();
    session = repository.login(new SimpleCredentials("admin", "admin".toCharArray()));
}
Also used : ReferenceIndexProvider(org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndexProvider) SimpleCredentials(javax.jcr.SimpleCredentials) Jcr(org.apache.jackrabbit.oak.jcr.Jcr)

Example 3 with ReferenceIndexProvider

use of org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndexProvider in project jackrabbit-oak by apache.

the class AbstractSecurityTest method before.

@Before
public void before() throws Exception {
    Oak oak = new Oak().with(new InitialContent()).with(new VersionHook()).with(JcrConflictHandler.createJcrConflictHandler()).with(new NamespaceEditorProvider()).with(new ReferenceEditorProvider()).with(new ReferenceIndexProvider()).with(new PropertyIndexEditorProvider()).with(new PropertyIndexProvider()).with(new TypeEditorProvider()).with(new ConflictValidatorProvider()).with(getQueryEngineSettings()).with(getSecurityProvider());
    withEditors(oak);
    contentRepository = oak.createContentRepository();
    adminSession = login(getAdminCredentials());
    root = adminSession.getLatestRoot();
    Configuration.setConfiguration(getConfiguration());
}
Also used : NamespaceEditorProvider(org.apache.jackrabbit.oak.plugins.name.NamespaceEditorProvider) ReferenceEditorProvider(org.apache.jackrabbit.oak.plugins.index.reference.ReferenceEditorProvider) ReferenceIndexProvider(org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndexProvider) PropertyIndexProvider(org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider) TypeEditorProvider(org.apache.jackrabbit.oak.plugins.nodetype.TypeEditorProvider) PropertyIndexEditorProvider(org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider) VersionHook(org.apache.jackrabbit.oak.plugins.version.VersionHook) ConflictValidatorProvider(org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider) Before(org.junit.Before)

Example 4 with ReferenceIndexProvider

use of org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndexProvider in project jackrabbit-oak by apache.

the class Jcr2ToSegmentTest method prepare.

@Before
public void prepare() throws Exception {
    File tempDir = new File("target", "test-jcr2");
    if (!tempDir.isDirectory()) {
        Util.unzip(AbstractOak2OakTest.class.getResourceAsStream("/jcr2.zip"), tempDir);
    }
    OakUpgrade.main("--copy-binaries", tempDir.getPath(), destinationContainer.getDescription());
    destination = destinationContainer.open();
    repository = (RepositoryImpl) new Jcr(destination).with("oak.sling").with(new ReferenceIndexProvider()).createRepository();
    session = repository.login(new SimpleCredentials("admin", "admin".toCharArray()));
}
Also used : ReferenceIndexProvider(org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndexProvider) SimpleCredentials(javax.jcr.SimpleCredentials) Jcr(org.apache.jackrabbit.oak.jcr.Jcr) File(java.io.File) Before(org.junit.Before)

Aggregations

ReferenceIndexProvider (org.apache.jackrabbit.oak.plugins.index.reference.ReferenceIndexProvider)4 Before (org.junit.Before)3 SimpleCredentials (javax.jcr.SimpleCredentials)2 Jcr (org.apache.jackrabbit.oak.jcr.Jcr)2 PropertyIndexEditorProvider (org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexEditorProvider)2 PropertyIndexProvider (org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexProvider)2 ReferenceEditorProvider (org.apache.jackrabbit.oak.plugins.index.reference.ReferenceEditorProvider)2 TypeEditorProvider (org.apache.jackrabbit.oak.plugins.nodetype.TypeEditorProvider)2 File (java.io.File)1 InitialContent (org.apache.jackrabbit.oak.InitialContent)1 Oak (org.apache.jackrabbit.oak.Oak)1 ConflictValidatorProvider (org.apache.jackrabbit.oak.plugins.commit.ConflictValidatorProvider)1 DocumentMK (org.apache.jackrabbit.oak.plugins.document.DocumentMK)1 MemoryDocumentStore (org.apache.jackrabbit.oak.plugins.document.memory.MemoryDocumentStore)1 NamespaceEditorProvider (org.apache.jackrabbit.oak.plugins.name.NamespaceEditorProvider)1 VersionHook (org.apache.jackrabbit.oak.plugins.version.VersionHook)1 SecurityProviderImpl (org.apache.jackrabbit.oak.security.SecurityProviderImpl)1 MemoryBlobStore (org.apache.jackrabbit.oak.spi.blob.MemoryBlobStore)1