code: public boolean canRemoveWorkspace(String workspaceName) throws NoSuchWorkspaceException
     {
        if (repositoryContainer.getWorkspaceEntry(workspaceName) == null)
        {
           throw new NoSuchWorkspaceException("No such workspace " + workspaceName);
        }
  
        if (workspaceName.equals(config.getSystemWorkspaceName()))
        {
           return false;
        }
  
        SessionRegistry sessionRegistry =
           (SessionRegistry)repositoryContainer.getComponentInstance(SessionRegistry.class);
  
        return sessionRegistry != null && !sessionRegistry.isInUse(workspaceName);
     }
docs: {@inheritDoc}