code: public String getSpaces(String storeID) throws ResourceException {
  
          Element spacesElem = new Element("spaces");
  
          try {
              StorageProvider storage =
                  storageProviderFactory.getStorageProvider(storeID);
  
              Iterator<String> spaces = storage.getSpaces();
              while (spaces.hasNext()) {
                  String spaceID = spaces.next();
                  Element spaceElem = new Element("space");
                  spaceElem.setAttribute("id", spaceID);
                  spacesElem.addContent(spaceElem);
              }
          } catch (Exception e) {
              storageProviderFactory.expireStorageProvider(storeID);
              throw new ResourceException("Error attempting to build spaces XML",
                                          e);
          }
  
          Document doc = new Document(spacesElem);
          XMLOutputter xmlConverter = new XMLOutputter();
          return xmlConverter.outputString(doc);
      }
docs: Provides a listing of all spaces for a customer. Open spaces are
  always included in the list, closed spaces are included based
  on user authorization.
  
  @param storeID
  @return XML listing of spaces