1 package org.sirius.client.web.core; 2 3 public class WebCoreProxy implements org.sirius.client.web.core.WebCore { 4 private String _endpoint = null; 5 private org.sirius.client.web.core.WebCore webCore = null; 6 7 public WebCoreProxy() { 8 _initWebCoreProxy(); 9 } 10 11 public WebCoreProxy(String endpoint) { 12 _endpoint = endpoint; 13 _initWebCoreProxy(); 14 } 15 16 private void _initWebCoreProxy() { 17 try { 18 webCore = (new org.sirius.client.web.core.WebCoreServiceLocator()) 19 .getWebCorePort(); 20 if (webCore != null) { 21 if (_endpoint != null) 22 ((javax.xml.rpc.Stub) webCore) 23 ._setProperty( 24 "javax.xml.rpc.service.endpoint.address", 25 _endpoint); 26 else 27 _endpoint = (String) ((javax.xml.rpc.Stub) webCore) 28 ._getProperty("javax.xml.rpc.service.endpoint.address"); 29 } 30 31 } catch (javax.xml.rpc.ServiceException serviceException) { 32 } 33 } 34 35 public String getEndpoint() { 36 return _endpoint; 37 } 38 39 public void setEndpoint(String endpoint) { 40 _endpoint = endpoint; 41 if (webCore != null) 42 ((javax.xml.rpc.Stub) webCore)._setProperty( 43 "javax.xml.rpc.service.endpoint.address", _endpoint); 44 45 } 46 47 public org.sirius.client.web.core.WebCore getWebCore() { 48 if (webCore == null) 49 _initWebCoreProxy(); 50 return webCore; 51 } 52 53 public void forward(java.lang.String arg0) throws java.rmi.RemoteException { 54 if (webCore == null) 55 _initWebCoreProxy(); 56 webCore.forward(arg0); 57 } 58 59 public void sendKeys(java.lang.String arg0, java.lang.String arg1, 60 java.lang.String arg2, java.lang.String arg3) 61 throws java.rmi.RemoteException { 62 if (webCore == null) 63 _initWebCoreProxy(); 64 webCore.sendKeys(arg0, arg1, arg2, arg3); 65 } 66 67 public void selectWindow(java.lang.String arg0, java.lang.String arg1) 68 throws java.rmi.RemoteException { 69 if (webCore == null) 70 _initWebCoreProxy(); 71 webCore.selectWindow(arg0, arg1); 72 } 73 74 public void selectAlert(java.lang.String arg0) 75 throws java.rmi.RemoteException { 76 if (webCore == null) 77 _initWebCoreProxy(); 78 webCore.selectAlert(arg0); 79 } 80 81 public java.lang.String getCssValue(java.lang.String arg0, 82 java.lang.String arg1, java.lang.String arg2, java.lang.String arg3) 83 throws java.rmi.RemoteException { 84 if (webCore == null) 85 _initWebCoreProxy(); 86 return webCore.getCssValue(arg0, arg1, arg2, arg3); 87 } 88 89 public boolean isDisplayed(java.lang.String arg0, java.lang.String arg1, 90 java.lang.String arg2) throws java.rmi.RemoteException { 91 if (webCore == null) 92 _initWebCoreProxy(); 93 return webCore.isDisplayed(arg0, arg1, arg2); 94 } 95 96 public java.lang.String getWindowHandle(java.lang.String arg0) 97 throws java.rmi.RemoteException { 98 if (webCore == null) 99 _initWebCoreProxy(); 100 return webCore.getWindowHandle(arg0); 101 } 102 103 public void selectFrameByName(java.lang.String arg0, java.lang.String arg1) 104 throws java.rmi.RemoteException { 105 if (webCore == null) 106 _initWebCoreProxy(); 107 webCore.selectFrameByName(arg0, arg1); 108 } 109 110 public void selectDefaultContent(java.lang.String arg0) 111 throws java.rmi.RemoteException { 112 if (webCore == null) 113 _initWebCoreProxy(); 114 webCore.selectDefaultContent(arg0); 115 } 116 117 public java.lang.String getPageSource(java.lang.String arg0) 118 throws java.rmi.RemoteException { 119 if (webCore == null) 120 _initWebCoreProxy(); 121 return webCore.getPageSource(arg0); 122 } 123 124 public void selectFrameByIndex(java.lang.String arg0, int arg1) 125 throws java.rmi.RemoteException { 126 if (webCore == null) 127 _initWebCoreProxy(); 128 webCore.selectFrameByIndex(arg0, arg1); 129 } 130 131 public void back(java.lang.String arg0) throws java.rmi.RemoteException { 132 if (webCore == null) 133 _initWebCoreProxy(); 134 webCore.back(arg0); 135 } 136 137 public org.sirius.client.web.core.Point getLocation(java.lang.String arg0, 138 java.lang.String arg1, java.lang.String arg2) 139 throws java.rmi.RemoteException { 140 if (webCore == null) 141 _initWebCoreProxy(); 142 return webCore.getLocation(arg0, arg1, arg2); 143 } 144 145 public java.lang.String getURL(java.lang.String arg0) 146 throws java.rmi.RemoteException { 147 if (webCore == null) 148 _initWebCoreProxy(); 149 return webCore.getURL(arg0); 150 } 151 152 public void clear(java.lang.String arg0, java.lang.String arg1, 153 java.lang.String arg2) throws java.rmi.RemoteException { 154 if (webCore == null) 155 _initWebCoreProxy(); 156 webCore.clear(arg0, arg1, arg2); 157 } 158 159 public java.lang.String start(java.lang.String arg0) 160 throws java.rmi.RemoteException { 161 if (webCore == null) 162 _initWebCoreProxy(); 163 return webCore.start(arg0); 164 } 165 166 public void stop(java.lang.String arg0) throws java.rmi.RemoteException { 167 if (webCore == null) 168 _initWebCoreProxy(); 169 webCore.stop(arg0); 170 } 171 172 public org.sirius.client.web.core.Dimension getSize(java.lang.String arg0, 173 java.lang.String arg1, java.lang.String arg2) 174 throws java.rmi.RemoteException { 175 if (webCore == null) 176 _initWebCoreProxy(); 177 return webCore.getSize(arg0, arg1, arg2); 178 } 179 180 public void open(java.lang.String arg0, java.lang.String arg1) 181 throws java.rmi.RemoteException { 182 if (webCore == null) 183 _initWebCoreProxy(); 184 webCore.open(arg0, arg1); 185 } 186 187 public void refresh(java.lang.String arg0) throws java.rmi.RemoteException { 188 if (webCore == null) 189 _initWebCoreProxy(); 190 webCore.refresh(arg0); 191 } 192 193 public java.lang.String getTitle(java.lang.String arg0) 194 throws java.rmi.RemoteException { 195 if (webCore == null) 196 _initWebCoreProxy(); 197 return webCore.getTitle(arg0); 198 } 199 200 public boolean isEnabled(java.lang.String arg0, java.lang.String arg1, 201 java.lang.String arg2) throws java.rmi.RemoteException { 202 if (webCore == null) 203 _initWebCoreProxy(); 204 return webCore.isEnabled(arg0, arg1, arg2); 205 } 206 207 public java.lang.String getText(java.lang.String arg0, 208 java.lang.String arg1, java.lang.String arg2) 209 throws java.rmi.RemoteException { 210 if (webCore == null) 211 _initWebCoreProxy(); 212 return webCore.getText(arg0, arg1, arg2); 213 } 214 215 public void submit(java.lang.String arg0, java.lang.String arg1, 216 java.lang.String arg2) throws java.rmi.RemoteException { 217 if (webCore == null) 218 _initWebCoreProxy(); 219 webCore.submit(arg0, arg1, arg2); 220 } 221 222 public void click(java.lang.String arg0, java.lang.String arg1, 223 java.lang.String arg2) throws java.rmi.RemoteException { 224 if (webCore == null) 225 _initWebCoreProxy(); 226 webCore.click(arg0, arg1, arg2); 227 } 228 229 public boolean isSelected(java.lang.String arg0, java.lang.String arg1, 230 java.lang.String arg2) throws java.rmi.RemoteException { 231 if (webCore == null) 232 _initWebCoreProxy(); 233 return webCore.isSelected(arg0, arg1, arg2); 234 } 235 236 public java.lang.String getAttribute(java.lang.String arg0, 237 java.lang.String arg1, java.lang.String arg2, java.lang.String arg3) 238 throws java.rmi.RemoteException { 239 if (webCore == null) 240 _initWebCoreProxy(); 241 return webCore.getAttribute(arg0, arg1, arg2, arg3); 242 } 243 244 public java.lang.String getTagName(java.lang.String arg0, 245 java.lang.String arg1, java.lang.String arg2) 246 throws java.rmi.RemoteException { 247 if (webCore == null) 248 _initWebCoreProxy(); 249 return webCore.getTagName(arg0, arg1, arg2); 250 } 251 252 }