Changeset 2151 for FCKeditor.Java/trunk

Show
Ignore:
Timestamp:
2008-07-03 00:03:15 (5 months ago)
Author:
mosipov
Message:

JavaDoc issues

Location:
FCKeditor.Java/trunk
Files:
13 added
31 modified

Legend:

Unmodified
Added
Removed
  • FCKeditor.Java/trunk/java-core/src/main/javadoc/net/fckeditor/connector/package.html

    r1881 r2151  
    2727Connector used by the FCKeditor to list and create resources on the server. 
    2828 
    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.xml 
    33 <br> 
    34 <pre> 
    35         &lt;servlet&gt; 
    36                 &lt;servlet-name&gt;Connector&lt;/servlet-name&gt; 
    37                 &lt;servlet-class&gt;net.fckeditor.connector.ConnectorServlet&lt;/servlet-class&gt; 
    38                 &lt;init-param&gt; 
    39                         &lt;param-name&gt;baseDir&lt;/param-name&gt; 
    40                         &lt;param-value&gt;/UserFiles/&lt;/param-value&gt; 
    41                 &lt;/init-param&gt; 
    42                 &lt;init-param&gt; 
    43                         &lt;param-name&gt;debug&lt;/param-name&gt; 
    44                         &lt;param-value&gt;false&lt;/param-value&gt; 
    45                 &lt;/init-param&gt; 
    46                 &lt;load-on-startup&gt;1&lt;/load-on-startup&gt; 
    47         &lt;/servlet&gt; 
    48  
    49         &lt;servlet-mapping&gt; 
    50                 &lt;servlet-name&gt;Connector&lt;/servlet-name&gt; 
    51                 &lt;url-pattern&gt;/editor/filemanager/browser/default/connectors/jsp/connector&lt;/url-pattern&gt; 
    52         &lt;/servlet-mapping&gt; 
    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>. 
    6229<h2>Related Documentation</h2> 
    6330 
    6431For overviews, tutorials, examples, guides, and tool documentation, please see: 
    6532<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.  
    6735</ul> 
    6836 
  • FCKeditor.Java/trunk/java-core/src/main/javadoc/net/fckeditor/package.html

    r1881 r2151  
    1919 * == END LICENSE == 
    2020--> 
    21  
    2221<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"> 
    2322<html> 
     
    2726 
    2827Core objects to manage the FCKeditor text input form. 
    29 Java Integration Module 2.4. 
    3028 
    3129<h2>Related Documentation</h2> 
     
    3331For overviews, tutorials, examples, guides, and tool documentation, please see: 
    3432<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>. 
    3634</ul> 
    3735 
  • FCKeditor.Java/trunk/java-core/src/main/javadoc/net/fckeditor/tags/package.html

    r1881 r2151  
    2525<body bgcolor="white"> 
    2626 
    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 &lt;%@ taglib uri="http://fckeditor.net/tags-fckeditor" prefix="FCK" %&gt; 
    37 </pre> 
     27JSP tags to access and modify the FCKeditor object. 
    3828 
    3929<h2>Related Documentation</h2> 
     
    4131For overviews, tutorials, examples, guides, and tool documentation, please see: 
    4232<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.  
    4435</ul> 
    4536 
  • FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/FCKeditorConfig.java

    r2101 r2151  
    3333 
    3434/** 
    35  * Contains the configuration settings for the FCKEditor.<br> 
     35 * Contains the configuration settings for the FCKeditor.<br /> 
    3636 * By adding elements to this collection you can override the settings specified 
    3737 * in the config.js file. 
     
    4747         * Initialize the configuration collection 
    4848         */ 
    49         public FCKeditorConfig() { 
     49        public FCKeditorConfig( ) { 
    5050                super(); 
    5151        } 
  • FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/FCKeditor.java

    r2146 r2151  
    3030 
    3131/** 
    32  * FCKeditor class.<br /> 
    33  * It creates the html code for the 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: 
    3434 * <ul> 
    3535 * <li>browser capabilities</li> 
     
    107107         * Set the unique name of the editor 
    108108         *  
    109          * @param value 
     109         * @param instanceName 
    110110         *            name 
    111111         */ 
    112         public void setInstanceName(final String value) { 
    113                 instanceName = value; 
     112        public void setInstanceName(final String instanceName) { 
     113                this.instanceName = instanceName; 
    114114        } 
    115115 
     
    129129         * path from the context (e.g. /fckeditor). 
    130130         *  
    131          * @param value 
     131         * @param basePath 
    132132         *            path 
    133133         */ 
    134         public void setBasePath(final String value) { 
    135                 basePath = value; 
     134        public void setBasePath(final String basePath) { 
     135                this.basePath = basePath; 
    136136        } 
    137137 
     
    139139         * Set the name of the toolbar to display 
    140140         *  
    141          * @param value 
     141         * @param toolbarSet 
    142142         *            toolbar name 
    143143         */ 
    144         public void setToolbarSet(final String value) { 
    145                 toolbarSet = value; 
     144        public void setToolbarSet(final String toolbarSet) { 
     145                this.toolbarSet = toolbarSet; 
    146146        } 
    147147 
     
    149149         * Set the width of the textarea 
    150150         *  
    151          * @param value 
     151         * @param width 
    152152         *            width 
    153153         */ 
    154         public void setWidth(final String value) { 
    155                 width = value; 
     154        public void setWidth(final String width) { 
     155                this.width = width; 
    156156        } 
    157157 
     
    159159         * Set the height of the textarea 
    160160         *  
    161          * @param value 
     161         * @param height 
    162162         *            height 
    163163         */ 
    164         public void setHeight(final String value) { 
    165                 height = value; 
     164        public void setHeight(final String height) { 
     165                this.height = height; 
    166166        } 
    167167 
     
    176176                return config; 
    177177        } 
    178  
    179         /** 
    180          * Set the advanced configuration set. 
    181          *  
    182          * @param value 
     178        /** 
     179         * Set the advanced configuation set. 
     180         *  
     181         * @param config 
    183182         *            configuration collection 
    184183         */ 
    185         public void setConfig(FCKeditorConfig value) { 
    186                 config = value; 
     184        public void setConfig(FCKeditorConfig config) { 
     185                this.config = config; 
    187186        } 
    188187 
    189188        /** 
    190189         * Escape base XML entities as specified <a 
    191          * href="http://en.wikipedia.org/wiki/Xml#Entity_references">here</a> 
    192          *  
    193          * @param txt 
     190         * href="http://en.wikipedia.org/wiki/Xml#Entity_references">here</a>. 
     191         *  
     192         * @param str 
    194193         *            Text to escape. 
    195194         * @return Escaped text. 
    196195         */ 
    197         private String escapeXml(String txt) { 
    198                 if (Utils.isEmpty(txt)) 
    199                         return txt; 
    200                 txt = txt.replaceAll("&", "&#38;"); 
    201                 txt = txt.replaceAll("<", "&#60;"); 
    202                 txt = txt.replaceAll(">", "&#62;"); 
    203                 txt = txt.replaceAll("\"", "&#34;"); 
    204                 txt = txt.replaceAll("'", "&#39;"); 
    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("&", "&#38;"); 
     205                str = str.replaceAll("<", "&#60;"); 
     206                str = str.replaceAll(">", "&#62;"); 
     207                str = str.replaceAll("\"", "&#34;"); 
     208                str = str.replaceAll("'", "&#39;"); 
     209                return str; 
    214210        } 
    215211         
    216212        /* 
    217213         * (non-Javadoc) 
     214         *  
     215         * @see #createHtml() 
     216         */ 
     217        /** 
     218         * This method simply wraps to {@link #createHtml()}. 
    218219         * @see #createHtml() 
    219220         */ 
  • FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/CommandHandler.java

    r2101 r2151  
    2323import java.util.HashMap; 
    2424import java.util.Map; 
     25 
     26import net.fckeditor.tool.Utils; 
    2527 
    2628/** 
     
    7476         *         the string argument. 
    7577         * @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. 
    7779         */ 
    7880        public static CommandHandler valueOf(final String name) throws IllegalArgumentException { 
    79                 if (name == null) 
     81                if (Utils.isEmpty(name)) 
    8082                        throw new IllegalArgumentException(); 
    8183 
  • FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/RequestCycleHandler.java

    r2101 r2151  
    5151                                Class<?> clazz = Class.forName(fqcn); 
    5252                                userAction = (UserAction) clazz.newInstance(); 
    53                                 logger.info("UserAction object successfully instantiated!"); 
     53                                logger.info("UserAction implementation successfully instantiated!"); 
    5454                        } catch (Exception e) { 
    5555                                logger.error("Couldn't instantiate class [".concat(fqcn).concat( 
  • FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/handlers/ResourceTypeHandler.java

    r2101 r2151  
    2323import java.util.HashMap; 
    2424import java.util.Map; 
     25 
     26import net.fckeditor.tool.Utils; 
    2527 
    2628/** 
     
    8587         *         represented by the string argument. 
    8688         * @throws IllegalArgumentException 
    87          *             If 'name' is null can't be parsed. 
     89         *            If 'name' is <code>null</code>, empty, or does not exist. 
    8890         */ 
    8991        public static ResourceTypeHandler valueOf(final String name) throws IllegalArgumentException { 
    90                 if (name == null) 
     92                if (Utils.isEmpty(name)) 
    9193                        throw new IllegalArgumentException(); 
    9294 
     
    110112        } 
    111113 
     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         */ 
    112121        public static ResourceTypeHandler getDefaultResourceType(final String name) { 
    113122                ResourceTypeHandler rt = getResourceType(name); 
  • FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/impl/UserActionImpl.java

    r1906 r2151  
    2626 
    2727/** 
    28  * Standard implementation for {@link UserAction}. 
    29  * 
     28 * Standard implementation for {@link UserAction}. It always returns 
     29 * <code>true</code>. 
     30 *  
    3031 * @version $Id$ 
    3132 */ 
  • FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/UserAction.java

    r2101 r2151  
    2525 
    2626/** 
    27  * Interface that provides the authorization of the following file based user 
    28  * actions: 
     27 * An interface which provides the authorization of server-side commands.<br /> 
     28 * The commands are: 
    2929 * <ul> 
    3030 * <li>{@link #isEnabledForFileBrowsing(HttpServletRequest)}: Enables the user 
  • FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/requestcycle/UserPathBuilder.java

    r2101 r2151  
    2626 
    2727/** 
    28  * Interface to provide a way to build a user-dependent 
     28 * An interface which provides a way to build a user-dependent 
    2929 * <code>UserFilesPath</code>. 
    3030 *  
  • FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/response/UploadResponse.java

    r2116 r2151  
    2525 
    2626/** 
    27  * Simply abstracts from the javascript callback to a java class. 
     27 * Simply abstracts from the JavaScript callback to a Java object. 
    2828 *  
    2929 * <p> 
     
    108108 
    109109        /** 
    110          * Sets the message in the UploadResponse. 
     110         * Sets the message in the <code>UploadResponse</code>. 
    111111         *  
    112112         * 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  
    4444 
    4545/** 
    46  * static error objects won't probably provided due to performance reasons of  
    47  * Document instance creation 
    48  *  
    49  * TODO document me! 
    50  * @author mosipov 
    51  * 
     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 *  
    5252 */ 
    5353public class XmlResponse { 
     
    7777 
    7878        /** 
     79         * Use this contructor if want to respond a positive message. 
    7980         *  
    8081         * @param command 
     
    109110         
    110111        /** 
    111          * TODO document me! 
     112         *  
     113         * Use this contructor if want to respond a negative/error message with 
     114         * custom text. 
     115         *  
    112116         * @param number 
    113117         * @param text 
     
    128132        } 
    129133         
    130         /*** 
    131          * TODO document me! 
     134        /** 
     135         * Use this contructor if want to respond a negative/error message only. 
     136         *  
    132137         * @param number 
    133138         */ 
     
    136141        } 
    137142 
     143        /** 
     144         * Sets an error number with a custom message. 
     145         *  
     146         * @param number 
     147         * @param text 
     148         */ 
    138149        public void setError(int number, String text) { 
    139150 
     
    149160        } 
    150161 
     162        /** 
     163         * Sets an error number. 
     164         *  
     165         * @param number 
     166         */ 
    151167        public void setError(int number) { 
    152168                setError(number, null); 
    153169        } 
    154170 
     171        /** 
     172         * Lists all folders in the given dir as XML tags. 
     173         * @param dir 
     174         */ 
    155175        public void setFolders(File dir) { 
    156176 
     
    171191        } 
    172192         
     193        /** 
     194         * Lists all files in the given dir as XML tags. 
     195         *  
     196         * @param dir 
     197         */ 
    173198        public void setFiles(File dir) { 
    174199                 
     
    195220        } 
    196221         
     222        /** 
     223         * Lists all folders and files in the given dir as XML tags. 
     224         *  
     225         * @param dir 
     226         */      
    197227        public void setFoldersAndFiles(File dir) { 
    198228                setFolders(dir); 
  • FCKeditor.Java/trunk/java-core/src/main/java/net/fckeditor/tags/CheckTag.java

    r2101 r2151  
    3636 
    3737/** 
    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