01: /* Copyright 2001 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: import org.jasig.portal.AuthorizationException;
09:
10: /**
11: * Interface for creating, finding and maintaining <code>IPermissions</code>.
12: * @author Dan Ellentuck
13: * @version $Revision: 34783 $
14: */
15:
16: public interface IPermissionStore {
17:
18: /**
19: * Add the IPermissions to the store.
20: * @param perms org.jasig.portal.security.IPermission[]
21: * @exception org.jasig.portal.AuthorizationException - wraps an Exception specific to the store.
22: */
23: public void add(IPermission[] perms) throws AuthorizationException;
24:
25: /**
26: * Add the IPermission to the store.
27: * @param perm org.jasig.portal.security.IPermission
28: * @exception org.jasig.portal.AuthorizationException - wraps an Exception specific to the store.
29: */
30: public void add(IPermission perm) throws AuthorizationException;
31:
32: /**
33: * Remove the IPermissions from the store.
34: * @param perms org.jasig.portal.security.IPermission[]
35: * @exception org.jasig.portal.AuthorizationException - wraps an Exception specific to the store.
36: */
37: public void delete(IPermission[] perms)
38: throws AuthorizationException;
39:
40: /**
41: * Remove the IPermission from the store.
42: * @param perm org.jasig.portal.security.IPermission
43: * @exception org.jasig.portal.AuthorizationException - wraps an Exception specific to the store.
44: */
45: public void delete(IPermission perm) throws AuthorizationException;
46:
47: /**
48: * Factory method for IPermissions
49: */
50: public IPermission newInstance(String owner);
51:
52: /**
53: * Update the IPermissions in the store.
54: * @param perms org.jasig.portal.security.IPermission[]
55: * @exception org.jasig.portal.AuthorizationException - wraps an Exception specific to the store.
56: */
57: public void update(IPermission[] perms)
58: throws AuthorizationException;
59:
60: /**
61: * Update the IPermission in the store.
62: * @param perm org.jasig.portal.security.IPermission
63: * @exception org.jasig.portal.AuthorizationException - wraps an Exception specific to the store.
64: */
65: public void update(IPermission perm) throws AuthorizationException;
66:
67: /**
68: * Select the IPermissions from the store.
69: * @param owner String - the Permission owner
70: * @param principal String - the Permission principal
71: * @param activity String - the Permission activity
72: * @param target String - the Permission target
73: * @param type String - the Permission type
74: * @exception org.jasig.portal.AuthorizationException - wraps an Exception specific to the store.
75: */
76: public IPermission[] select(String owner, String principal,
77: String activity, String target, String type)
78: throws AuthorizationException;
79: }
|