Package er.extensions.foundation

Examples of er.extensions.foundation.ERXMutableURL.toExternalForm()


      response._appendTagAttributeAndValue("class", (String) _class.valueInComponent(component), true);
    }
    if (_alt != null) {
      response._appendTagAttributeAndValue("alt", (String) _alt.valueInComponent(component), true);
    }
    String chartSrc = WOMessage.stringByEscapingHTMLAttributeValue(chartUrl.toExternalForm());
    response._appendTagAttributeAndValue("src", chartSrc, false);
    response._appendTagAttributeAndValue("width", String.valueOf(width), false);
    response._appendTagAttributeAndValue("height", String.valueOf(height), false);
    response.appendContentString("/>");
  }
View Full Code Here


          }
          try {
            _url = context._directActionURL(directActionName, queryDictionary, secure, 0, false);
            ERXMutableURL u = new ERXMutableURL(_url);
            u.addQueryParameter(String.valueOf(System.currentTimeMillis()), null);
            _url = u.toExternalForm();
          } catch (MalformedURLException e) {
            throw new NSForwardException(e);
          } finally {
            if(!generatingCompleteURLs) {
              context.generateRelativeURLs();
View Full Code Here

        response.appendContentString("<a href = \"");
        if (_download != null && _download.booleanValueInComponent(component)) {
          try {
            ERXMutableURL attachmentMutableUrl = new ERXMutableURL(attachmentUrl);
            attachmentMutableUrl.addQueryParameter("attachment", "true");
            attachmentUrl = attachmentMutableUrl.toExternalForm();
          }
          catch (MalformedURLException e) {
            throw new RuntimeException("Failed to create attachment URL.", e);
          }
        }
View Full Code Here

      }
      if (version != null) {
        try {
          ERXMutableURL url = new ERXMutableURL(resourceUrl);
          url.addQueryParameter("", version);
          resourceUrl = url.toExternalForm();
        }
        catch (MalformedURLException e) {
          ERXResourceManager.log.error("Failed to construct URL from '" + resourceUrl + "'.", e);
        }
      }
View Full Code Here

            mu.setProtocol("http");
          }
        }
      }

      url = mu.toExternalForm();
    }
    catch (MalformedURLException e) {
      throw new RuntimeException("Failed to create url for direct action '" + directActionName + "'.", e);
    }
    finally {
View Full Code Here

  protected String queryParametersString() {
    String queryParametersString = null;
    if (_queryParameters != null && _queryParameters.count() > 0) {
      ERXMutableURL u = new ERXMutableURL();
      u.setQueryParameters(_queryParameters);
      queryParametersString = u.toExternalForm();
    }
    return queryParametersString;
  }
 
  protected NSDictionary<String, Object> directActionQueryParameters() {
View Full Code Here

      try {
      ERXMutableURL url = new ERXMutableURL(urlString);
      if (!url.containsQueryParameter(sessionIdKey)) {
        url.setQueryParameter(sessionIdKey, session.sessionID());
      }
      return url.toExternalForm();
    }
    catch (MalformedURLException e) {
      _log.error("invalid URL string: " + urlString, e);
    }
     
View Full Code Here

  public String clickToDebugUrl() {
    try {
      ERXMutableURL url = new ERXMutableURL(context().componentActionURL());
      url.addQueryParameter("component", "REPLACEME");
      return url.toExternalForm();
    }
    catch (MalformedURLException e) {
      System.err.println("WOLClickToOpen.clickToDebugUrl failed to generate a URL: " + e.getMessage());
      return "http://broken";
    }
View Full Code Here

    queryParameters.setQueryParameter("context", ERXStringUtilities.stripHtml(content, false));
    queryParameters.setQueryParameter("output", "xml");
    if (context != null) {
      queryParameters.setQueryParameter("context", ERXStringUtilities.stripHtml(context, false));
    }
    String postData = queryParameters.toExternalForm();

    HttpURLConnection conn = (HttpURLConnection) new URL("http://search.yahooapis.com/ContentAnalysisService/V1/termExtraction").openConnection();
    NSMutableArray<String> terms = new NSMutableArray<String>();
    try {
      conn.setRequestMethod("POST");
View Full Code Here

              }
              try {
                href = context._directActionURL(directActionName, queryDictionary, secure, 0, false);
                ERXMutableURL u = new ERXMutableURL(href);
                u.addQueryParameter(String.valueOf(System.currentTimeMillis()), null);
                href = u.toExternalForm();
              }
              catch (MalformedURLException e) {
                throw new NSForwardException(e);
              }
              finally {
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.