package org.argeo.cms.e4.rcp;
+import java.net.URI;
+import java.net.URISyntaxException;
import java.security.PrivilegedExceptionAction;
import java.util.UUID;
import java.util.concurrent.Callable;
private UxContext uxContext;
private String uid;
+ private String httpServerBase;
+
@Override
public Object start(IApplicationContext context) throws Exception {
// TODO wait for CMS to be ready
throw new UnsupportedOperationException();
}
+ @Override
+ public URI toBackendUri(String url) {
+ try {
+ URI u = new URI(url);
+ if (u.getHost() == null) {
+ // TODO make it more robust
+ u = new URI(httpServerBase + url);
+ }
+ return u;
+ } catch (URISyntaxException e) {
+ throw new IllegalArgumentException("Cannot convert " + url, e);
+ }
+ }
+
+ public void setHttpServerBase(String httpServerBase) {
+ this.httpServerBase = httpServerBase;
+ }
+
}