KickJava   Java API By Example, From Geeks To Geeks.

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


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 CategoryItemImpl
20       implements org.jboss.portal.core.security.Item
21 {
22    public String JavaDoc name;
23    
24    public CategoryItemImpl(ResourceBundle JavaDoc bundle, String JavaDoc name)
25    {
26       this.name = name;
27    }
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.ADMINCATEGORY);
39       set.add(ForumsSecurityConstants.DELETEFORUMINCATEGORY);
40       set.add(ForumsSecurityConstants.ADDFORUMINCATEGORY);
41       set.add(ForumsSecurityConstants.EDITFORUMINCATEGORY);
42       set.add(ForumsSecurityConstants.READCATEGORY);
43       return set;
44    }
45
46    public String JavaDoc getDescription()
47    {
48       return "Categories management";
49    }
50 }
Popular Tags