}
}
public boolean canRemoveRepository(String name) throws RepositoryException
{
RepositoryImpl repo = (RepositoryImpl) getRepository(name);
try
{
RepositoryEntry repconfig = config.getRepositoryConfiguration(name);
for (WorkspaceEntry wsEntry : repconfig.getWorkspaceEntries())
{
// Check non system workspaces
if (!repo.getSystemWorkspaceName().equals(wsEntry.getName()) && !repo.canRemoveWorkspace(wsEntry.getName()))
return false;
}
// check system workspace
RepositoryContainer repositoryContainer = repositoryContainers.get(name);
SessionRegistry sessionRegistry =
(SessionRegistry) repositoryContainer.getComponentInstance(SessionRegistry.class);
if (sessionRegistry == null || sessionRegistry.isInUse(repo.getSystemWorkspaceName()))
return false;
}
catch (RepositoryConfigurationException e)
{