Examples of NVPair


Examples of HTTPClient.NVPair

    for (int i = 0; i < formParms.length; i++) {
      Map<String, String> parm = (HashMap<String, String>) formParms[i];
      for (Entry<String, String> entry : parm.entrySet()) {
        String key = entry.getKey();
        String value = entry.getValue();
        opts[i] = new NVPair(key, value);
      }
    }

    NVPair[] file;
    file = new NVPair[fileParms.length];
    for (int i = 0; i < fileParms.length; i++) {
      Map<String, String> parm = (HashMap<String, String>) fileParms[i];
      for (Entry<String, String> entry : parm.entrySet()) {
        String key = entry.getKey();
        String value = entry.getValue();
        URL configFile = getContext().getResource(value);
        file[i] = new NVPair(key, configFile.getFile());
      }
    }

    try {
      byte[] data = Codecs.mpFormDataEncode(opts, file, hdrs);
View Full Code Here

Examples of org.apache.beehive.netui.tools.testrecorder.shared.NVPair

    }

    public TestResults diffParams( NVPair[] record, NVPair[] playback,
            TestResults results ) throws DiffFailedException {
        // assumption: params are sorted.
        NVPair recPair = null;
        NVPair playPair = null;
        int i = 0;
        boolean match = false;
        if ( record != null ) {
            for ( i = 0; i < record.length; i++, match = false ) {
                recPair = record[i];
View Full Code Here

Examples of org.exoplatform.common.http.client.NVPair

   }

   public void addNode(String name, String nodeType, byte[] data) throws IOException, ModuleException
   {
      NVPair[] headers = new NVPair[1];
      headers[0] = new NVPair("File-NodeType", nodeType);
      Put(workspacePath + name, data, headers).getStatusCode();
   }
View Full Code Here

Examples of org.exoplatform.common.http.client.NVPair

      for (int i = 1; i < mixinTypes.length; i++)
      {
         mixins = mixins + ", " + mixinTypes[i];
      }
      NVPair[] headers = new NVPair[2];
      headers[0] = new NVPair(ExtHttpHeaders.CONTENT_MIXINTYPES, mixins);
      headers[1] = new NVPair(HttpHeaders.CONTENT_TYPE, "text/plain");
      HTTPResponse response = Put(workspacePath + name, data, headers);
      response.getStatusCode();
      return response;
   }
View Full Code Here

Examples of org.exoplatform.common.http.client.NVPair

    * @throws ModuleException
    */
   public HTTPResponse addNode(String name, byte[] data, String mimeType) throws IOException, ModuleException
   {
      NVPair[] headers = new NVPair[1];
      headers[0] = new NVPair(HttpHeaders.CONTENT_TYPE, mimeType);
      HTTPResponse response = Put(workspacePath + name, data, headers);
      response.getStatusCode();
      return response;
   }
View Full Code Here

Examples of org.exoplatform.common.http.client.NVPair

      String xmlBody =
         "<?xml version='1.0' encoding='utf-8' ?>" + "<D:propertyupdate xmlns:D='DAV:'>" + "<D:set>" + "<D:prop>" + "<"
            + property + ">value</" + property + ">" + "</D:prop>" + "</D:set>" + "</D:propertyupdate>";

      NVPair[] headers = new NVPair[2];
      headers[0] = new NVPair(HttpHeaders.CONTENT_TYPE, "text/xml; charset='utf-8'");
      headers[1] = new NVPair(HttpHeaders.CONTENT_LENGTH, Integer.toString(xmlBody.length()));

      HTTPResponse response = ExtensionMethod("PROPPATCH", workspacePath + nodeName, xmlBody.getBytes(), headers);
      response.getStatusCode();

      return response;
View Full Code Here

Examples of org.exoplatform.common.http.client.NVPair

      String xmlBody =
         "<?xml version='1.0' encoding='utf-8' ?>" + "<D:propertyupdate xmlns:D='DAV:'>" + "<D:set>" + "<D:prop>" + "<"
            + property + ">" + value + "</" + property + ">" + "</D:prop>" + "</D:set>" + "</D:propertyupdate>";

      NVPair[] headers = new NVPair[2];
      headers[0] = new NVPair(HttpHeaders.CONTENT_TYPE, "text/xml; charset='utf-8'");
      headers[1] = new NVPair(HttpHeaders.CONTENT_LENGTH, Integer.toString(xmlBody.length()));

      HTTPResponse response = ExtensionMethod("PROPPATCH", workspacePath + nodeName, xmlBody.getBytes(), headers);
      response.getStatusCode();

      return response;
View Full Code Here

Examples of org.exoplatform.common.http.client.NVPair

      String xmlBody =
         "<?xml version='1.0' encoding='utf-8' ?>" + "<D:propfind xmlns:D='DAV:' >" + "<D:prop><" + property
            + "/></D:prop>" + "</D:propfind>";

      NVPair[] headers = new NVPair[2];
      headers[0] = new NVPair(HttpHeaders.CONTENT_TYPE, "text/xml; charset='utf-8'");
      headers[1] = new NVPair(HttpHeaders.CONTENT_LENGTH, Integer.toString(xmlBody.length()));

      HTTPResponse response = ExtensionMethod("PROPFIND", workspacePath + nodeName, xmlBody.getBytes(), headers);
      response.getStatusCode();

      return response;
View Full Code Here

Examples of org.exoplatform.common.http.client.NVPair

         "<?xml version='1.0' encoding='utf-8' ?>"
            + "<D:propertyupdate xmlns:D='DAV:' xmlns:Z='http://www.w3.com/standards/z39.50/'>" + "<D:remove>"
            + "<D:prop><" + property + "/></D:prop>" + "</D:remove>" + "</D:propertyupdate>";

      NVPair[] headers = new NVPair[2];
      headers[0] = new NVPair(HttpHeaders.CONTENT_TYPE, "text/xml; charset='utf-8'");
      headers[1] = new NVPair(HttpHeaders.CONTENT_LENGTH, Integer.toString(xmlBody.length()));

      HTTPResponse response = ExtensionMethod("PROPPATCH", workspacePath + nodeName, xmlBody.getBytes(), headers);
      response.getStatusCode();

      return response;
View Full Code Here

Examples of org.exoplatform.common.http.client.NVPair

         "<?xml version='1.0' encoding='utf-8' ?>" + "<D:lockinfo xmlns:D='DAV:'>" + "<D:lockscope>" + "<D:exclusive/>"
            + "</D:lockscope>" + "<D:locktype>" + "<D:write/>" + "</D:locktype>" + "<D:owner>owner</D:owner>"
            + "</D:lockinfo>";

      NVPair[] headers = new NVPair[2];
      headers[0] = new NVPair(HttpHeaders.CONTENT_TYPE, "text/xml; charset='utf-8'");
      headers[1] = new NVPair(HttpHeaders.CONTENT_LENGTH, Integer.toString(xmlBody.length()));

      HTTPResponse response = ExtensionMethod("LOCK", workspacePath + nodeName, xmlBody.getBytes(), headers);

      response.getStatusCode();
      StringBuffer resp = new StringBuffer(new String(response.getData(), "UTF-8"));
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.