code: @SuppressWarnings("deprecation")
      private void addGalleriesForType(Map<String, CmsGalleryTypeInfo> galleryTypeInfos, String typeName)
      throws CmsLoaderException {
  
          I_CmsResourceType contentType = getResourceManager().getResourceType(typeName);
          for (I_CmsResourceType galleryType : contentType.getGalleryTypes()) {
  
              if (galleryTypeInfos.containsKey(galleryType.getTypeName())) {
                  CmsGalleryTypeInfo typeInfo = galleryTypeInfos.get(galleryType.getTypeName());
                  typeInfo.addContentType(contentType);
              } else {
                  CmsGalleryTypeInfo typeInfo;
  
                  typeInfo = new CmsGalleryTypeInfo(
                      galleryType,
                      contentType,
                      getGalleriesByType(galleryType.getTypeId()));
  
                  galleryTypeInfos.put(galleryType.getTypeName(), typeInfo);
              }
  
          }
      }
docs: Adds galleries for a given type.<p>
  
  @param galleryTypeInfos the gallery type infos
  @param typeName the type name
  
  @throws CmsLoaderException if something goes wrong