1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.portletbridge.portlet;
17
18 import java.util.Map;
19
20 import javax.portlet.PortletMode;
21 import javax.portlet.PortletModeException;
22 import javax.portlet.PortletSecurityException;
23 import javax.portlet.PortletURL;
24 import javax.portlet.WindowState;
25 import javax.portlet.WindowStateException;
26
27 /***
28 * TODO: There's a simpler way of doing this
29 * @author jmccrindle
30 */
31 public class PseudoPortletURL implements PortletURL {
32
33 private String id;
34 private String start;
35 private String end;
36
37 public PseudoPortletURL(String start, String end) {
38 this.start = start;
39 this.end = end;
40 }
41
42 public void setWindowState(WindowState arg0) throws WindowStateException {
43 throw new UnsupportedOperationException();
44 }
45
46 public void setPortletMode(PortletMode arg0) throws PortletModeException {
47 throw new UnsupportedOperationException();
48 }
49
50 public void setParameter(String key, String value) {
51 if("id".equals(key)) {
52 this.id = value;
53 } else {
54 throw new UnsupportedOperationException();
55 }
56 }
57
58 public void setParameter(String arg0, String[] arg1) {
59 throw new UnsupportedOperationException();
60 }
61
62 public void setParameters(Map arg0) {
63 throw new UnsupportedOperationException();
64 }
65
66 public void setSecure(boolean arg0) throws PortletSecurityException {
67 throw new UnsupportedOperationException();
68 }
69
70 public String toString() {
71 return start + id + end;
72 }
73
74 }