Examples of NVPair


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

   }

   public void unlock(String nodeName, String lockToken) throws IOException, ModuleException
   {
      NVPair[] headers = new NVPair[3];
      headers[0] = new NVPair(HttpHeaders.CONTENT_TYPE, "text/xml; charset='utf-8'");
      headers[1] = new NVPair(HttpHeaders.CONTENT_LENGTH, Integer.toString("".length()));
      headers[2] = new NVPair(ExtHttpHeaders.LOCKTOKEN, "<" + lockToken + ">");

      HTTPResponse response = ExtensionMethod("UNLOCK", workspacePath + nodeName, "".getBytes(), headers);
      response.getStatusCode();
   }
View Full Code Here

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

   public void addVersionControl(String nodeName) throws IOException, ModuleException
   {
      NVPair[] headers = new NVPair[1];
      //      headers[0] = new NVPair(HttpHeaders.CONTENT_TYPE, "text/xml; charset='utf-8'");
      headers[0] = new NVPair(HttpHeaders.CONTENT_LENGTH, Integer.toString("".length()));

      HTTPResponse response = ExtensionMethod("VERSION-CONTROL", workspacePath + nodeName, "".getBytes(), headers);
      response.getStatusCode();
   }
View Full Code Here

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

   }

   public void checkIn(String nodeName) throws IOException, ModuleException
   {
      NVPair[] headers = new NVPair[1];
      headers[0] = new NVPair(HttpHeaders.CONTENT_LENGTH, Integer.toString("".length()));

      HTTPResponse response = ExtensionMethod("CHECKIN", workspacePath + nodeName, "".getBytes(), headers);
      response.getStatusCode();
   }
View Full Code Here

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

   }

   public void checkOut(String nodeName) throws IOException, ModuleException
   {
      NVPair[] headers = new NVPair[1];
      headers[0] = new NVPair(HttpHeaders.CONTENT_LENGTH, Integer.toString("".length()));

      HTTPResponse response = ExtensionMethod("CHECKOUT", workspacePath + nodeName, "".getBytes(), headers);
      response.getStatusCode();
   }
View Full Code Here

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

   }

   public HTTPResponse restore(String node, String version) throws IOException, ModuleException
   {
      NVPair[] query = new NVPair[1];
      query[0] = new NVPair("version", version);

      HTTPResponse response = Get(workspacePath + node, query);
      response.getStatusCode();

      return response;
View Full Code Here

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

   public HTTPResponse moveNode(String path, String destination) throws IOException, ModuleException
   {
      NVPair[] headers = new NVPair[2];
      headers[0] =
         new NVPair(ExtHttpHeaders.DESTINATION, this.getProtocol() + "://" + this.getHost() + ":" + this.getPort()
            + workspacePath + destination);
      headers[1] = new NVPair(HttpHeaders.CONTENT_LENGTH, Integer.toString("".length()));

      HTTPResponse response = ExtensionMethod("MOVE", workspacePath + path, "".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:searchrequest xmlns:D='DAV:'>" + "<D:xpath>" + query + "</D:xpath>"
            + "</D:searchrequest>";

      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("SEARCH", workspacePath, 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:searchrequest xmlns:D='DAV:'>" + "<D:sql>" + query + "</D:sql>"
            + "</D:searchrequest>";

      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("SEARCH", workspacePath, xmlBody.getBytes(), headers);
      response.getStatusCode();

      return response;
View Full Code Here

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

            resp = connection.Post(url.getFile());
         }
         else
         {
            NVPair[] pairs = new NVPair[2];
            pairs[0] = new NVPair("Content-Type", "application/json; charset=UTF-8");
            pairs[1] = new NVPair("Content-Length", Integer.toString(postData.length()));

            resp = connection.Post(url.getFile(), postData.getBytes(), pairs);
         }

         BackupAgentResponse responce = new BackupAgentResponse(resp.getData(), resp.getStatusCode());
View Full Code Here

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

   private void prepareRequestHeaders(HttpServletRequest httpRequest)
   {
      ArrayList<NVPair> hds = new ArrayList<NVPair>();
      for (Enumeration<String> en = httpRequest.getHeaderNames(); en.hasMoreElements();)
      {
         NVPair pair = null;
         String headerName = (String)en.nextElement();
         for (Enumeration<String> en2 = httpRequest.getHeaders(headerName); en2.hasMoreElements();)
         {
            pair = new NVPair(headerName, en2.nextElement());
         }
         hds.add(pair);
         this.headers = new NVPair[hds.size()];
         this.headers = hds.toArray(headers);
      }
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.