01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/metaobj/tags/sakai_2-4-1/metaobj-api/api/src/java/org/sakaiproject/metaobj/security/AuthorizationFacade.java $
03: * $Id: AuthorizationFacade.java 9469 2006-05-15 14:52:05Z chmaurer@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2004, 2005, 2006 The Sakai Foundation.
07: *
08: * Licensed under the Educational Community License, Version 1.0 (the "License");
09: * you may not use this file except in compliance with the License.
10: * You may obtain a copy of the License at
11: *
12: * http://www.opensource.org/licenses/ecl1.php
13: *
14: * Unless required by applicable law or agreed to in writing, software
15: * distributed under the License is distributed on an "AS IS" BASIS,
16: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17: * See the License for the specific language governing permissions and
18: * limitations under the License.
19: *
20: **********************************************************************************/package org.sakaiproject.metaobj.security;
21:
22: import java.util.Collection;
23: import java.util.List;
24:
25: import org.sakaiproject.metaobj.shared.model.Agent;
26: import org.sakaiproject.metaobj.shared.model.Id;
27:
28: /**
29: * Created by IntelliJ IDEA.
30: * User: jbush
31: * Date: Apr 29, 2004
32: * Time: 11:28:09 AM
33: * To change this template use File | Settings | File Templates.
34: */
35: public interface AuthorizationFacade {
36:
37: public void checkPermission(String function, Id id)
38: throws AuthorizationFailedException;
39:
40: public void checkPermission(Agent agent, String function, Id id)
41: throws AuthorizationFailedException;
42:
43: /**
44: * @param function
45: * @param id
46: * @return
47: */
48: public boolean isAuthorized(String function, Id id);
49:
50: /**
51: * @param agent
52: * @param function
53: * @param id
54: * @return
55: */
56: public boolean isAuthorized(Agent agent, String function, Id id);
57:
58: /**
59: * at least one param must be non-null
60: *
61: * @param agent
62: * @param function
63: * @param id
64: * @return
65: */
66: public List getAuthorizations(Agent agent, String function, Id id);
67:
68: /**
69: * @param agent
70: * @param function
71: * @param id
72: */
73: public void createAuthorization(Agent agent, String function, Id id);
74:
75: public void deleteAuthorization(Agent agent, String function, Id id);
76:
77: public void deleteAuthorizations(Id qualifier);
78:
79: public void pushAuthzGroups(Collection authzGroups);
80:
81: void pushAuthzGroups(String siteId);
82: }
|