KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > roller > presentation > velocity > DefaultCommentAuthenticator


1 package org.roller.presentation.velocity;
2
3 import javax.servlet.http.HttpServletRequest JavaDoc;
4 import javax.servlet.http.HttpServletResponse JavaDoc;
5 import org.apache.velocity.context.Context;
6 import org.roller.pojos.CommentData;
7
8 /**
9  * Default authenticator does nothing, always returns true.
10  * @author David M Johnson
11  */

12 public class DefaultCommentAuthenticator implements CommentAuthenticator
13 {
14     public String JavaDoc getHtml(
15                         Context context,
16                         HttpServletRequest JavaDoc request,
17                         HttpServletResponse JavaDoc response)
18     {
19         return "<!-- custom authenticator would go here -->";
20     }
21     
22     public boolean authenticate(
23                         CommentData comment,
24                         HttpServletRequest JavaDoc request)
25     {
26         return true;
27     }
28 }
29
Popular Tags