You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@roller.apache.org by ag...@apache.org on 2006/06/15 00:17:05 UTC
svn commit: r414396 - in
/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity:
CommentAuthenticator.java DefaultCommentAuthenticator.java
MathCommentAuthenticator.java
Author: agilliland
Date: Wed Jun 14 15:17:04 2006
New Revision: 414396
URL: http://svn.apache.org/viewvc?rev=414396&view=rev
Log:
a little cleanup of the CommentAuthenticators. revisted CommentAuthenticator methods to only accept HttpServletRequest as a param, other parameters are not needed.
Modified:
incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/CommentAuthenticator.java
incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/DefaultCommentAuthenticator.java
incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/MathCommentAuthenticator.java
Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/CommentAuthenticator.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/CommentAuthenticator.java?rev=414396&r1=414395&r2=414396&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/CommentAuthenticator.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/CommentAuthenticator.java Wed Jun 14 15:17:04 2006
@@ -20,8 +20,8 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import org.apache.velocity.context.Context;
import org.apache.roller.pojos.CommentData;
+import org.apache.velocity.context.Context;
/**
@@ -32,29 +32,20 @@
/**
* Plugin should write out HTML for the form fields and other UI elements
- * needed inside the Roller comment form. Called when HTML form is being
- * displayed by Velocity template (see comments.vm).
+ * needed to display the comment authentication widget.
*
- * @param context Plugin can access objects in context of calling page.
- * @param request Plugin can access request parameters
- * @param response Plugin should write to response
+ * @param request comment form request object
*/
- public String getHtml(
- Context context,
- HttpServletRequest request,
- HttpServletResponse response);
+ public String getHtml(HttpServletRequest request);
/**
- * Plugin should return true only if comment passes authentication test.
- * Called when a comment is posted, not called when a comment is previewed.
+ * Plugin should return true only if comment posting passes the
+ * authentication test.
*
- * @param comment Comment data that was posted
- * @param request Plugin can access request parameters
- * @return True if comment passes authentication test
+ * @param request comment posting request object
+ * @return true if authentication passed, false otherwise
*/
- public boolean authenticate(
- CommentData comment,
- HttpServletRequest request);
+ public boolean authenticate(HttpServletRequest request);
}
Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/DefaultCommentAuthenticator.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/DefaultCommentAuthenticator.java?rev=414396&r1=414395&r2=414396&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/DefaultCommentAuthenticator.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/DefaultCommentAuthenticator.java Wed Jun 14 15:17:04 2006
@@ -30,17 +30,12 @@
public class DefaultCommentAuthenticator implements CommentAuthenticator {
- public String getHtml(
- Context context,
- HttpServletRequest request,
- HttpServletResponse response) {
+ public String getHtml(HttpServletRequest request) {
return "<!-- custom authenticator would go here -->";
}
- public boolean authenticate(
- CommentData comment,
- HttpServletRequest request) {
+ public boolean authenticate(HttpServletRequest request) {
return true;
}
Modified: incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/MathCommentAuthenticator.java
URL: http://svn.apache.org/viewvc/incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/MathCommentAuthenticator.java?rev=414396&r1=414395&r2=414396&view=diff
==============================================================================
--- incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/MathCommentAuthenticator.java (original)
+++ incubator/roller/branches/roller_3.0/src/org/apache/roller/ui/rendering/velocity/MathCommentAuthenticator.java Wed Jun 14 15:17:04 2006
@@ -39,9 +39,7 @@
private static Log mLogger = LogFactory.getLog(MathCommentAuthenticator.class);
- public String getHtml(Context context,
- HttpServletRequest request,
- HttpServletResponse response) {
+ public String getHtml(HttpServletRequest request) {
String answer = "";
@@ -81,7 +79,7 @@
}
- public boolean authenticate(CommentData comment, HttpServletRequest request) {
+ public boolean authenticate(HttpServletRequest request) {
boolean authentic = false;