Index: /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/handlers/ResourceTypeHandler.java
===================================================================
--- /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/handlers/ResourceTypeHandler.java	(revision 1604)
+++ /FCKeditor.Java/branches/2.4/src/main/java/net/fckeditor/handlers/ResourceTypeHandler.java	(revision 1605)
@@ -24,9 +24,7 @@
 import java.util.Map;
 
-import net.fckeditor.tool.Utils;
-
 /**
  * Handler for the different resource types.
- *
+ * 
  * @version $Id$
  */
@@ -35,16 +33,24 @@
 	private String name;
 	private static Map<String, ResourceTypeHandler> types = new HashMap<String, ResourceTypeHandler>(
-			4);
+	        4);
+	private static Map<ResourceTypeHandler, String> paths = new HashMap<ResourceTypeHandler, String>(
+	        4);
 	public static final ResourceTypeHandler FILE = new ResourceTypeHandler("File");
 	public static final ResourceTypeHandler FLASH = new ResourceTypeHandler("Flash");
 	public static final ResourceTypeHandler IMAGE = new ResourceTypeHandler("Image");
 	public static final ResourceTypeHandler MEDIA = new ResourceTypeHandler("Media");
-	
 
 	static {
+		// initialize the resource types
 		types.put(FILE.getName(), FILE);
 		types.put(FLASH.getName(), FLASH);
 		types.put(IMAGE.getName(), IMAGE);
 		types.put(MEDIA.getName(), MEDIA);
+
+		// initialize the sub folders for each resource type
+		paths.put(FILE, PropertiesLoader.getProperty("connector.resourceType.file.path"));
+		paths.put(IMAGE, PropertiesLoader.getProperty("connector.resourceType.image.path"));
+		paths.put(FLASH, PropertiesLoader.getProperty("connector.resourceType.flash.path"));
+		paths.put(MEDIA, PropertiesLoader.getProperty("connector.resourceType.media.path"));
 	}
 
@@ -53,20 +59,34 @@
 	}
 
+	/**
+	 * Getter for the name.
+	 * 
+	 * @return name
+	 */
 	public String getName() {
 		return name;
 	}
 
+	/**
+	 * Getter for the path (sub folder).
+	 * 
+	 * @return The path (sub folder).
+	 */
 	public String getPath() {
-		String propKey = "connector.resourceType.".concat(name.toLowerCase()).concat(".path");
-		String propVal = PropertiesLoader.getProperty(propKey);
-		if (Utils.isEmpty(propVal))  // can't be, if properties settings are valid
-			throw new IllegalArgumentException("No property found for: ".concat(propKey));
-		return propVal;
+		return paths.get(this.name);
 	}
 
-	public static ResourceTypeHandler valueOf(final String name)
-			throws NullPointerException, IllegalArgumentException {
+	/**
+	 * Getter for an {@link ResourceTypeHandler} of a specified string.
+	 * 
+	 * @param name
+	 * @return A {@link ResourceTypeHandler} object holding the value represented by the string
+	 *         argument.
+	 * @throws IllegalArgumentException
+	 *             If 'name' is null can't be parsed.
+	 */
+	public static ResourceTypeHandler valueOf(final String name) throws IllegalArgumentException {
 		if (name == null)
-			throw new NullPointerException();
+			throw new IllegalArgumentException();
 
 		ResourceTypeHandler rt = types.get(name);
@@ -76,8 +96,14 @@
 	}
 
+	/**
+	 * Checks, if a specfied string is valid representation of a {@link ResourceTypeHandler}.
+	 * 
+	 * @param name
+	 * @return True, if the string represrntation is valid, or false.
+	 */
 	public static boolean isValid(final String name) {
 		return types.containsKey(name);
 	}
-	
+
 	public static ResourceTypeHandler getDefaultResourceType(final String name) {
 		ResourceTypeHandler rt = getResourceType(name);
@@ -85,4 +111,11 @@
 	}
 
+	/**
+	 * A wrapper for {@link #valueOf(String)}. It returns null instead of throwing an exception.
+	 * 
+	 * @param name
+	 * @return A {@link ResourceTypeHandler} object holding the value represented by the string
+	 *         argument, or null.
+	 */
 	public static ResourceTypeHandler getResourceType(final String name) {
 		try {
@@ -92,5 +125,10 @@
 		}
 	}
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#equals(java.lang.Object)
+	 */
 	@Override
 	public boolean equals(Object obj) {
@@ -102,10 +140,20 @@
 		}
 	}
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
 	@Override
 	public int hashCode() {
 		return name.hashCode();
 	}
-	
+
+	/*
+	 * (non-Javadoc)
+	 * 
+	 * @see java.lang.Object#toString()
+	 */
 	@Override
 	public String toString() {
