01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/entity/tags/sakai_2-4-1/entity-api/api/src/java/org/sakaiproject/entity/api/ContextObserver.java $
03: * $Id: ContextObserver.java 8732 2006-05-02 19:13:49Z ggolden@umich.edu $
04: ***********************************************************************************
05: *
06: * Copyright (c) 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.entity.api;
21:
22: /**
23: * <p>
24: * Services which implement ContextObserver declare themselves as wanting context change notification.
25: * </p>
26: */
27: public interface ContextObserver {
28: /**
29: * This is called when a context is first created.
30: *
31: * @param context
32: * The context id.
33: * @param toolPlacement
34: * true if one of your tool is placed in the context.
35: */
36: void contextCreated(String context, boolean toolPlacement);
37:
38: /**
39: * This is called when a context is changed.
40: *
41: * @param context
42: * The context id.
43: * @param toolPlacement
44: * true if one of your tool is placed in the context after the change.
45: */
46: void contextUpdated(String context, boolean toolPlacement);
47:
48: /**
49: * This is called when a context is being deleted.
50: *
51: * @param context
52: * The context id.
53: * @param toolPlacement
54: * true if one of your tool is placed in the context after the change.
55: */
56: void contextDeleted(String context, boolean toolPlacment);
57:
58: /**
59: * Provide the string array of tool ids, for tools that we need context preperation for.
60: *
61: * @return
62: */
63: String[] myToolIds();
64: }
|