KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portlet > forums > commands > moderation > LockTopicCommand


1 /*****************************************
2  * *
3  * JBoss Portal: The OpenSource Portal *
4  * *
5  * Forums JBoss Portlet *
6  * *
7  * Distributable under GPL license. *
8  * See terms of license at gnu.org. *
9  * *
10  *****************************************/

11 package org.jboss.portlet.forums.commands.moderation;
12
13
14 /**
15  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
16  * @version $Revision: 1.1.1.1 $
17  */

18 public class LockTopicCommand // extends AbstractCommand
19
{
20    /*
21       public TopicEJBLocal topic;
22       public boolean lock;
23       public Result execute()
24       {
25          if (topic.getStatus() != BBConstants.TOPIC_MOVED)
26          {
27             if (lock)
28             {
29                topic.setStatus(BBConstants.TOPIC_LOCKED);
30                return TYPE_TOPIC_LOCKED;
31             }
32             else
33             {
34                topic.setStatus(BBConstants.TOPIC_UNLOCKED);
35                return TYPE_TOPIC_UNLOCKED;
36             }
37          }
38          return TYPE_CANNOT_LOCK_TOPIC_MOVED;
39       }
40     */

41 }
Popular Tags