Changeset 2151
- Timestamp:
- 2008-07-03 00:03:15 (6 months ago)
- Location:
- FCKeditor.Java/trunk
- Files:
-
- 13 added
- 31 modified
-
java-core/src/main/javadoc/net/fckeditor/connector/package.html (modified) (1 diff)
-
java-core/src/main/javadoc/net/fckeditor/package.html (modified) (3 diffs)
-
java-core/src/main/javadoc/net/fckeditor/requestcycle (added)
-
java-core/src/main/javadoc/net/fckeditor/requestcycle/impl (added)
-
java-core/src/main/javadoc/net/fckeditor/requestcycle/impl/package.html (added)
-
java-core/src/main/javadoc/net/fckeditor/requestcycle/package.html (added)
-
java-core/src/main/javadoc/net/fckeditor/response (added)
-
java-core/src/main/javadoc/net/fckeditor/response/package.html (added)
-
java-core/src/main/javadoc/net/fckeditor/tags/package.html (modified) (2 diffs)
-
java-core/src/main/javadoc/net/fckeditor/tool (added)
-
java-core/src/main/javadoc/net/fckeditor/tool/package.html (added)
-
java-core/src/main/javadoc/org (added)
-
java-core/src/main/javadoc/org/devlib (added)
-
java-core/src/main/javadoc/org/devlib/schmidt (added)
-
java-core/src/main/javadoc/org/devlib/schmidt/imageinfo (added)
-
java-core/src/main/javadoc/org/devlib/schmidt/imageinfo/package.html (added)
-
java-core/src/main/java/net/fckeditor/FCKeditorConfig.java (modified) (2 diffs)
-
java-core/src/main/java/net/fckeditor/FCKeditor.java (modified) (7 diffs)
-
java-core/src/main/java/net/fckeditor/handlers/CommandHandler.java (modified) (2 diffs)
-
java-core/src/main/java/net/fckeditor/handlers/RequestCycleHandler.java (modified) (1 diff)
-
java-core/src/main/java/net/fckeditor/handlers/ResourceTypeHandler.java (modified) (3 diffs)
-
java-core/src/main/java/net/fckeditor/requestcycle/impl/UserActionImpl.java (modified) (1 diff)
-
java-core/src/main/java/net/fckeditor/requestcycle/UserAction.java (modified) (1 diff)
-
java-core/src/main/java/net/fckeditor/requestcycle/UserPathBuilder.java (modified) (1 diff)
-
java-core/src/main/java/net/fckeditor/response/UploadResponse.java (modified) (2 diffs)
-
java-core/src/main/java/net/fckeditor/response/XmlResponse.java (modified) (8 diffs)
-
java-core/src/main/java/net/fckeditor/tags/CheckTag.java (modified) (3 diffs)
-
java-core/src/main/java/net/fckeditor/tags/ConfigTag.java (modified) (3 diffs)
-
java-core/src/main/java/net/fckeditor/tags/EditorTag.java (modified) (3 diffs)
-
java-core/src/main/java/net/fckeditor/tool/UtilsFile.java (modified) (6 diffs)
-
java-core/src/main/java/net/fckeditor/tool/Utils.java (modified) (2 diffs)
-
java-core/src/main/java/net/fckeditor/tool/UtilsResponse.java (modified) (2 diffs)
-
java-core/src/main/java/net/fckeditor/tool/XHtmlTagTool.java (modified) (2 diffs)
-
java-core/src/test/java/net/fckeditor/tool/UtilsTest.java (modified) (3 diffs)
-
src/site/apt/connector.apt (modified) (7 diffs)
-
src/site/apt/demo.apt (modified) (1 diff)
-
src/site/apt/index.apt (modified) (1 diff)
-
src/site/apt/installation.apt (modified) (7 diffs)
-
src/site/apt/overview.apt (modified) (1 diff)
-
src/site/apt/properties.apt (modified) (4 diffs)
-
src/site/apt/taglibrary.apt (modified) (2 diffs)
-
src/site/apt/velocity_freemarker.apt (modified) (2 diffs)
-
src/site/apt/whatsnew.apt (modified) (2 diffs)
-
src/site/site.xml (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor.Java/trunk/java-core/src/main/javadoc/net/fckeditor/connector/package.html
r1881 r2151 27 27 Connector used by the FCKeditor to list and create resources on the server. 28 28 29 <h2>Package Specification</h2>30 31 This servlet is access directly from the file browser in the FCKeditor.<br>32 To make everything work correctly you have to add the following piece of code in your application's web.xml33 <br>34 <pre>35 <servlet>36 <servlet-name>Connector</servlet-name>37 <servlet-class>net.fckeditor.connector.ConnectorServlet</servlet-class>38 <init-param>39 <param-name>baseDir</param-name>40 <param-value>/UserFiles/</param-value>41 </init-param>42 <init-param>43 <param-name>debug</param-name>44 <param-value>false</param-value>45 </init-param>46 <load-on-startup>1</load-on-startup>47 </servlet>48 49 <servlet-mapping>50 <servlet-name>Connector</servlet-name>51 <url-pattern>/editor/filemanager/browser/default/connectors/jsp/connector</url-pattern>52 </servlet-mapping>53 </pre>54 <br>55 And put in the fckconfig.js the following line:56 <pre>57 FCKConfig.LinkBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Connector=connectors/jsp/connector" ;58 FCKConfig.ImageBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Image&Connector=connectors/jsp/connector" ;59 FCKConfig.FlashBrowserURL = FCKConfig.BasePath + "filemanager/browser/default/browser.html?Type=Flash&Connector=connectors/jsp/connector" ;60 </pre>61 Also, since the servlet manage a file upload using the Jakarta Common fileupload library, you need to put in your <code>WEB-INF/lib/</code> the <code>commons-fileupload.jar</code>.62 29 <h2>Related Documentation</h2> 63 30 64 31 For overviews, tutorials, examples, guides, and tool documentation, please see: 65 32 <ul> 66 <li>_sample/jsp directory for example of how to implement FCKeditor in your application 33 <li>The official FCKeditor.Java integration <a href="http://java.fckeditor.net">website</a>. 34 <li>The example web application. 67 35 </ul> 68 36 -
FCKeditor.Java/trunk/java-core/src/main/javadoc/net/fckeditor/package.html
r1881 r2151 19 19 * == END LICENSE == 20 20 --> 21 22 21 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 23 22 <html> … … 27 26 28 27 Core objects to manage the FCKeditor text input form. 29 Java Integration Module 2.4.30 28 31 29 <h2>Related Documentation</h2> … … 33 31 For overviews, tutorials, examples, guides, and tool documentation, please see: 34 32 <ul> 35 <li><a href="http:// www.fckeditor.net/">Official web site of FCKeditor</a>33 <li><a href="http://docs.fckeditor.net/">Official documenation of the FCKeditor</a>. 36 34 </ul> 37 35 -
FCKeditor.Java/trunk/java-core/src/main/javadoc/net/fckeditor/tags/package.html
r1881 r2151 25 25 <body bgcolor="white"> 26 26 27 JSP Tag to access and modify the FCKeditor objects. 28 29 30 <h2>Package Specification</h2> 31 32 This taglibrary is compliant to the taglib 1.1 specification.<br> 33 To use it put the FCKeditor.jar inside the <code>WEB-INF/lib</code> dir and FCKeditor.tld inside the <code>WEB-INF</code> directory of your website.<br> 34 Put the following declaration in each page that use the tags:<br> 35 <pre> 36 <%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %> 37 </pre> 27 JSP tags to access and modify the FCKeditor object. 38 28 39 29 <h2>Related Documentation</h2> … … 41 31 For overviews, tutorials, examples, guides, and tool documentation, please see: 42 32 <ul> 43 <li>_sample/jsp directory for example of how to implement FCKeditor in your application 33 <li>The official FCKeditor.Java integration <a href="http://java.fckeditor.net">website</a>. 34 <li>The example web application. 44 35 </ul> 45 36 -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/FCKeditorConfig.java
r2101 r2151 33 33 34 34 /** 35 * Contains the configuration settings for the FCK Editor.<br>35 * Contains the configuration settings for the FCKeditor.<br /> 36 36 * By adding elements to this collection you can override the settings specified 37 37 * in the config.js file. … … 47 47 * Initialize the configuration collection 48 48 */ 49 public FCKeditorConfig( ) {49 public FCKeditorConfig( ) { 50 50 super(); 51 51 } -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/FCKeditor.java
r2146 r2151 30 30 31 31 /** 32 * FCKeditor class.<br />33 * It creates the html code forthe FCKeditor based on the following things:32 * Java represantation of the FCKeditor. This class creates the html code for 33 * the FCKeditor based on the following things: 34 34 * <ul> 35 35 * <li>browser capabilities</li> … … 107 107 * Set the unique name of the editor 108 108 * 109 * @param value109 * @param instanceName 110 110 * name 111 111 */ 112 public void setInstanceName(final String value) {113 instanceName = value;112 public void setInstanceName(final String instanceName) { 113 this.instanceName = instanceName; 114 114 } 115 115 … … 129 129 * path from the context (e.g. /fckeditor). 130 130 * 131 * @param value131 * @param basePath 132 132 * path 133 133 */ 134 public void setBasePath(final String value) {135 basePath = value;134 public void setBasePath(final String basePath) { 135 this.basePath = basePath; 136 136 } 137 137 … … 139 139 * Set the name of the toolbar to display 140 140 * 141 * @param value141 * @param toolbarSet 142 142 * toolbar name 143 143 */ 144 public void setToolbarSet(final String value) {145 t oolbarSet = value;144 public void setToolbarSet(final String toolbarSet) { 145 this.toolbarSet = toolbarSet; 146 146 } 147 147 … … 149 149 * Set the width of the textarea 150 150 * 151 * @param value151 * @param width 152 152 * width 153 153 */ 154 public void setWidth(final String value) {155 width = value;154 public void setWidth(final String width) { 155 this.width = width; 156 156 } 157 157 … … 159 159 * Set the height of the textarea 160 160 * 161 * @param value161 * @param height 162 162 * height 163 163 */ 164 public void setHeight(final String value) {165 height = value;164 public void setHeight(final String height) { 165 this.height = height; 166 166 } 167 167 … … 176 176 return config; 177 177 } 178 179 /** 180 * Set the advanced configuration set. 181 * 182 * @param value 178 /** 179 * Set the advanced configuation set. 180 * 181 * @param config 183 182 * configuration collection 184 183 */ 185 public void setConfig(FCKeditorConfig value) {186 config = value;184 public void setConfig(FCKeditorConfig config) { 185 this.config = config; 187 186 } 188 187 189 188 /** 190 189 * Escape base XML entities as specified <a 191 * href="http://en.wikipedia.org/wiki/Xml#Entity_references">here</a> 192 * 193 * @param txt190 * href="http://en.wikipedia.org/wiki/Xml#Entity_references">here</a>. 191 * 192 * @param str 194 193 * Text to escape. 195 194 * @return Escaped text. 196 195 */ 197 private String escapeXml(String txt) { 198 if (Utils.isEmpty(txt)) 199 return txt; 200 txt = txt.replaceAll("&", "&"); 201 txt = txt.replaceAll("<", "<"); 202 txt = txt.replaceAll(">", ">"); 203 txt = txt.replaceAll("\"", """); 204 txt = txt.replaceAll("'", "'"); 205 return txt; 206 } 207 208 /* 209 * (non-Javadoc) 210 * @see #createHtml() 211 */ 212 public String create() { 213 return createHtml(); 196 private String escapeXml(String str) { 197 if (Utils.isEmpty(str)) 198 return str; 199 200 /* 201 * TODO Strings are inefficent. It should be done like in Commons Lang 202 * 2.4 StringUtils#replaceEach(String, String[], String[]) 203 */ 204 str = str.replaceAll("&", "&"); 205 str = str.replaceAll("<", "<"); 206 str = str.replaceAll(">", ">"); 207 str = str.replaceAll("\"", """); 208 str = str.replaceAll("'", "'"); 209 return str; 214 210 } 215 211 216 212 /* 217 213 * (non-Javadoc) 214 * 215 * @see #createHtml() 216 */ 217 /** 218 * This method simply wraps to {@link #createHtml()}. 218 219 * @see #createHtml() 219 220 */ -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/CommandHandler.java
r2101 r2151 23 23 import java.util.HashMap; 24 24 import java.util.Map; 25 26 import net.fckeditor.tool.Utils; 25 27 26 28 /** … … 74 76 * the string argument. 75 77 * @throws IllegalArgumentException 76 * If 'name' is <code>null</code> or does not exist.78 * If 'name' is <code>null</code>, empty, or does not exist. 77 79 */ 78 80 public static CommandHandler valueOf(final String name) throws IllegalArgumentException { 79 if ( name == null)81 if (Utils.isEmpty(name)) 80 82 throw new IllegalArgumentException(); 81 83 -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/RequestCycleHandler.java
r2101 r2151 51 51 Class<?> clazz = Class.forName(fqcn); 52 52 userAction = (UserAction) clazz.newInstance(); 53 logger.info("UserAction objectsuccessfully instantiated!");53 logger.info("UserAction implementation successfully instantiated!"); 54 54 } catch (Exception e) { 55 55 logger.error("Couldn't instantiate class [".concat(fqcn).concat( -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/ResourceTypeHandler.java
r2101 r2151 23 23 import java.util.HashMap; 24 24 import java.util.Map; 25 26 import net.fckeditor.tool.Utils; 25 27 26 28 /** … … 85 87 * represented by the string argument. 86 88 * @throws IllegalArgumentException 87 * If 'name' is null can't be parsed.89 * If 'name' is <code>null</code>, empty, or does not exist. 88 90 */ 89 91 public static ResourceTypeHandler valueOf(final String name) throws IllegalArgumentException { 90 if ( name == null)92 if (Utils.isEmpty(name)) 91 93 throw new IllegalArgumentException(); 92 94 … … 110 112 } 111 113 114 /** 115 * Tries to determine ResourceType from string and return {@link #FILE} if 116 * provided string is invalid. 117 * 118 * @param name 119 * @return resource type 120 */ 112 121 public static ResourceTypeHandler getDefaultResourceType(final String name) { 113 122 ResourceTypeHandler rt = getResourceType(name); -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/impl/UserActionImpl.java
r1906 r2151 26 26 27 27 /** 28 * Standard implementation for {@link UserAction}. 29 * 28 * Standard implementation for {@link UserAction}. It always returns 29 * <code>true</code>. 30 * 30 31 * @version $Id$ 31 32 */ -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/UserAction.java
r2101 r2151 25 25 26 26 /** 27 * Interface that provides the authorization of the following file based user28 * actions:27 * An interface which provides the authorization of server-side commands.<br /> 28 * The commands are: 29 29 * <ul> 30 30 * <li>{@link #isEnabledForFileBrowsing(HttpServletRequest)}: Enables the user -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/UserPathBuilder.java
r2101 r2151 26 26 27 27 /** 28 * Interface to providea way to build a user-dependent28 * An interface which provides a way to build a user-dependent 29 29 * <code>UserFilesPath</code>. 30 30 * -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/response/UploadResponse.java
r2116 r2151 25 25 26 26 /** 27 * Simply abstracts from the javascript callback to a java class.27 * Simply abstracts from the JavaScript callback to a Java object. 28 28 * 29 29 * <p> … … 108 108 109 109 /** 110 * Sets the message in the UploadResponse.110 * Sets the message in the <code>UploadResponse</code>. 111 111 * 112 112 * Methods automatically determines how many arguments are set and puts the -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/response/XmlResponse.java
r1699 r2151 44 44 45 45 /** 46 * static error objects won't probably provided due to performance reasons of47 * Document instance creation48 * 49 * TODO document me!50 * @ author mosipov51 * 46 * Creates an XML response for every <code>GET</code> request of the Connector 47 * servlet. This class maps directly to the XML layout descibed <a 48 * href="http://docs.fckeditor.net/FCKeditor_2.x/Developers_Guide/Server_Side_Integration#The_Commands">here</a>. 49 * 50 * @version $Id$ 51 * 52 52 */ 53 53 public class XmlResponse { … … 77 77 78 78 /** 79 * Use this contructor if want to respond a positive message. 79 80 * 80 81 * @param command … … 109 110 110 111 /** 111 * TODO document me! 112 * 113 * Use this contructor if want to respond a negative/error message with 114 * custom text. 115 * 112 116 * @param number 113 117 * @param text … … 128 132 } 129 133 130 /*** 131 * TODO document me! 134 /** 135 * Use this contructor if want to respond a negative/error message only. 136 * 132 137 * @param number 133 138 */ … … 136 141 } 137 142 143 /** 144 * Sets an error number with a custom message. 145 * 146 * @param number 147 * @param text 148 */ 138 149 public void setError(int number, String text) { 139 150 … … 149 160 } 150 161 162 /** 163 * Sets an error number. 164 * 165 * @param number 166 */ 151 167 public void setError(int number) { 152 168 setError(number, null); 153 169 } 154 170 171 /** 172 * Lists all folders in the given dir as XML tags. 173 * @param dir 174 */ 155 175 public void setFolders(File dir) { 156 176 … … 171 191 } 172 192 193 /** 194 * Lists all files in the given dir as XML tags. 195 * 196 * @param dir 197 */ 173 198 public void setFiles(File dir) { 174 199 … … 195 220 } 196 221 222 /** 223 * Lists all folders and files in the given dir as XML tags. 224 * 225 * @param dir 226 */ 197 227 public void setFoldersAndFiles(File dir) { 198 228 setFolders(dir); -
FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tags/CheckTag.java
r2101 r2151 36 36 37 37 /** 38 * CheckTag.java - TODO DOCUMENTME! 39 * 38 * This tag displays information about browser and user capabilities. There are 39 * tree available commands (CompatibleBrowser, FileBrowsing, FileUpload) which 40 * respond an English message.<br /> 41 * <strong>Hint</strong>: The message string cannot be localized at the moment. 42 * 40 43 * @version $Id$