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:08:01 UTC

svn commit: r414394 - 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:08:00 2006
New Revision: 414394

URL: http://svn.apache.org/viewvc?rev=414394&view=rev
Log:
code reformatting.


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=414394&r1=414393&r2=414394&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:08:00 2006
@@ -1,37 +1,38 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-*  contributor license agreements.  The ASF licenses this file to You
-* under the Apache License, Version 2.0 (the "License"); you may not
-* use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.  For additional information regarding
-* copyright in this work, please see the NOTICE file in the top level
-* directory of this distribution.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
 package org.apache.roller.ui.rendering.velocity;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
 import org.apache.velocity.context.Context;
 import org.apache.roller.pojos.CommentData;
 
+
 /**
  * Interface for comment authentication plugin.
- * @author David M Johnson
  */
-public interface CommentAuthenticator
-{
+public interface CommentAuthenticator {
+    
+    
     /**
      * 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 
+     * needed inside the Roller comment form. Called when HTML form is being
      * displayed by Velocity template (see comments.vm).
      *
      * @param context Plugin can access objects in context of calling page.
@@ -39,18 +40,21 @@
      * @param response Plugin should write to response
      */
     public String getHtml(
-                        Context context,
-                        HttpServletRequest request, 
-                        HttpServletResponse response);
+            Context context,
+            HttpServletRequest request,
+            HttpServletResponse response);
+    
+    
     /**
      * Plugin should return true only if comment passes authentication test.
      * Called when a comment is posted, not called when a comment is previewed.
      *
-     * @param comment Comment data that was posted 
+     * @param comment Comment data that was posted
      * @param request Plugin can access request parameters
      * @return True if comment passes authentication test
      */
     public boolean authenticate(
-                        CommentData comment,
-                        HttpServletRequest request);
+            CommentData comment,
+            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=414394&r1=414393&r2=414394&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:08:00 2006
@@ -1,46 +1,47 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-*  contributor license agreements.  The ASF licenses this file to You
-* under the Apache License, Version 2.0 (the "License"); you may not
-* use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.  For additional information regarding
-* copyright in this work, please see the NOTICE file in the top level
-* directory of this distribution.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
 package org.apache.roller.ui.rendering.velocity;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-
 import org.apache.velocity.context.Context;
 import org.apache.roller.pojos.CommentData;
 
+
 /**
  * Default authenticator does nothing, always returns true.
- * @author David M Johnson
  */
-public class DefaultCommentAuthenticator implements CommentAuthenticator 
-{   
+public class DefaultCommentAuthenticator implements CommentAuthenticator {
+    
+    
     public String getHtml(
-                        Context context,
-                        HttpServletRequest request, 
-                        HttpServletResponse response)
-    {
+            Context context,
+            HttpServletRequest request,
+            HttpServletResponse response) {
         return "<!-- custom authenticator would go here -->";
     }
     
+    
     public boolean authenticate(
-                        CommentData comment,
-                        HttpServletRequest request) 
-    {
+            CommentData comment,
+            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=414394&r1=414393&r2=414394&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:08:00 2006
@@ -1,20 +1,21 @@
 /*
-* Licensed to the Apache Software Foundation (ASF) under one or more
-*  contributor license agreements.  The ASF licenses this file to You
-* under the Apache License, Version 2.0 (the "License"); you may not
-* use this file except in compliance with the License.
-* You may obtain a copy of the License at
-*
-*     http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-* See the License for the specific language governing permissions and
-* limitations under the License.  For additional information regarding
-* copyright in this work, please see the NOTICE file in the top level
-* directory of this distribution.
-*/
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  The ASF licenses this file to You
+ * under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.  For additional information regarding
+ * copyright in this work, please see the NOTICE file in the top level
+ * directory of this distribution.
+ */
+
 package org.apache.roller.ui.rendering.velocity;
 
 import java.util.ResourceBundle;
@@ -29,8 +30,6 @@
 
 /**
  * Asks the commenter to answer a simple math question.
- *
- * @author David M Johnson
  */
 public class MathCommentAuthenticator implements CommentAuthenticator {
     
@@ -40,10 +39,10 @@
     private static Log mLogger = LogFactory.getLog(MathCommentAuthenticator.class);
     
     
-    public String getHtml(Context context, 
-                    HttpServletRequest request, 
-                    HttpServletResponse response) {
-
+    public String getHtml(Context context,
+            HttpServletRequest request,
+            HttpServletResponse response) {
+        
         String answer = "";
         
         HttpSession session = request.getSession(true);