01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/osp/tags/sakai_2-4-1/matrix/api-impl/src/java/org/theospi/portfolio/workflow/impl/WorkflowHttpAccess.java $
03: * $Id: WorkflowHttpAccess.java 10835 2006-06-17 03:25:03Z lance@indiana.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.workflow.impl;
21:
22: import org.sakaiproject.entity.api.EntityAccessOverloadException;
23: import org.sakaiproject.entity.api.EntityCopyrightException;
24: import org.sakaiproject.entity.api.EntityNotDefinedException;
25: import org.sakaiproject.entity.api.EntityPermissionException;
26: import org.sakaiproject.entity.api.Reference;
27: import org.sakaiproject.metaobj.shared.mgt.IdManager;
28: import org.sakaiproject.metaobj.shared.mgt.ReferenceParser;
29: import org.theospi.portfolio.security.mgt.OspHttpAccessBase;
30: import org.theospi.portfolio.workflow.mgt.WorkflowManager;
31:
32: /**
33: * Created by IntelliJ IDEA.
34: * User: John Ellis
35: * Date: Nov 14, 2005
36: * Time: 6:05:46 PM
37: * To change this template use File | Settings | File Templates.
38: */
39: public class WorkflowHttpAccess extends OspHttpAccessBase {
40:
41: private IdManager idManager;
42: private WorkflowManager workflowManager;
43:
44: protected void checkSource(Reference ref, ReferenceParser parser)
45: throws EntityPermissionException,
46: EntityNotDefinedException, EntityAccessOverloadException,
47: EntityCopyrightException {
48: // should setup access rights, etc.
49: getWorkflowManager().getWorkflow(
50: getIdManager().getId(parser.getId()));
51: }
52:
53: public IdManager getIdManager() {
54: return idManager;
55: }
56:
57: public void setIdManager(IdManager idManager) {
58: this .idManager = idManager;
59: }
60:
61: public WorkflowManager getWorkflowManager() {
62: return workflowManager;
63: }
64:
65: public void setWorkflowManager(WorkflowManager workflowManager) {
66: this.workflowManager = workflowManager;
67: }
68: }
|