code: private List<CmsGalleryFolderBean> buildGalleriesList(Map<String, CmsGalleryTypeInfo> galleryTypes) {
  
          List<CmsGalleryFolderBean> list = new ArrayList<CmsGalleryFolderBean>();
          if (galleryTypes == null) {
              return list;
          }
          Iterator<Entry<String, CmsGalleryTypeInfo>> iGalleryTypes = galleryTypes.entrySet().iterator();
          while (iGalleryTypes.hasNext()) {
              Entry<String, CmsGalleryTypeInfo> ent = iGalleryTypes.next();
              CmsGalleryTypeInfo tInfo = ent.getValue();
              ArrayList<String> contentTypes = new ArrayList<String>();
              Iterator<I_CmsResourceType> it = tInfo.getContentTypes().iterator();
              while (it.hasNext()) {
                  contentTypes.add(String.valueOf(it.next().getTypeName()));
              }
              Iterator<CmsResource> ir = tInfo.getGalleries().iterator();
              while (ir.hasNext()) {
                  CmsResource res = ir.next();
                  CmsGalleryFolderBean bean = new CmsGalleryFolderBean();
                  String sitePath = getCmsObject().getSitePath(res);
                  String title = "";
                  try {
                      // read the gallery title
                      title = getCmsObject().readPropertyObject(
                          sitePath,
                          CmsPropertyDefinition.PROPERTY_TITLE,
                          false).getValue("");
                  } catch (CmsException e) {
                      // error reading title property
                      logError(e);
                  }
                  // sitepath as gallery id
                  bean.setPath(sitePath);
                  // content types
                  bean.setContentTypes(contentTypes);
                  // title
                  bean.setTitle(title);
                  // gallery type name
                  bean.setResourceType(tInfo.getResourceType().getTypeName());
                  bean.setEditable(isEditable(getCmsObject(), res));
                  bean.setBigIconClasses(
                      CmsIconUtil.getIconClasses(CmsIconUtil.getDisplayType(getCmsObject(), res), sitePath, false));
                  list.add(bean);
              }
          }
          return list;
      }
docs: Returns the map with the available galleries.<p>
  
  The map uses gallery path as the key and stores the CmsGalleriesListInfoBean as the value.<p>
  
  @param galleryTypes the galleries
  
  @return the map with gallery info beans