01: /* Copyright 2002 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.security;
07:
08: /**
09: * Defines a pluggable strategy for evaluating the permissions associated
10: * with a principal.
11: * @author Dan Ellentuck
12: * @version $Revision: 34781 $
13: * @see org.jasig.portal.security.IAuthorizationService
14: * @see org.jasig.portal.security.IPermission
15: */
16: public interface IPermissionPolicy {
17: /**
18: * Answers if the owner has authorized the principal to perform the activity
19: * on the target, based on permissions provided by the service. Params
20: * <code>service</code>, <code>owner</code> and <code>activity</code> must
21: * be non-null.
22: *
23: * @return boolean
24: * @param service org.jasig.portal.security.IAuthorizationService
25: * @param principal org.jasig.portal.security.IAuthorizationPrincipal
26: * @param owner java.lang.String
27: * @param activity java.lang.String
28: * @param target java.lang.String
29: * @exception org.jasig.portal.AuthorizationException
30: */
31: public boolean doesPrincipalHavePermission(
32: IAuthorizationService service,
33: IAuthorizationPrincipal principal, String owner,
34: String activity, String target)
35: throws org.jasig.portal.AuthorizationException;
36: }
|