@Override public ContentSession run() throws NoSuchWorkspaceException, LoginException { return repository.login(null, null); } });
/** * Provides descriptors for current repository implementations. Can be overridden * by the subclasses to add more values to the descriptor * @return repository descriptor */ protected GenericDescriptors determineDescriptors() { return new JcrDescriptorsImpl(contentRepository.getDescriptors(), new SimpleValueFactory()); }
@Override public ContentSession run() { try { return contentRepository.login(null, null); } catch (Exception e) { throw new RuntimeException(e); } } });
/** * Provides descriptors for current repository implementations. Can be overridden * by the subclasses to add more values to the descriptor * @return repository descriptor */ protected GenericDescriptors determineDescriptors() { return new JcrDescriptorsImpl(contentRepository.getDescriptors(), new SimpleValueFactory()); }
@Override public ContentSession run() throws LoginException, NoSuchWorkspaceException { return getContentRepository().login(null, null); } });
/** * Provides descriptors for current repository implementations. Can be overridden * by the subclasses to add more values to the descriptor * @return repository descriptor */ protected GenericDescriptors determineDescriptors() { return new JcrDescriptorsImpl(contentRepository.getDescriptors(), new SimpleValueFactory()); }
@Override public ContentSession run() throws LoginException, NoSuchWorkspaceException { return repository.login(null, rcb.getWorkspaceName()); } });
@Test public void testUserManagementDescriptor() throws RepositoryException { Oak oak = new Oak() .with(new InitialContent()) .with(getSecurityProvider()); ContentRepository contentRepository = oak.createContentRepository(); assertFalse(contentRepository.getDescriptors().getValue(JackrabbitRepository.OPTION_USER_MANAGEMENT_SUPPORTED).getBoolean()); }
@Override public ContentSession run() throws Exception { return repo.login(null, null); } });
@Override public ContentSession run() throws LoginException, NoSuchWorkspaceException { return contentRepository.login(null, null); } });
@Override public ContentSession run() throws NoSuchWorkspaceException, LoginException { return repository.login(null, null); } });
@Override public ContentSession run() throws LoginException, NoSuchWorkspaceException { return repository.login(null, rcb.getWorkspaceName()); } });
@Override public ContentSession run() throws Exception { return repo.login(null, null); } });
private ContentSession newSession() throws LoginException, NoSuchWorkspaceException { return repository.login(null, null); }
protected ContentSession login1(@Nullable Credentials credentials) throws LoginException, NoSuchWorkspaceException { return contentRepository1.login(credentials, null); } protected ContentSession login2(@Nullable Credentials credentials)
/** * Creates a content repository with the given configuration * and logs in to the default workspace with no credentials, * returning the resulting content session. * <p> * This method exists mostly as a convenience for one-off tests, * as there's no way to create other sessions for accessing the * same repository. * <p> * There is typically no need to explicitly close the returned * session unless the repository has explicitly been configured * to reserve some resources until all sessions have been closed. * The repository will be garbage collected once the session is no * longer used. * * @return content session */ public ContentSession createContentSession() { try { return createContentRepository().login(null, null); } catch (NoSuchWorkspaceException e) { throw new IllegalStateException("Default workspace not found", e); } catch (LoginException e) { throw new IllegalStateException("Anonymous login not allowed", e); } }
/** * Creates a content repository with the given configuration * and logs in to the default workspace with no credentials, * returning the resulting content session. * <p> * This method exists mostly as a convenience for one-off tests, * as there's no way to create other sessions for accessing the * same repository. * <p> * There is typically no need to explicitly close the returned * session unless the repository has explicitly been configured * to reserve some resources until all sessions have been closed. * The repository will be garbage collected once the session is no * longer used. * * @return content session */ public ContentSession createContentSession() { try { return createContentRepository().login(null, null); } catch (NoSuchWorkspaceException e) { throw new IllegalStateException("Default workspace not found", e); } catch (LoginException e) { throw new IllegalStateException("Anonymous login not allowed", e); } }
protected ContentSession login(@Nullable Credentials credentials) throws LoginException, NoSuchWorkspaceException { return contentRepository.login(credentials, null); }
protected ContentSession login2(@Nullable Credentials credentials) throws LoginException, NoSuchWorkspaceException { return contentRepository2.login(credentials, null); }
/** * Creates a content repository with the given configuration * and logs in to the default workspace with no credentials, * returning the resulting content session. * <p> * This method exists mostly as a convenience for one-off tests, * as there's no way to create other sessions for accessing the * same repository. * <p> * There is typically no need to explicitly close the returned * session unless the repository has explicitly been configured * to reserve some resources until all sessions have been closed. * The repository will be garbage collected once the session is no * longer used. * * @return content session */ public ContentSession createContentSession() { try { return createContentRepository().login(null, null); } catch (NoSuchWorkspaceException e) { throw new IllegalStateException("Default workspace not found", e); } catch (LoginException e) { throw new IllegalStateException("Anonymous login not allowed", e); } }