01: /**********************************************************************************
02: * $URL: https://source.sakaiproject.org/svn/courier/tags/sakai_2-4-1/courier-api/api/src/java/org/sakaiproject/courier/api/Delivery.java $
03: * $Id: Delivery.java 6940 2006-03-23 16:35:31Z ggolden@umich.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.sakaiproject.courier.api;
21:
22: /**
23: * <p>
24: * Delivery is the core interface for things sent to the Courier service that represent various sorts of deliveries to the client windows.
25: * </p>
26: * <p>
27: * Address is a client window address.
28: * </p>
29: */
30: public interface Delivery {
31: /**
32: * Set the delivery address.
33: *
34: * @param address
35: * The delivery address.
36: */
37: void setAddress(String address);
38:
39: /**
40: * Access the delivery address.
41: *
42: * @return The delivery address.
43: */
44: String getAddress();
45:
46: /**
47: * Set the HTML Element Id that this delivery is in reference to.
48: *
49: * @param id
50: * The HTML Element Id that this delivery is in reference to.
51: */
52: void setElement(String id);
53:
54: /**
55: * Access the HTML Element Id that this delivery is in reference to.
56: *
57: * @return The HTML Element Id that this delivery is in reference to.
58: */
59: String getElement();
60:
61: /**
62: * Perform any pre-delivery actions. Note: this is run in the same usage session as is being delivered to.
63: */
64: void act();
65:
66: /**
67: * Compose a javascript message for delivery to the browser client window.
68: *
69: * @return The javascript message to send to the browser client window.
70: */
71: String compose();
72: }
|