KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portlet > forums > security > ForumItemImpl


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

9 package org.jboss.portlet.forums.security;
10
11 import java.util.LinkedHashSet JavaDoc;
12 import java.util.ResourceBundle JavaDoc;
13 import java.util.Set JavaDoc;
14
15 /**
16  * @author <a HREF="mailto:theute@jboss.org">Thomas Heute </a>
17  * @version $Revision: 1.1 $
18  */

19 public class ForumItemImpl
20       implements org.jboss.portal.core.security.Item
21 {
22
23    public String JavaDoc name;
24    
25    public ForumItemImpl(ResourceBundle JavaDoc bundle, String JavaDoc name)
26    {
27       this.name = name;
28    }
29    
30    public String JavaDoc getName()
31    {
32       return name;
33    }
34
35    public Set JavaDoc getPermissionsNames()
36    {
37       Set JavaDoc set = new LinkedHashSet JavaDoc();
38       set.add(ForumsSecurityConstants.ADMINFORUM);
39       set.add(ForumsSecurityConstants.DELETEPOSTINFORUM);
40       set.add(ForumsSecurityConstants.MODERATEFORUM);
41       set.add(ForumsSecurityConstants.ADDPOSTINFORUM);
42       set.add(ForumsSecurityConstants.EDITPOSTINFORUM);
43       set.add(ForumsSecurityConstants.READFORUM);
44       return set;
45    }
46
47    public String JavaDoc getDescription()
48    {
49       return "Forums security management";
50    }
51
52 }
53
Popular Tags