Package org.exoplatform.common.http.client

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


   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


    * @throws IOException
    * @throws ModuleException
    */
   public HTTPResponse addDir(String path) throws IOException, ModuleException
   {
      HTTPResponse mkCol = MkCol(workspacePath + path);
      mkCol.getStatusCode();
      return mkCol;
   }
View Full Code Here

   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

      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

      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

      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

      addBasicAuthorization(this.realm, this.user, this.pass);
   }

   public HTTPResponse addNode(String name, byte[] data) throws IOException, ModuleException
   {
      HTTPResponse response = Put(workspacePath + name, data);
      response.getStatusCode();
      return response;
   }
View Full Code Here

         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

    */
   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

      return Put(workspacePath + name, stream, headers);
   }

   public HTTPResponse removeNode(String name) throws IOException, ModuleException
   {
      HTTPResponse response = Delete(workspacePath + name);
      response.getStatusCode();

      return response;
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.common.http.client.HTTPResponse

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.