1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.services;
18
19
20 import org.apache.jetspeed.om.security.JetspeedUser;
21 import org.apache.jetspeed.om.profile.Entry;
22 import org.apache.jetspeed.portal.Portlet;
23 import org.apache.jetspeed.services.security.PortalAccessController;
24 import org.apache.jetspeed.services.security.PortalResource;
25
26
27 import org.apache.turbine.services.TurbineServices;
28
29 /***
30 * Static accessor for the PortalAccessController service
31 *
32 * @author <a href="mailto:paulsp@apache.org">Paul Spencer</a>
33 * @version $Id: JetspeedPortalAccessController.java,v 1.3 2004/02/23 04:00:57 jford Exp $
34 */
35 public abstract class JetspeedPortalAccessController
36 {
37
38 /*** Creates new JetspeedIdGenerator */
39 public JetspeedPortalAccessController()
40 {
41 }
42
43
44
45
46
47
48
49 protected static PortalAccessController getService()
50 {
51 return (PortalAccessController)TurbineServices
52 .getInstance().getService(PortalAccessController.SERVICE_NAME);
53 }
54
55 public static boolean checkPermission(JetspeedUser user, Entry entry, String action)
56 {
57 return getService().checkPermission(user, entry, action);
58 }
59
60 public static boolean checkPermission(JetspeedUser user, Portlet portlet, String action)
61 {
62 return getService().checkPermission(user, portlet, action);
63 }
64
65 public static boolean checkPermission(JetspeedUser user, PortalResource resource, String action)
66 {
67 return getService().checkPermission(user, resource, action);
68 }
69
70 }