01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/content/tags/sakai_2-4-1/content-util/util/src/java/org/sakaiproject/content/util/BaseServiceLevelAction.java $
03: * $Id: BaseServiceLevelAction.java 22584 2007-03-14 03:26:07Z jimeng@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 2006, 2007 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.content.util;
21:
22: import org.sakaiproject.entity.api.Reference;
23: import org.sakaiproject.content.api.ServiceLevelAction;
24:
25: /**
26: * Created by IntelliJ IDEA.
27: * User: johnellis
28: * Date: Jan 26, 2007
29: * Time: 10:17:14 AM
30: * To change this template use File | Settings | File Templates.
31: */
32: public class BaseServiceLevelAction extends BaseResourceAction
33: implements ServiceLevelAction {
34:
35: private boolean multipleItemAction;
36:
37: public BaseServiceLevelAction(String id, ActionType actionType,
38: String typeId, boolean multipleItemAction) {
39: super (id, actionType, typeId);
40: this .multipleItemAction = multipleItemAction;
41: }
42:
43: /**
44: * This method effects this action on the entity specified.
45: *
46: * @param reference
47: */
48: public void invokeAction(Reference reference) {
49: // do nothing
50: }
51:
52: public boolean isMultipleItemAction() {
53: return multipleItemAction;
54: }
55:
56: /**
57: * This method is invoked before the Resources tool does its part of the action
58: * in case the registrant needs to participate in the action at that point.
59: *
60: * @param reference A reference to the entity with respect to which the action is taken
61: */
62: public void initializeAction(Reference reference) {
63: // do nothing
64: }
65:
66: /**
67: * This method is invoked after the Resources tool does its part of the action
68: * in case the registrant needs to participate in the action at that point. Will
69: * not be invoked after cancelAction(Reference reference) is invoked.
70: *
71: * @param entity A reference to the entity with respect to which the action is taken
72: */
73: public void finalizeAction(Reference reference) {
74: // do nothing
75: }
76:
77: /**
78: * This method is invoked if the Resources tool cancels the action after invoking
79: * the initializeAction(Reference reference) method in case the registrant needs to
80: * clean up a canceled action at that point. Will not be invoked after
81: * finalizeAction(Reference reference) is invoked.
82: *
83: * @param entity A reference to the entity with respect to which the action is taken
84: */
85: public void cancelAction(Reference reference) {
86: // do nothing
87: }
88:
89: }
|