Package com.adito.core.stringreplacement

Examples of com.adito.core.stringreplacement.VariableReplacement.replace()


    ReplacementProxyWebForward f = (ReplacementProxyWebForward) launchSession.getResource();

    VariableReplacement r = new VariableReplacement();
    r.setServletRequest(request);
    r.setLaunchSession(launchSession);
    String destinationURL = r.replace(f.getDestinationURL());

    CoreEvent evt = new ResourceAccessEvent(this,
                        WebForwardEventConstants.WEB_FORWARD_STARTED,
            f,
            launchSession.getPolicy(),
View Full Code Here


            ((WebForwardTypeItem) WebForwardTypes.WEB_FORWARD_TYPES.get(wf.getType())).getName());
        CoreServlet.getServlet().fireCoreEvent(evt);
       
        VariableReplacement replacer = new VariableReplacement();
        replacer.setLaunchSession(launchSession);
        URL url = new URL(replacer.replace(wf.getDestinationURL()));
        MultiplexedConnection agent = DefaultAgentManager.getInstance().getAgentBySession(getSessionInfo(request));
        int port = DefaultAgentManager.getInstance().openURL((AgentTunnel)agent, url, launchSession);
        if(port == -1) {
          throw new Exception("Agent couldn't open tunnel.");
        }
View Full Code Here

    VariableReplacement r = new VariableReplacement();
    r.setRequest(request);
    r.setSession(launchSession.getSession());
    r.setPolicy(launchSession.getPolicy());

    URL target = new URL(r.replace(webForward.getDestinationURL()));

    if (log.isDebugEnabled()) {
      log.debug("Reverse proxy target  " + target.toExternalForm());
    }
    return target;
View Full Code Here

      StringTokenizer tokens = new StringTokenizer(webForward.getFormParameters(), "\n");
      int idx;
      String param;
     
      while (tokens.hasMoreTokens()) {
        param = v.replace(tokens.nextToken().trim());
        idx = param.indexOf('=');
        if (idx > -1) {
          method.addParameter(param.substring(0, idx), param.substring(idx + 1));
        } else
          method.addParameter(param, "");
View Full Code Here

      }

      VariableReplacement r = new VariableReplacement();
      r.setApplicationShortcut(app, null);
      r.setSession(sessionInfo);
      p.setAttribute("value", r.replace(value));
    }

    XMLOutputter output = new XMLOutputter();
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    output.output(element, out);
View Full Code Here

        VariableReplacement r = new VariableReplacement();
        r.setRequest(request);
        r.setSession(launchSession.getSession());
        r.setPolicy(launchSession.getPolicy());
        String actualURL = r.replace(webForward.getDestinationURL());
       
        if (proxyURIDetails.getProxiedURL() == null) {
            throw new Exception("No sslex_url parameter provided.");
        }
       
View Full Code Here

    }

    VariableReplacement r = new VariableReplacement();
    r.setApplicationShortcut(app, parameters);
    r.setSession(sessionInfo);
    String processed = r.replace(xml);

    if (log.isDebugEnabled())
      log.debug("Returning '" + processed + "'");
    return processed;
  }
View Full Code Here

       */
     
      VariableReplacement r = new VariableReplacement();
      r.setServletRequest(request);
      r.setLaunchSession(launchSession);
      url = r.replace(url);

      CoreEvent evt = new ResourceAccessEvent(this,
                            WebForwardEventConstants.WEB_FORWARD_STARTED,
              wf,
              launchSession.getPolicy(),
View Full Code Here

      }
      name = name.substring(0, idx);
           
            VariableReplacement r = new VariableReplacement();
            r.setServletRequest(request);
            forward = r.replace(forward);           
    }

    StringBuffer buf = new StringBuffer(forward);
    if (includeParameters && !"".equals(forward)) {
      // Build up the URL to forard to
View Full Code Here

    r.setLaunchSession(getLaunchSession());
   
    // User info. Encoded
    String userinfo = null;   
    if(!Util.isNullOrTrimmedBlank(getNetworkPlace().getUsername())) {
        String username = r.replace(getNetworkPlace().getUsername());
        String password = null;
        if(!Util.isNullOrTrimmedBlank(getNetworkPlace().getPassword())) {
            password = r.replace(getNetworkPlace().getPassword());
        }
            userinfo = DAVUtilities.encodeURIUserInfo(username + (password == null ? "" : ":" + password));
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.