/** * {@inheritDoc} */ public String getName() { return wspConfig.getName(); }
/** * Returns the workspace name. * * @return the workspace name */ protected String getName() { return config.getName(); }
/** * {@inheritDoc} */ public String getName() { return wspConfig.getName(); }
/** * Returns the workspace name. * * @return the workspace name */ protected String getName() { return config.getName(); }
/** * Adds the given workspace configuration to the repository. * * @param wc workspace configuration * @throws ConfigurationException if a workspace with the same name * already exists */ private void addWorkspaceConfig(WorkspaceConfig wc) throws ConfigurationException { String name = wc.getName(); if (!workspaces.containsKey(name)) { workspaces.put(name, wc); } else { throw new ConfigurationException( "Duplicate workspace configuration: " + name); } }
/** * Adds the given workspace configuration to the repository. * * @param wc workspace configuration * @throws ConfigurationException if a workspace with the same name * already exists */ private void addWorkspaceConfig(WorkspaceConfig wc) throws ConfigurationException { String name = wc.getName(); if (!workspaces.containsKey(name)) { workspaces.put(name, wc); } else { throw new ConfigurationException( "Duplicate workspace configuration: " + name); } }
/** * Return the internal effective retention/hold manager for this workspace. * If not already done, creates a new instance. * * @return effective retention/hold manager for this workspace * @throws RepositoryException if an error occurs */ synchronized RetentionRegistry getRetentionRegistry() throws RepositoryException { // check state of this instance sanityCheck(); if (retentionRegistry == null) { retentionRegistry = context.getRepository().getRetentionRegistry(wspConfig.getName()); } return retentionRegistry; }
/** * Return the internal effective retention/hold manager for this workspace. * If not already done, creates a new instance. * * @return effective retention/hold manager for this workspace * @throws RepositoryException if an error occurs */ synchronized RetentionRegistry getRetentionRegistry() throws RepositoryException { // check state of this instance sanityCheck(); if (retentionRegistry == null) { retentionRegistry = context.getRepository().getRetentionRegistry(wspConfig.getName()); } return retentionRegistry; }
/** * {@inheritDoc} */ public synchronized QueryManager getQueryManager() throws RepositoryException { // check state of this instance sanityCheck(); if (queryManager == null) { SearchManager searchManager; try { searchManager = context.getRepository().getSearchManager(wspConfig.getName()); if (searchManager == null) { String msg = "no search manager configured for this workspace"; log.debug(msg); throw new RepositoryException(msg); } } catch (NoSuchWorkspaceException nswe) { // should never get here String msg = "internal error: failed to instantiate query manager"; log.debug(msg); throw new RepositoryException(msg, nswe); } queryManager = new QueryManagerImpl(context, searchManager); } return queryManager; }
/** * {@inheritDoc} */ public synchronized QueryManager getQueryManager() throws RepositoryException { // check state of this instance sanityCheck(); if (queryManager == null) { SearchManager searchManager; try { searchManager = context.getRepository().getSearchManager(wspConfig.getName()); if (searchManager == null) { String msg = "no search manager configured for this workspace"; log.debug(msg); throw new RepositoryException(msg); } } catch (NoSuchWorkspaceException nswe) { // should never get here String msg = "internal error: failed to instantiate query manager"; log.debug(msg); throw new RepositoryException(msg, nswe); } queryManager = new QueryManagerImpl(context, searchManager); } return queryManager; }
/** * Return the lock manager for this workspace. If not already done, creates * a new instance. * * @return lock manager for this workspace * @throws RepositoryException if an error occurs */ public synchronized org.apache.jackrabbit.core.lock.LockManager getInternalLockManager() throws RepositoryException { // check state of this instance sanityCheck(); if (lockMgr == null) { lockMgr = context.getRepository().getLockManager(wspConfig.getName()); // FIXME Shouldn't need to use instanceof here if (context.getSessionImpl() instanceof XASessionImpl) { lockMgr = new XALockManager((LockManagerImpl) lockMgr); } } return lockMgr; }
/** * Return the lock manager for this workspace. If not already done, creates * a new instance. * * @return lock manager for this workspace * @throws RepositoryException if an error occurs */ public synchronized org.apache.jackrabbit.core.lock.LockManager getInternalLockManager() throws RepositoryException { // check state of this instance sanityCheck(); if (lockMgr == null) { lockMgr = context.getRepository().getLockManager(wspConfig.getName()); // FIXME Shouldn't need to use instanceof here if (context.getSessionImpl() instanceof XASessionImpl) { lockMgr = new XALockManager((LockManagerImpl) lockMgr); } } return lockMgr; }
this.subject = subject; this.userId = retrieveUserId(subject, wspConfig.getName()); long count = SESSION_COUNTER.incrementAndGet(); if (userId != null) { this.context.setItemManager(createItemManager()); this.context.setAccessManager(createAccessManager(subject)); this.context.setObservationManager(createObservationManager(wspConfig.getName()));
this.subject = subject; this.userId = retrieveUserId(subject, wspConfig.getName()); long count = SESSION_COUNTER.incrementAndGet(); if (userId != null) { this.context.setItemManager(createItemManager()); this.context.setAccessManager(createAccessManager(subject)); this.context.setObservationManager(createObservationManager(wspConfig.getName()));
for (int i = 0; wspIt.hasNext(); i++) { WorkspaceConfig wsc = wspIt.next(); names[i] = wsc.getName();
/** * Test that a standard workspace configuration file is * correctly parsed. * * @throws Exception on errors */ public void testWorkspaceXml() throws Exception { InputStream xml = getClass().getClassLoader().getResourceAsStream( "org/apache/jackrabbit/core/config/workspace.xml"); WorkspaceConfig config = parser.parseWorkspaceConfig(new InputSource(xml)); assertEquals("target", config.getHomeDir()); assertEquals("default", config.getName()); PersistenceManagerConfig pmc = config.getPersistenceManagerConfig(); assertEquals( "org.apache.jackrabbit.core.persistence.obj.ObjectPersistenceManager", pmc.getClassName()); assertTrue(pmc.getParameters().isEmpty()); assertTrue(config.isSearchEnabled()); WorkspaceSecurityConfig ws = config.getSecurityConfig(); if (ws != null) { BeanConfig ppfConfig = ws.getAccessControlProviderConfig(); if (ppfConfig != null) { ppfConfig.newInstance(AccessControlProvider.class); } } }
wspInfos.put(config.getName(), info);
wspInfos.put(config.getName(), info);