01: /**********************************************************************************
02: * $URL:https://source.sakaiproject.org/svn/osp/trunk/common/api-impl/src/java/org/theospi/portfolio/security/model/CleanupPermissionManager.java $
03: * $Id:CleanupPermissionManager.java 9134 2006-05-08 20:28:42Z chmaurer@iupui.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 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.theospi.portfolio.security.model;
21:
22: import org.sakaiproject.metaobj.shared.mgt.IdManager;
23: import org.sakaiproject.metaobj.shared.model.Id;
24: import org.theospi.portfolio.security.AuthorizationFacade;
25: import org.theospi.portfolio.worksite.model.SiteTool;
26:
27: /**
28: * Created by IntelliJ IDEA.
29: * User: John Ellis
30: * Date: Aug 16, 2005
31: * Time: 11:29:33 AM
32: * To change this template use File | Settings | File Templates.
33: */
34: public class CleanupPermissionManager extends
35: SimpleToolPermissionManager {
36:
37: private CleanupableService service;
38: private AuthorizationFacade authzManager;
39: private IdManager idManager;
40:
41: public void toolRemoved(SiteTool siteTool) {
42: Id toolId = getIdManager().getId(siteTool.getToolId());
43: getService().cleanupTool(toolId);
44: getAuthzManager().deleteAuthorizations(toolId);
45: }
46:
47: public IdManager getIdManager() {
48: return idManager;
49: }
50:
51: public void setIdManager(IdManager idManager) {
52: this .idManager = idManager;
53: }
54:
55: public AuthorizationFacade getAuthzManager() {
56: return authzManager;
57: }
58:
59: public void setAuthzManager(AuthorizationFacade authzManager) {
60: this .authzManager = authzManager;
61: }
62:
63: public CleanupableService getService() {
64: return service;
65: }
66:
67: public void setService(CleanupableService service) {
68: this.service = service;
69: }
70:
71: }
|