net.kindeditor.generator.PathGenerator Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of filemanager Show documentation
Show all versions of filemanager Show documentation
KindEditor(http://kindeditor.org/) is a lightweight, Open Source(LGPL), cross browser, web based WYSIWYG HTML editor.
kind-file-manager is the upload manager and file manager for kindeditor,
it use Servlet 3.0 technology, and can be deployed as a single web fragment jar.
The newest version!
package net.kindeditor.generator;
import javax.servlet.http.HttpServletRequest;
/**
* Interface to generate file path when a file is uploaded to server.
* The default PathGenerator implemetation is {@link DateBasedPathGenerator}.
* Other implementation should be set in kindmanager.properties.
* @author luyanfei
*
*/
public interface PathGenerator {
/**
*
* @param request
* HttpServletRequest object for dynamic information.
* @param originalName
* this will be local file name in file system before upload in most cases.
* @return
* relative path denote the path generated in server.
* Caution: returned string should not begin with "/".
*/
public String generate(HttpServletRequest request, String originalName);
}