1 31 32 package org.opencms.file.types; 33 34 import org.opencms.util.CmsStringUtil; 35 36 import java.util.Map ; 37 import java.util.TreeMap ; 38 39 52 public class CmsResourceTypeFolderExtended extends A_CmsResourceTypeFolderBase { 53 54 55 public static final String CONFIGURATION_FOLDER_CLASS = "folder.class"; 56 57 58 public static final String CONFIGURATION_FOLDER_CLASS_PARAMS = "folder.class.params"; 59 60 61 private String m_folderClassName; 62 63 64 private String m_folderClassParams; 65 66 69 public void addConfigurationParameter(String paramName, String paramValue) { 70 71 super.addConfigurationParameter(paramName, paramValue); 72 if (CmsStringUtil.isNotEmpty(paramName) && CmsStringUtil.isNotEmpty(paramValue)) { 73 if (CONFIGURATION_FOLDER_CLASS.equalsIgnoreCase(paramName)) { 74 m_folderClassName = paramValue.trim(); 75 } 76 if (CONFIGURATION_FOLDER_CLASS_PARAMS.equalsIgnoreCase(paramName)) { 77 m_folderClassParams = paramValue.trim(); 78 } 79 } 80 } 81 82 85 public Map getConfiguration() { 86 87 Map result = new TreeMap (); 88 if (CmsStringUtil.isNotEmpty(getFolderClassName())) { 89 result.put(CONFIGURATION_FOLDER_CLASS, getFolderClassName()); 90 } 91 if (CmsStringUtil.isNotEmpty(getFolderClassParams())) { 92 result.put(CONFIGURATION_FOLDER_CLASS_PARAMS, getFolderClassParams()); 93 } 94 Map additional = super.getConfiguration(); 95 if ((additional != null) && (additional.size() > 0)) { 96 result.putAll(additional); 97 } 98 return result; 99 } 100 101 106 public String getFolderClassName() { 107 108 return m_folderClassName; 109 } 110 111 116 public String getFolderClassParams() { 117 118 return m_folderClassParams; 119 } 120 } | Popular Tags |