Changeset 2101 for FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/ExtensionsHandler.java
- Timestamp:
- 2008-06-23 00:00:48 (7 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/ExtensionsHandler.java
r1995 r2101 28 28 29 29 /** 30 * Handler which manages the allowed and denied extensions for each resource type. The 31 * extensions are preset by the properties managed by {@link PropertiesLoader}.<br> 32 * <br> 33 * Hint: It's recommend to use either allowed or denied extensions for one file type. 34 * Never use both at the same time! That's why denied extensions of a file type will be 35 * deleted, if you set the allowed one and vice versa. 30 * This handler manages the allowed and denied extensions for each resource 31 * type. The extensions are preset by the properties managed by 32 * {@link PropertiesLoader}. 33 * <p> 34 * <em>Hint</em>: It's recommend to use either allowed or denied extensions for one file 35 * type. <strong>Never</strong> use both at the same time! That's why denied 36 * extensions of a file type will be deleted if you set the allowed one and vice 37 * versa. 38 * </p> 36 39 * 37 40 * @version $Id$ … … 74 77 75 78 /** 76 * Setter for the allowed extensions of a file type. The denied extensions will be cleared.<br> 77 * If 'extensionsList' is null, allowed extensions kept untouched. 79 * Setter for the allowed extensions of a file type. The denied extensions 80 * will be cleared.<br /> 81 * If <code>extensionsList</code> is <code>null</code>, allowed 82 * extensions are kept untouched. 78 83 * 79 84 * @param type 80 * The file type.85 * The file type. 81 86 * @param extensionsList 82 * Required format: <code>ext1|ext2|ext3</code>87 * Required format: <code>ext1|ext2|ext3</code> 83 88 */ 84 89 public static void setExtensionsAllowed(final ResourceTypeHandler type, final String extensionsList) { … … 93 98 * 94 99 * @param type 95 * The file type.100 * The file type. 96 101 * @return Set of denied extensions or an empty set. 97 102 */ … … 101 106 102 107 /** 103 * Setter for the denied extensions of a file type. The allowed extensions will be cleared.<br> 104 * If 'extensionsList' is null, denied extensions kept untouched. 108 * Setter for the denied extensions of a file type. The allowed extensions 109 * will be cleared.<br /> 110 * If <code>extensionsList</code> is <code>null</code>, denied 111 * extensions are kept untouched. 105 112 * 106 113 * @param type 107 * The file type.114 * The file type. 108 115 * @param extensionsList 109 * Required format: <code>ext1|ext2|ext3</code>116 * Required format: <code>ext1|ext2|ext3</code> 110 117 */ 111 118 public static void setExtensionsDenied(final ResourceTypeHandler type, final String extensionsList) { … … 117 124 118 125 /** 119 * Checks ,if an extension is allowed for a file type.126 * Checks if an extension is allowed for a file type. 120 127 * 121 128 * @param type 129 * The resource type you want to check. 122 130 * @param extension 123 * @return True, false. False is returned too, if 'type' or 'extensions' is null. 131 * The extension you want to check. 132 * @return <code>true</code> is extension is allowed else 133 * <code>false</code>. <em>Attention</em>: <code>false</code> 134 * is always returned if 'type' or 'extensions' is <code>null</code>. 124 135 */ 125 136 public static boolean isAllowed(final ResourceTypeHandler type, final String extension) {