Package org.gatein.pc.api

Examples of org.gatein.pc.api.URLFormat


      markup = processMarkup(
         markup,
         WSRPTypeFactory.getNamespaceFrom(invocation.getWindowContext()),
         invocation.getContext(),
         invocation.getTarget(),
         new URLFormat(securityContext.isSecure(), securityContext.isAuthenticated(), true, true),
         consumer
      );
      return markup;
   }
View Full Code Here


            match = match.replaceAll("\\\\x2D", "-").replaceAll("\\\\x26", "&");
         }

         WSRPPortletURL portletURL = WSRPPortletURL.create(match, supportedCustomModes, supportedCustomWindowStates, true);

         URLFormat urlFormat;
         // If the current url is using & then specify we want to use xml escaped ampersands
         if (match.contains("&"))
         {
            urlFormat = new URLFormat(format.getWantSecure(), format.getWantAuthenticated(), format.getWantRelative(), true);
         }
         else
         {
            urlFormat = new URLFormat(format.getWantSecure(), format.getWantAuthenticated(), format.getWantRelative(), false);
         }

         String value = context.renderURL(portletURL, urlFormat);

         // we now need to add back the javascript url encoding if it was originally used
View Full Code Here

   public String toString()
   {
      InternalContainerURL url = blah();

      //
      URLFormat format = FORMATS[0][secure];

      //
      PortletInvocationContext responseContext = inv.getContext();

      //
View Full Code Here

   public void write(Writer writer, boolean b) throws IOException
   {
      InternalContainerURL url = blah();

      //
      URLFormat format = FORMATS[b ? 1 : 0][secure];

      //
      PortletInvocationContext responseContext = inv.getContext();

      //
View Full Code Here

      markup = Tools.replace(markup, WSRPRewritingConstants.WSRP_REWRITE_TOKEN, prefix);

      if (rewriteURLs)
      {
         URLFormat format = new URLFormat(invocation.getSecurityContext().isSecure(),
            invocation.getSecurityContext().isAuthenticated(), true, true);
         WSRPURLRewriter rewriter = new WSRPURLRewriter(invocation.getContext(), format, consumer);
         markup = URLTools.replaceURLsBy(markup, rewriter);
      }
View Full Code Here

      markup = processMarkup(
         markup,
         WSRPTypeFactory.getNamespaceFrom(invocation.getWindowContext()),
         invocation.getContext(),
         invocation.getTarget(),
         new URLFormat(securityContext.isSecure(), securityContext.isAuthenticated(), true, true),
         consumer
      );
      return markup;
   }
View Full Code Here

         }

         WSRPPortletURL portletURL = WSRPPortletURL.create(match, supportedCustomModes, supportedCustomWindowStates, true);

         // escaping format needs to be unique for each processed URL so create a new URLFormat based on what was originally asked but with tailored encoding
         URLFormat urlFormat;
         // If the current url is using & then specify we want to use xml escaped ampersands
         if (match.contains("&"))
         {
            urlFormat = new URLFormat(format.getWantSecure(), format.getWantAuthenticated(), format.getWantRelative(), true);
         }
         else
         {
            urlFormat = new URLFormat(format.getWantSecure(), format.getWantAuthenticated(), format.getWantRelative(), false);
         }

         String value = context.renderURL(portletURL, urlFormat);

         // If Javascript encoding was used, we need to re-escape the URL for Javascript
View Full Code Here

      return templates;
   }

   private static String createTemplate(PortletInvocationContext context, ContainerURL url, Boolean secure)
   {
      String template = context.renderURL(url, new URLFormat(secure, null, null, true));
      template = TextTools.replace(template, WSRPRewritingConstants.ENC_OPEN, WSRPRewritingConstants.REWRITE_PARAMETER_OPEN);
      template = TextTools.replace(template, WSRPRewritingConstants.ENC_CLOSE, WSRPRewritingConstants.REWRITE_PARAMETER_CLOSE);

      // fix for GTNWSRP-22
      if (RESOURCE_URL.equals(url))
View Full Code Here

      return templates;
   }

   private static String createTemplate(PortletInvocationContext context, ContainerURL url, Boolean secure)
   {
      String template = context.renderURL(url, new URLFormat(secure, null, null, true));
      template = TextTools.replace(template, WSRPRewritingConstants.ENC_OPEN, WSRPRewritingConstants.REWRITE_PARAMETER_OPEN);
      template = TextTools.replace(template, WSRPRewritingConstants.ENC_CLOSE, WSRPRewritingConstants.REWRITE_PARAMETER_CLOSE);

      // fix for GTNWSRP-22
      if (RESOURCE_URL.equals(url))
View Full Code Here

   public String toString()
   {
      InternalContainerURL url = blah();

      //
      URLFormat format = FORMATS[0][secure];

      //
      PortletInvocationContext responseContext = inv.getContext();

      //
View Full Code Here

TOP

Related Classes of org.gatein.pc.api.URLFormat

Copyright © 2018 www.massapicom. 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.