net.fckeditor.handlers
Class ExtensionsHandler

java.lang.Object
  extended by net.fckeditor.handlers.ExtensionsHandler

Deprecated. Class will be removed in FCKeditor.Java 2.6, functionality merged into ResourceType.

@Deprecated
public class ExtensionsHandler
extends Object

This handler manages the allowed and denied extensions for each resource type. The extensions are preset by the properties managed by PropertiesLoader.

Hint: It's recommend to use either allowed or denied extensions for one file type. Never use both at the same time! That's why denied extensions of a file type will be deleted if you set the allowed one and vice versa.

Version:
$Id: ExtensionsHandler.java 3695 2009-06-18 20:18:38Z mosipov $
See Also:
ResourceType

Constructor Summary
ExtensionsHandler()
          Deprecated.  
 
Method Summary
static Set<String> getExtensionsAllowed(ResourceType type)
          Deprecated. Getter for the allowed extensions of a file type.
static Set<String> getExtensionsDenied(ResourceType type)
          Deprecated. Getter for the denied extensions of a file type.
static boolean isAllowed(ResourceType type, String extension)
          Deprecated. Checks if an extension is allowed for a file type.
static void setExtensionsAllowed(ResourceType type, String extensionsList)
          Deprecated. Setter for the allowed extensions of a file type.
static void setExtensionsDenied(ResourceType type, String extensionsList)
          Deprecated. Setter for the denied extensions of a file type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtensionsHandler

public ExtensionsHandler()
Deprecated. 
Method Detail

getExtensionsAllowed

public static Set<String> getExtensionsAllowed(ResourceType type)
Deprecated. 
Getter for the allowed extensions of a file type.

Parameters:
type - The file type.
Returns:
Set of allowed extensions or an empty set.

setExtensionsAllowed

public static void setExtensionsAllowed(ResourceType type,
                                        String extensionsList)
Deprecated. 
Setter for the allowed extensions of a file type. The denied extensions will be cleared.
If extensionsList is null, allowed extensions are kept untouched.

Parameters:
type - The file type.
extensionsList - Required format: ext1|ext2|ext3

getExtensionsDenied

public static Set<String> getExtensionsDenied(ResourceType type)
Deprecated. 
Getter for the denied extensions of a file type.

Parameters:
type - The file type.
Returns:
Set of denied extensions or an empty set.

setExtensionsDenied

public static void setExtensionsDenied(ResourceType type,
                                       String extensionsList)
Deprecated. 
Setter for the denied extensions of a file type. The allowed extensions will be cleared.
If extensionsList is null, denied extensions are kept untouched.

Parameters:
type - The file type.
extensionsList - Required format: ext1|ext2|ext3

isAllowed

public static boolean isAllowed(ResourceType type,
                                String extension)
Deprecated. 
Checks if an extension is allowed for a file type.

Parameters:
type - The resource type you want to check.
extension - The extension you want to check.
Returns:
true is extension is allowed else false. Attention: false is always returned if 'type' or 'extensions' is null.


Copyright © 2004-2009 Frederico Caldeira Knabben. All Rights Reserved.