01: /* DynamicMedia.java
02:
03: {{IS_NOTE
04: Purpose:
05:
06: Description:
07:
08: History:
09: Fri Jul 22 08:59:10 2005, Created by tomyeh
10: }}IS_NOTE
11:
12: Copyright (C) 2005 Potix Corporation. All Rights Reserved.
13:
14: {{IS_RIGHT
15: This program is distributed under GPL Version 2.0 in the hope that
16: it will be useful, but WITHOUT ANY WARRANTY.
17: }}IS_RIGHT
18: */
19: package org.zkoss.zk.ui.ext.render;
20:
21: import org.zkoss.util.media.Media;
22: import org.zkoss.zk.ui.UiException;
23:
24: /**
25: * Implemented by the object returned by {@link org.zkoss.zk.ui.sys.ComponentCtrl#getExtraCtrl},
26: * if a component might have viewable parts other than HTML (WML, XAML
27: * or any client language). A typical example is an image and an audio.
28: *
29: * <h3>How it woks:</h3>
30: *
31: * <ol>
32: * <li>DynamicMedia componet first invoke {@link org.zkoss.zk.ui.Desktop#getDynamicMediaURI}
33: * to retrieve a URI and generate proper HTML (or any client language).<li>
34: * <li>Then, client will send a request to the URI</li>
35: * <li> {@link org.zkoss.zk.au.http.DHtmlUpdateServlet} interprets it
36: * and call {@link #getMedia} to retrieve the media and return it the client</li>
37: * </ol>
38: *
39: * @author tomyeh
40: */
41: public interface DynamicMedia {
42: /** Retrieve the view in {@link Media} format.
43: *
44: * <p>Unlike other methods, you cannot post event, create, remove,
45: * invalidate or do any smart updates in this method.
46: * In other words, READ ONLY.
47: *
48: * @param pathInfo the extra info passed to
49: * {@link org.zkoss.zk.au.http.DHtmlUpdateServlet}.
50: * It is what you passed to
51: * {@link org.zkoss.zk.ui.Desktop#getDynamicMediaURI}.
52: * It is never null. It must start with "/" or be empty.
53: */
54: public Media getMedia(String pathInfo);
55: }
|