Package com.adito.core.stringreplacement

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


    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));
    }
   
    // Host. TODO check host only contains SPACE,a-z,A-Z and - and doesn't begin with -
View Full Code Here


   
    // Host. TODO check host only contains SPACE,a-z,A-Z and - and doesn't begin with -
    String host = null;
    //if(getStore().getProvider().getHostRequirement() == VFSProvider.ELEMENT_REQUIRED) {   
    if(!Util.isNullOrTrimmedBlank(getNetworkPlace().getHost())) {   
      host = r.replace(getNetworkPlace().getHost());
    }

    // Port. Integer. A port of -1 signifies default (0 means default in network place)
    int port = -1;
    // This test seems wrong because as all provider don't have port required.
View Full Code Here

      if(getNetworkPlace().getPort() > 0) {   
      port = getNetworkPlace().getPort();
    }

    // Path. Always required. Replaced and encoded.
    String path = DAVUtilities.encodePath(r.replace(getNetworkPlace().getPath().replace('\\', '/')), charset);
        if(!Util.isNullOrTrimmedBlank(path) && !path.startsWith("/") && !path.startsWith("./")) {
          path = "/" + path;
        }
       
        // Query String. TODO we need to support
View Full Code Here

   
    Request buildLocalTunnel(Tunnel tunnel, LaunchSession launchSession) throws IOException {
      // Process destination host and port for replacement variables
      VariableReplacement r = new VariableReplacement();
      r.setLaunchSession(launchSession);
      String destHost = r.replace(tunnel.getDestination().getHost());
     
        ByteArrayWriter msg = new ByteArrayWriter();
        msg.writeString(launchSession == null ? "" : launchSession.getId());
        msg.writeInt(tunnel.getResourceId());
        msg.writeString(tunnel.getResourceName());
View Full Code Here

     */
    public void run() {
      // Process destination host and port for replacement variables
      VariableReplacement r = new VariableReplacement();
      r.setLaunchSession(launchSession);
      String destHost = r.replace(tunnel.getDestination().getHost());
     
      ByteArrayWriter msg = new ByteArrayWriter();
     
      try {
       
View Full Code Here

            VariableReplacement r = new VariableReplacement();
            r.setApplicationShortcut(app, null);
            r.setServletRequest(request);
            r.setLaunchSession(launchSession);
           
            entry.setValue(r.replace(content));
        }

        if (log.isDebugEnabled())
          log.debug("Template loaded, doing standard replacements.");
View Full Code Here

        VariableReplacement r = new VariableReplacement();
        r.setApplicationShortcut(app, shortcut.getParameters());
        r.setServletRequest(request);
        r.setLaunchSession(launchSession);       
        String templateText = r.replace(template.toString());

        ReplacementEngine engine = new ReplacementEngine();

        String tunnels = request.getParameter("tunnels");
        if (tunnels != null && !tunnels.equals("")) {
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.