@Test public void shouldAllowCreatingWorkspaces() throws Exception { shutdownDefaultRepository(); RepositoryConfiguration config = null; config = RepositoryConfiguration.read("{ \"name\" : \"repoName\", \"workspaces\" : { \"allowCreation\" : true } }"); config = new RepositoryConfiguration(config.getDocument(), "repoName", new TestingEnvironment()); repository = new JcrRepository(config); repository.start(); Session session2 = null; Session session3 = null; try { session = createSession(); session2 = createSession(); String newWorkspaceName = "MyCarWorkspace"; session.getWorkspace().createWorkspace(newWorkspaceName); assertAccessibleWorkspace(session, newWorkspaceName); assertAccessibleWorkspace(session2, newWorkspaceName); session.logout(); session3 = createSession(); assertAccessibleWorkspace(session2, newWorkspaceName); assertAccessibleWorkspace(session3, newWorkspaceName); session = createSession(newWorkspaceName); } finally { try { if (session2 != null) session2.logout(); } finally { if (session3 != null) session3.logout(); } } }
void start() throws Exception { doStart(); }
JcrRepository implements org.modeshape.jcr.api.Repository { void start() throws Exception { doStart(); } }
JcrRepository implements org.modeshape.jcr.api.Repository { void start() throws Exception { doStart(); } protected  JcrRepository( RepositoryConfiguration configuration ); }
JcrRepository implements org.modeshape.jcr.api.Repository { void start() throws Exception { doStart(); } protected  JcrRepository( RepositoryConfiguration configuration ); State getState(); @Override String getName(); @Override int getActiveSessionsCount(); RepositoryStatistics getRepositoryStatistics(); Problems getStartupProblems(); Transactions transactions(); RepositoryConfiguration getConfiguration(); @Override String getDescriptor( String key ); @Override JcrValue getDescriptorValue( String key ); @Override JcrValue[] getDescriptorValues( String key ); @Override boolean isSingleValueDescriptor( String key ); @Override boolean isStandardDescriptor( String key ); @Override String[] getDescriptorKeys(); @Override synchronized JcrSession login(); @Override synchronized JcrSession login( Credentials credentials ); @Override synchronized JcrSession login( String workspaceName ); @Override synchronized JcrSession login( final Credentials credentials,
                                          String workspaceName ); }
JcrRepository implements org.modeshape.jcr.api.Repository { void start() throws Exception { doStart(); } protected  JcrRepository( RepositoryConfiguration configuration ); State getState(); @Override String getName(); @Override int getActiveSessionsCount(); RepositoryStatistics getRepositoryStatistics(); Problems getStartupProblems(); Transactions transactions(); RepositoryConfiguration getConfiguration(); @Override String getDescriptor( String key ); @Override JcrValue getDescriptorValue( String key ); @Override JcrValue[] getDescriptorValues( String key ); @Override boolean isSingleValueDescriptor( String key ); @Override boolean isStandardDescriptor( String key ); @Override String[] getDescriptorKeys(); @Override synchronized JcrSession login(); @Override synchronized JcrSession login( Credentials credentials ); @Override synchronized JcrSession login( String workspaceName ); @Override synchronized JcrSession login( final Credentials credentials,
                                          String workspaceName );  }