KickJava   Java API By Example, From Geeks To Geeks.

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


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.Set JavaDoc;
13
14 import org.jboss.portal.core.security.PermissionDescription;
15
16 /**
17  * @author <a HREF="mailto:theute@jboss.org">Thomas Heute </a>
18  * @version $Revision: 1.1 $
19  */

20 public class RootItemImpl
21       implements org.jboss.portal.core.security.Item
22 {
23
24    public RootItemImpl()
25    {
26    }
27    
28    public String JavaDoc getName()
29    {
30       return "Root";
31    }
32
33    public Set JavaDoc getPermissionsNames()
34    {
35       Set JavaDoc set = new LinkedHashSet JavaDoc();
36       set.add(ForumsSecurityConstants.ADMIN);
37       set.add(ForumsSecurityConstants.DELETE);
38       set.add(ForumsSecurityConstants.EDIT);
39       set.add(ForumsSecurityConstants.ADD);
40       set.add(ForumsSecurityConstants.READ);
41       return set;
42    }
43
44    public PermissionDescription getPermission(String JavaDoc name)
45    {
46       return null;
47    }
48
49    public String JavaDoc getDescription()
50    {
51       return "Global permission management";
52    }
53
54 }
55
Popular Tags