KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > portal > core > security > NullAuthorizationRealm


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.portal.core.security;
10
11 import java.util.Set JavaDoc;
12
13 /**
14  * @author <a HREF="mailto:julien@jboss.org">Julien Viet</a>
15  * @version $Revision: 1.3 $
16  */

17 public class NullAuthorizationRealm implements AuthorizationRealm
18 {
19
20    public static final NullAuthorizationRealm instance = new NullAuthorizationRealm();
21
22    public boolean hasPermission(String JavaDoc domain, String JavaDoc role, String JavaDoc permission)
23    {
24       return true;
25    }
26
27    public boolean hasPermission(String JavaDoc domain, Set JavaDoc roles, String JavaDoc permission)
28    {
29       return true;
30    }
31
32    public boolean hasPermission(String JavaDoc domain, String JavaDoc role, String JavaDoc[] path, String JavaDoc permission)
33    {
34       return true;
35    }
36
37    public boolean hasPermission(String JavaDoc domain, Set JavaDoc roles, String JavaDoc[] path, String JavaDoc permission)
38    {
39       return true;
40    }
41
42    public boolean hasPermission(String JavaDoc role, String JavaDoc permission)
43    {
44       return true;
45    }
46
47    public boolean hasPermission(Set JavaDoc roles, String JavaDoc permission)
48    {
49       return true;
50    }
51
52    public boolean hasPermission(String JavaDoc role, String JavaDoc[] path, String JavaDoc permission)
53    {
54       return true;
55    }
56
57    public boolean hasPermission(Set JavaDoc roles, String JavaDoc[] path, String JavaDoc permission)
58    {
59       return true;
60    }
61 }
62
Popular Tags