1/*2 * Copyright 2000-2001,2004 The Apache Software Foundation.3 * 4 * Licensed under the Apache License, Version 2.0 (the "License");5 * you may not use this file except in compliance with the License.6 * You may obtain a copy of the License at7 * 8 * http://www.apache.org/licenses/LICENSE-2.09 * 10 * Unless required by applicable law or agreed to in writing, software11 * distributed under the License is distributed on an "AS IS" BASIS,12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.13 * See the License for the specific language governing permissions and14 * limitations under the License.15 */1617packageorg.apache.jetspeed.services;
1819// Jetspeed imports20import org.apache.jetspeed.om.security.JetspeedUser;
21import org.apache.jetspeed.om.profile.Entry;
22import org.apache.jetspeed.portal.Portlet;
23import org.apache.jetspeed.services.security.PortalAccessController;
24import org.apache.jetspeed.services.security.PortalResource;
2526// Turbine27import org.apache.turbine.services.TurbineServices;
2829/***30 * Static accessor for the PortalAccessController service31 *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 */35publicabstractclassJetspeedPortalAccessController36 {
3738/*** Creates new JetspeedIdGenerator */39publicJetspeedPortalAccessController()
40 {
41 }
4243/*44 * Utility method for accessing the service45 * implementation46 *47 * @return a UniqueIdService implementation instance48 */49protectedstaticPortalAccessController getService()
50 {
51return (PortalAccessController)TurbineServices
52 .getInstance().getService(PortalAccessController.SERVICE_NAME);
53 }
5455publicstaticboolean checkPermission(JetspeedUser user, Entry entry, String action)
56 {
57return getService().checkPermission(user, entry, action);
58 }
5960publicstaticboolean checkPermission(JetspeedUser user, Portlet portlet, String action)
61 {
62return getService().checkPermission(user, portlet, action);
63 }
6465publicstaticboolean checkPermission(JetspeedUser user, PortalResource resource, String action)
66 {
67return getService().checkPermission(user, resource, action);
68 }
6970 }