Examples of BaseURL


Examples of javax.portlet.BaseURL

    String stringValue = null;

    try {

      // Ask the Portlet Container for a BaseURL that contains the modified parameters.
      BaseURL baseURL = toBaseURL();

      // If the URL string has escaped characters (like %20 for space, etc) then ask the
      // portlet container to create an escaped representation of the URL string.
      if (isEscaped()) {
        StringWriter urlWriter = new StringWriter();

        try {
          baseURL.write(urlWriter, true);
        }
        catch (IOException e) {
          logger.error(e);
          stringValue = baseURL.toString();
        }

        stringValue = urlWriter.toString();
      }

      // Otherwise, ask the portlet container to create a normal (non-escaped) string
      // representation of the URL string.
      else {
        stringValue = baseURL.toString();
      }
    }
    catch (MalformedURLException e) {
      logger.error(e);
    }
View Full Code Here

Examples of javax.portlet.BaseURL

  }

  @Override
  protected BaseURL toBaseURL() throws MalformedURLException {

    BaseURL baseURL = null;

    // If this is executing during the ACTION_PHASE of the portlet lifecycle, then
    if (BridgeUtil.getPortletRequestPhase() == Bridge.PortletPhase.ACTION_PHASE) {

      // TCK NOTE: The only use-case in which the TCK will invoke this method is
View Full Code Here

Examples of javax.portlet.BaseURL

  }

  @Override
  protected BaseURL toBaseURL() throws MalformedURLException {

    BaseURL baseURL = null;

    // If this is executing during the ACTION_PHASE of the portlet lifecycle, then
    PortletPhase portletRequestPhase = BridgeUtil.getPortletRequestPhase();

    if (portletRequestPhase == Bridge.PortletPhase.ACTION_PHASE) {
View Full Code Here

Examples of javax.portlet.BaseURL

      }
   }

   protected BaseURL generateURL() throws Exception
   {
      BaseURL newPortletURL =  super.generateURL();

      if (!properties.isEmpty())
      {
         for (String name : properties.keySet())
         {
            List<String> props = properties.get(name);
            for (String prop : props)
            {
               newPortletURL.setProperty(name, prop);
            }
         }
      }

      return newPortletURL;
View Full Code Here

Examples of javax.portlet.BaseURL

      return EVAL_BODY_INCLUDE;
   }

   protected BaseURL generateURL() throws Exception
   {
      BaseURL newPortletURL = getBasePortletEnvironmentAndURL();

      setSecure(newPortletURL);

      // Include parameters as part of the tag request.

      if (!parameters.isEmpty())
      {
         newPortletURL.setParameters(getURLParameters());
      }
      return newPortletURL;
   }
View Full Code Here

Examples of javax.portlet.BaseURL

      return typeParameter;
   }

   protected BaseURL generateURL() throws Exception
   {
      BaseURL newPortletURL =  super.generateURL();

      setId((ResourceURL)newPortletURL);
      setCacheability((ResourceURL)newPortletURL);

      return newPortletURL;
View Full Code Here

Examples of org.sonatype.nexus.client.rest.BaseUrl

  }

  @Test
  public void testProxySettings() {
    when(connection.getProxyInfos()).thenReturn(ImmutableMap.of(HTTP, proxyInfo));
    when(connection.getBaseUrl()).thenReturn(new BaseUrl(HTTP, "otherhost", 8080, "path"));
    when(connection.getSslCertificateValidation()).thenReturn(ValidationLevel.STRICT);
    when(connection.getSslCertificateHostnameValidation()).thenReturn(ValidationLevel.LAX);

    when(proxyInfo.getProxyHost()).thenReturn("somehost");
    when(proxyInfo.getProxyPort()).thenReturn(8888);
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.