コード例 #1
0
 private String getSuitableType(String[] types) {
   Map iconMap = configBeanResource.getSystemConfig().getConfiguration().getMimeIconMap().getMap();
   for (String type : types) {
     if (iconMap.containsKey(type)) {
       return type;
     }
   }
   return null;
 }
コード例 #2
0
 private String getIcon(String mimeType) {
   String singleType = null;
   if (StringUtils.isNotEmpty(mimeType) && mimeType.contains(",")) {
     String[] types = mimeType.split(",");
     singleType = this.getSuitableType(types);
   } else {
     singleType = mimeType;
   }
   return configBeanResource
       .getSystemConfig()
       .getConfiguration()
       .getMimeIconMap()
       .getIconURI(singleType);
 }