|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.fckeditor.handlers.ResourceType
public class ResourceType
File Browser resource types. The File Browser provides a specific resource type for each and every request. This class is intended to reflect these in an Enum-like manner.
The resource types are:
| Field Summary | |
|---|---|
static ResourceType |
FILE
Resource type File |
static ResourceType |
FLASH
Resource type Flash |
static ResourceType |
IMAGE
Resource type Image |
static ResourceType |
MEDIA
Resource type Media |
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Compares the specified object with this resource type for equality. |
Set<String> |
getAllowedEextensions()
Returns a read-only reference to the allowed extensions set. |
static ResourceType |
getDefaultResourceType(String name)
Returns the resource type constant with the specified name. |
Set<String> |
getDeniedExtensions()
Returns a read-only reference to the denied extensions set. |
String |
getName()
Returns the name of this resource type. |
String |
getPath()
Returns the absolute path of this resource type. |
static ResourceType |
getResourceType(String name)
Returns the resource type constant with the specified name. |
int |
hashCode()
Returns the hash code value for this resource type. |
boolean |
isAllowedExtension(String extension)
Returns true if extension is allowed. |
boolean |
isDeniedExtension(String extension)
Returns true if extension is denied. |
boolean |
isNotAllowedExtension(String extension)
Deprecated. Method will be removed in FCKeditor.Java 2.6, use isDeniedExtension(String). |
static boolean |
isValidType(String name)
Returns true if name represents a valid resource type
constant. |
static ResourceType |
valueOf(String name)
Returns the resource type constant with the specified name. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ResourceType FILE
File
public static final ResourceType FLASH
Flash
public static final ResourceType IMAGE
Image
public static final ResourceType MEDIA
Media
| Method Detail |
|---|
public String getName()
public String getPath()
public Set<String> getAllowedEextensions()
public Set<String> getDeniedExtensions()
public static ResourceType valueOf(String name)
name - the name of the constant to return
IllegalArgumentException - if this class has no constant with the specified name
NullPointerException - if name is null or emptypublic static boolean isValidType(String name)
true if name represents a valid resource type
constant.
name - the resource type to check
true if name represents a valid resource type, else
falsepublic static ResourceType getResourceType(String name)
valueOf(String) it returns a null instead of throwing an
exception if a resource type constant was not found.
name - the name of the constant to return
nullpublic static ResourceType getDefaultResourceType(String name)
getResourceType(String) it returns FILE instead of
returning null.
name - the name of the constant to return
FILEpublic boolean isAllowedExtension(String extension)
true if extension is allowed. Denied extensions set
takes precedence over allowed extensions set, in other words a negative
check is made against denied set and if this fails, allowed set is
checked.
extension - the extension to check, empty will fail
true if extension is allowed, else
false@Deprecated public boolean isNotAllowedExtension(String extension)
isDeniedExtension(String).
isAllowedExtension(String). It simply negates
the return value.
extension - Extension string.
true if extension is not fails, else
false.isDeniedExtension(String)public boolean isDeniedExtension(String extension)
true if extension is denied. This method simply
negates isAllowedExtension(String).
extension - the extension to check, empty will fail
true if extension is denied, else falsepublic boolean equals(Object obj)
equals in class Objectobj - Object to be compared with this resource type.
true if the specified object is equal to this
resource typepublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||