Examples of UrlBuilder


Examples of org.olat.core.gui.render.URLBuilder

  public void testInlineTranslationReplaceLocalizationMarkupWithHTML() {
    I18nManager i18nMgr = I18nManager.getInstance();
    // enable inline translation markup
    i18nMgr.setMarkLocalizedStringsEnabled(null, true);
    Translator inlineTrans = Util.createPackageTranslator(InlineTranslationInterceptHandlerController.class, i18nMgr.getLocaleOrNull("de"));
    URLBuilder inlineTranslationURLBuilder = new jUnitURLBuilder();
    String testBundle = "org.olat.core.util.i18n.junittestdata";
    String testKey = "no.need.to.translate.this";
    String rawtext1 = "Lorem impsum<b>nice stuff</b>";
    String rawtext2 = "Holderadio <ul>lsdfsdf<y  asdf blblb";
    String combinedKey = testBundle + ":" + testKey;
View Full Code Here

Examples of org.olat.core.gui.render.URLBuilder

 
  private String getRedirectToURL(UserSession usess) {
    ChiefController cc = (ChiefController) Windows.getWindows(usess).getAttribute("AUTHCHIEFCONTROLLER");
    Window w = cc.getWindow();
   
    URLBuilder ubu = new URLBuilder("", w.getInstanceId(), String.valueOf(w.getTimestamp()), null);
    StringOutput sout = new StringOutput(30);
    ubu.buildURI(sout, null, null);
   
    return WebappHelper.getServletContextPath() + DispatcherAction.PATH_AUTHENTICATED + sout.toString();
  }
View Full Code Here

Examples of org.olat.core.gui.render.URLBuilder

    currentWindow.setUriPrefix(WebappHelper.getServletContextPath() + DispatcherAction.PATH_AUTHENTICATED);
    Windows.getWindows(ureq).registerWindow(currentWindow);
 
    // redirect to AuthenticatedDispatcher
    // IMPORTANT: windowID has changed due to re-registering current window -> do not use ureq.getWindowID() to build new URLBuilder.
    URLBuilder ubu = new URLBuilder(WebappHelper.getServletContextPath() + DispatcherAction.PATH_AUTHENTICATED, currentWindow.getInstanceId(), "1", null)
    StringOutput sout = new StringOutput(30);
    ubu.buildURI(sout, null, null);
    ureq.getDispatchResult().setResultingMediaResource(new RedirectMediaResource(sout.toString()));
   
    return LOGIN_OK;
  }
View Full Code Here

Examples of org.onebusaway.presentation.client.UrlBuilder

  @UiHandler("_saveBookmarkAnchor")
  void handleShowCustomViewClick(ClickEvent e) {
    e.preventDefault();

    UrlBuilder b = UrlBuilder.createFromLocation();

    String path = Location.getPath();
    path = path.replace("bookmark-edit.action", "bookmark-update.action");
    b.setPath(path);

    String name = _bookmarkName.getText();
    if (name.length() > 0)
      b.setParameter("name", name);

    String[] stopIds = _stopsById.keySet().toArray(new String[0]);
    b.setParameter("stopId", stopIds);

    boolean allRoutesIncluded = true;
    List<String> routeIds = new ArrayList<String>();

    for (Map.Entry<String, Boolean> entry : _routeSelectionById.entrySet()) {
      if (entry.getValue())
        routeIds.add(entry.getKey());
      else
        allRoutesIncluded = false;
    }

    if (!allRoutesIncluded) {
      String[] routeIdsArray = routeIds.toArray(new String[routeIds.size()]);
      b.setParameter("routeId", routeIdsArray);
    }

    System.out.println(b.buildString());
    Location.assign(b.buildString());
  }
View Full Code Here

Examples of org.opensaml.util.URLBuilder

        Endpoint endpoint = messageContext.getPeerEntityEndpoint();
        if (endpoint == null) {
            throw new MessageEncodingException("Endpoint for relying party was null.");
        }

        URLBuilder urlBuilder;
        if (messageContext.getOutboundSAMLMessage() instanceof Response
                && !DatatypeHelper.isEmpty(endpoint.getResponseLocation())) {
            urlBuilder = new URLBuilder(endpoint.getResponseLocation());
        } else {
            if (DatatypeHelper.isEmpty(endpoint.getLocation())) {
                throw new MessageEncodingException("Relying party endpoint location was null or empty.");
            }
            urlBuilder = new URLBuilder(endpoint.getLocation());
        }
       
        if(!getAllowedURLSchemes().contains(urlBuilder.getScheme())){
           throw new MessageEncodingException("Relying party endpoint used the untrusted URL scheme " + urlBuilder.getScheme());
        }
        return urlBuilder;
    }
View Full Code Here

Examples of org.thechiselgroup.choosel.core.client.util.url.UrlBuilder

        return sharePanel;
    }

    protected String createUrl(Long id, String applicationMode) {
        // TODO create url builder factory that creates same host urls
        UrlBuilder urlBuilder = new UrlBuilder();

        urlBuilder.setProtocol(HTTP);
        urlBuilder.setHost(Window.Location.getHost());
        urlBuilder.setPath(Window.Location.getPath());
        urlBuilder.setParameter(WorkbenchInitializer.VIEW_ID, id.toString());
        urlBuilder.setParameter(
                ChooselApplicationInitializer.APPLICATION_MODE_PARAMETER,
                applicationMode);

        if (ChooselApplicationInitializer.EMBED.equals(applicationMode)) {
            urlBuilder.setParameter(EmbedInitializer.EMBED_MODE_PARAMETER,
                    StoredViewEmbedLoader.EMBED_MODE);
        }

        String gwtHost = Window.Location.getParameter(GWT_CODESVR);
        if (gwtHost != null) {
            urlBuilder.setParameter(GWT_CODESVR, gwtHost);
        }

        return urlBuilder.buildString();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.