View Javadoc

1   /*
2    * FCKeditor - The text editor for Internet - http://www.fckeditor.net
3    * Copyright (C) 2003-2008 Frederico Caldeira Knabben
4    * 
5    * == BEGIN LICENSE ==
6    * 
7    * Licensed under the terms of any of the following licenses at your
8    * choice:
9    * 
10   *  - GNU General Public License Version 2 or later (the "GPL")
11   *    http://www.gnu.org/licenses/gpl.html
12   * 
13   *  - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
14   *    http://www.gnu.org/licenses/lgpl.html
15   * 
16   *  - Mozilla Public License Version 1.1 or later (the "MPL")
17   *    http://www.mozilla.org/MPL/MPL-1.1.html
18   * 
19   * == END LICENSE ==
20   */
21  package net.fckeditor.requestcycle;
22  
23  import javax.servlet.http.HttpServletRequest;
24  
25  import net.fckeditor.handlers.ConnectorHandler;
26  
27  /**
28   * Interface to provide a way to build a user dependent 'BaseDir.
29   *
30   * @version $Id: UserPathBuilder.java 1906 2008-04-10 16:37:42Z th-schwarz $
31   */
32  public interface UserPathBuilder {
33  
34  	/**
35  	 * Getter for the user dependent 'BaseDir'.<br>
36  	 * <b>Important:</b>
37  	 * <ul>
38  	 * <li> If the implementation returns <code>null</code>, {@link ConnectorHandler} will used
39  	 * the default one! That's useful, if the implementation doesn't bother you.</li>
40  	 * <li>The returned directory string has to start with '/', but has to end without '/'.</li>
41  	 * <li>The dir has to be within the context</li>
42  	 * </ul>
43  	 * 
44  	 * @param request
45  	 * @return <code>null</code> or the 'BaseDir' string for the current user.
46  	 */
47  	public String getUserFilesPath(final HttpServletRequest request);
48  }