code: private List<CmsResourceTypeBean> buildTypesList(List<I_CmsResourceType> types, Set<String> creatableTypes) {
  
          ArrayList<CmsResourceTypeBean> list = new ArrayList<CmsResourceTypeBean>();
          if (types == null) {
              return list;
          }
          Map<I_CmsResourceType, I_CmsPreviewProvider> typeProviderMapping = getPreviewProviderForTypes(types);
          Iterator<I_CmsResourceType> it = types.iterator();
          while (it.hasNext()) {
  
              I_CmsResourceType type = it.next();
              try {
                  CmsResourceTypeBean bean = createTypeBean(
                      type,
                      typeProviderMapping.get(type),
                      creatableTypes.contains(type.getTypeName()));
                  list.add(bean);
              } catch (Exception e) {
                  if (type != null) {
                      log(
                          Messages.get().getBundle(getWorkplaceLocale()).key(
                              Messages.ERR_BUILD_TYPE_LIST_1,
                              type.getTypeName()),
                          e);
                  }
              }
          }
          return list;
      }
docs: Generates a map with all available content types.<p>
  
  The map uses resource type name as the key and stores the CmsTypesListInfoBean as the value.
  
  @param types the resource types
  @param creatableTypes the creatable types
  
  @return the map containing the available resource types