code: @SuppressWarnings("deprecation")
      private CmsResourceTypeBean createTypeBean(
          I_CmsResourceType type,
          I_CmsPreviewProvider preview,
          boolean creatable) {
  
          CmsResourceTypeBean result = new CmsResourceTypeBean();
  
          result.setResourceType(type.getTypeName());
          result.setTypeId(type.getTypeId());
          Locale wpLocale = getWorkplaceLocale();
          // type title and subtitle
          result.setTitle(CmsWorkplaceMessages.getResourceTypeName(wpLocale, type.getTypeName()));
          result.setSubTitle(CmsWorkplaceMessages.getResourceTypeDescription(wpLocale, type.getTypeName()));
          result.setBigIconClasses(CmsIconUtil.getIconClasses(type.getTypeName(), null, false));
          // gallery id of corresponding galleries
          ArrayList<String> galleryNames = new ArrayList<String>();
          Iterator<I_CmsResourceType> galleryTypes = type.getGalleryTypes().iterator();
          while (galleryTypes.hasNext()) {
              I_CmsResourceType galleryType = galleryTypes.next();
              galleryNames.add(galleryType.getTypeName());
          }
          result.setGalleryTypeNames(galleryNames);
          if (preview != null) {
              result.setPreviewProviderName(preview.getPreviewName());
          }
          if (type.isFolder()) {
              result.setVisibility(TypeVisibility.hidden);
          }
          result.setCreatableType(creatable);
          return result;
      }
docs: Creates a resource type bean for the given type.<p>
  
  @param type the resource type
  @param preview the preview provider
  @param creatable if the type may be created by the current user
  
  @return the resource type bean