public List<XWikiEclipseSpaceSummary> getSpaces(String wikiId)
      throws XWikiEclipseStorageException {

    final List<XWikiEclipseSpaceSummary> result = new ArrayList<XWikiEclipseSpaceSummary>();

    try {
      final IFolder spaceFolder = StorageUtils.createFolder(baseFolder.getFolder(SPACES_DIRECTORY));

      List<IResource> spaceFolderResources = getChildResources(spaceFolder, IResource.DEPTH_ONE);
      for (IResource spaceFolderResource : spaceFolderResources) {
        if (spaceFolderResource instanceof IFile) {
          IFile wikiFile = (IFile) spaceFolderResource;
          XWikiEclipseSpaceSummary spaceSummary;
          try {
            spaceSummary =
                (XWikiEclipseSpaceSummary)
                    StorageUtils.readFromJSON(
                        wikiFile, XWikiEclipseSpaceSummary.class.getCanonicalName());
            if (spaceSummary.getWiki().equals(wikiId)) {
              result.add(spaceSummary);
            }
          } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
          }
        }
      }
    } catch (CoreException e) {
      throw new XWikiEclipseStorageException(e);
    }

    return result;
  }
  /**
   * @param wiki
   * @param space
   * @return
   * @throws XWikiEclipseStorageException
   */
  public XWikiEclipseSpaceSummary getSpace(String wiki, String space)
      throws XWikiEclipseStorageException {
    List<XWikiEclipseSpaceSummary> spaces = getSpaces(wiki);
    for (XWikiEclipseSpaceSummary s : spaces) {
      if (s.getName().equals(space)) {
        return s;
      }
    }

    return null;
  }