You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jspwiki.apache.org by aj...@apache.org on 2009/10/08 03:13:07 UTC

svn commit: r822986 - /incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java

Author: ajaquith
Date: Thu Oct  8 01:13:07 2009
New Revision: 822986

URL: http://svn.apache.org/viewvc?rev=822986&view=rev
Log:
Plain editor and related bundle messages slightly refactored to make the JSP markup more concise and logical. Certain JavaScript hooks are broken; I'll need to work with Dirk to fix this.

Modified:
    incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java

Modified: incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java
URL: http://svn.apache.org/viewvc/incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java?rev=822986&r1=822985&r2=822986&view=diff
==============================================================================
--- incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java (original)
+++ incubator/jspwiki/trunk/src/java/org/apache/wiki/action/EditActionBean.java Thu Oct  8 01:13:07 2009
@@ -24,7 +24,9 @@
 import java.io.IOException;
 import java.net.URI;
 import java.security.Principal;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpSession;
@@ -76,15 +78,13 @@
 
     private boolean m_captcha = false;
 
-    private String m_conflictText = null;
+    private Map<String,Boolean> m_options = new HashMap<String,Boolean>();
 
-    private boolean m_remember = true;
+    private String m_conflictText = null;
 
     private String m_htmlPageText = null;
 
-    private boolean m_livePreview = false;
-
-    private String m_link = null;
+    private String m_email = null;
 
     private long m_startTime = -1;
 
@@ -232,7 +232,7 @@
     /*
      * Returns the changenote for this upload.
      */
-    public String getChangenote()
+    public String getChangeNote()
     {
         return m_changeNote;
     }
@@ -258,34 +258,23 @@
     }
 
     /**
-     * Returns the link.
-     * 
-     * @return the link
-     */
-    public String getLink()
-    {
-        return m_link;
-    }
-
-    /**
-     * Returns <code>true</code> if the "live preview" feature is turned on;
-     * <code>false</code> otherwise
+     * Returns the email.
      * 
-     * @return the "live preview" setting
+     * @return the email
      */
-    public boolean getLivePreview()
+    public String getEmail()
     {
-        return m_livePreview;
+        return m_email;
     }
 
     /**
-     * Returns the flag indicating whether the author name should be remembered.
-     * 
-     * @return the remember-me flag
+     * Returns the optional settings for the editor. Each setting name is a key in the map,
+     * with the vale expressed as a Boolean.
+     * @return the options map
      */
-    public boolean getRemember()
+    public Map<String,Boolean> getOptions()
     {
-        return m_remember;
+        return m_options;
     }
 
     /**
@@ -501,12 +490,12 @@
     /**
      * Sets the changenote for this upload; usually a short comment.
      * 
-     * @param changenote the change note
+     * @param changeNote the change note
      */
     @Validate( required = false )
-    public void setChangenote( String changenote )
+    public void setChangeNote( String changeNote )
     {
-        m_changeNote = changenote;
+        m_changeNote = changeNote;
     }
 
     /**
@@ -527,37 +516,24 @@
     }
 
     /**
-     * Sets the link.
+     * Sets the email.
      * 
-     * @param link the link
+     * @param email the email
      */
     @Validate( required = false )
-    public void setLink( String link )
+    public void setEmail( String email )
     {
-        m_link = link;
+        m_email = email;
     }
 
     /**
-     * Returns <code>true</code> if the "live preview" feature is turned on;
-     * <code>false</code> otherwise
-     * 
-     * @param livePreview the "live preview" setting
+     * Sets the optional settings for the editor. Each setting name is a key in the map,
+     * with the vale expressed as a Boolean. Common option names include:
+     * {@code remember}, {@code livePreview}, {@code tabCompletion}, and {@code smartPairs}.
      */
-    @Validate( required = false )
-    public void setLivePreview( boolean livePreview )
-    {
-        m_livePreview = livePreview;
-    }
-
-    /**
-     * Sets the flag indicating that the author name should be remembered.
-     * 
-     * @param remember the remember-me flag
-     */
-    @Validate( required = false )
-    public void setRemember( boolean remember )
+    public void setOptions( Map<String,Boolean> options )
     {
-        m_remember = remember;
+        m_options = options;
     }
 
     /**