Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Connector.java =================================================================== --- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Connector.java (revision 3590) +++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Connector.java (revision 3591) @@ -69,6 +69,6 @@ /** - * Initializes this connector. This method will be called at the - * {@link ConnectorServlet#init() init} of the connector servlet. + * Initializes this connector. Called at {@link Dispatcher dispatcher} + * initialization. * * @param servletContext @@ -76,6 +76,6 @@ * executing * @throws Exception - * if an exception occurs that interrupts the connector's - * normal operation + * if an exception occurs that interrupts the connector's normal + * operation */ public void init(final ServletContext servletContext) throws Exception; Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Dispatcher.java =================================================================== --- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Dispatcher.java (revision 3590) +++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/Dispatcher.java (revision 3591) @@ -72,6 +72,7 @@ /** * Initializes this dispatcher. It initializes the connector internally. - * - * @see ConnectorServlet#init() + * Called at connector servlet {@link ConnectorServlet#init() + * initialization}. + * * @param servletContext * reference to the {@link ServletContext} in which the caller is Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java =================================================================== --- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java (revision 3590) +++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/AbstractLocalFileSystemConnector.java (revision 3591) @@ -50,10 +50,12 @@ /** - * This class provides an abstract implementation of the {@link Connector} - * interface with the default behavior according to the documentation. It serves files and folders against a - * specific local directory. You cannot use this class directly, instead you - * have to subclass it and implement the interface/abstract methods. There are - * two ready to go subclasses, see above. + * Abstract local filesystem backend connector. This class is the default + * implementation of the official connector specification. + *
+ * It serves files and folders against a specific local directory which is + * resolved in a subclass. You cannot use this class directly, instead you have + * to subclass it and implement the abstract methods and override methods if + * necessary. * * @version $Id$ @@ -141,27 +143,28 @@ /** - * This method shall resolve the - * {@link UserPathBuilder#getUserFilesAbsolutePath(javax.servlet.http.HttpServletRequest) - * UserFilesAbsolutePath} against a specific system. E.g., local filesystem - * or context filesystem. It's up to you what it returns but make sure that - * it's consistent inside the entire cycle. + * Resolves a provided userfiles absolute path against a specific backend. + * The is no restriction how to resolve the path. To keep it simple, you may + * use + * {@link UserPathBuilder#getUserFilesAbsolutePath(javax.servlet.http.HttpServletRequest) UserPathBuilder.getUserFilesAbsolutePath}. + * The return value has to be consistent within the entire request cycle. * - * @param path - * The path to resolve. - * @return The resolved path. + * @param userFilesAbsolutePath + * the userfiles absolute path to resolve against a specific + * backend + * @return the resolved userfiles absolute path */ - protected abstract String getRealUserFilesAbsolutePath(String path); + protected abstract String getRealUserFilesAbsolutePath(String userFilesAbsolutePath); /** - * This method simply checks if the the resource type dir exists and creates - * it if necessary. + * Returns a file reference to a created resource type directory. The + * directory will be created only if it does not exist. * * @param baseDir - * BaseDir for the resource type. + * the current resource type's base directory * @param type - * Resource type to mkdir. - * @return The file object of the resource type. + * the current resource type + * @return a file reference the resource type directory */ - private static File getOrCreateResourceTypeDir(final String baseDir, + protected static File getOrCreateResourceTypeDir(final String baseDir, final ResourceType type) { File dir = new File(baseDir, type.getPath()); Index: /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/ContextConnector.java =================================================================== --- /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/ContextConnector.java (revision 3590) +++ /FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/connector/impl/ContextConnector.java (revision 3591) @@ -30,13 +30,15 @@ /** - * This implementation represents a specific restriction against the local - * filesystem. It resolves any path against the current servlet context. + * Context filesystem backend connector. The file access will be restricted to + * the real context root of the currently deployed webapp. *
* Though, this connector has some drawbacks: *
f(x)=x
.
+ * Real local filesystem backend connector. The file access is translated as-is
+ * to the local filesystem.
* - * This maybe interesting for those who + * This maybe interesting for those who serve userfiles *
http://userfiles.mydomain.com
, or/home/$USERNAME/public_html/fckeditor
and an Apache HTTPd serves
* as /~$USERNAME/fckeditor
.