Examples of HttpURL


Examples of org.apache.commons.httpclient.HttpURL

    public void setHttpURL(HttpURL httpURL, String additionalPath)
        throws HttpException, IOException {

        setHttpURL(httpURL instanceof HttpsURL
                   ? new HttpsURL((HttpsURL) httpURL, additionalPath)
                   : new HttpURL(httpURL, additionalPath),
                   defaultAction, defaultDepth);
    }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

    public void setHttpURL(String escapedHttpURL)
        throws HttpException, IOException {

        setHttpURL(escapedHttpURL.startsWith("https")
                   ? new HttpsURL(escapedHttpURL)
                   : new HttpURL(escapedHttpURL));
    }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

  
   protected void downloadFileset(WebdavFileSet fileSet) throws IOException
   {
      CollectionScanner scanner =
          fileSet.getCollectionScanner(getProject(), getHttpClient(), getUrl());
      HttpURL baseUrl = scanner.getBaseURL();
     
      String[] files = scanner.getIncludedFiles();
      for (int i = 0; i < files.length; i++) {
         HttpURL url = Utils.createHttpURL(baseUrl, files[i]);
         downloadFile(url, files[i], scanner);
      }
   }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

     */
    public HttpURL getHttpURLExceptForUserInfo()
        throws URIException {

        return httpURL instanceof HttpsURL ? new HttpsURL(httpURL.getRawURI())
                                           : new HttpURL(httpURL.getRawURI());
    }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

     * @return the value 0 if the argument is equal.
     */
    public int compareToWebdavResource(WebdavResource another) {

        try {
            HttpURL anotherUrl = another.getHttpURL();

            String thisHost = httpURL.getHost();
            String anotherHost= anotherUrl.getHost();
            if (!thisHost.equalsIgnoreCase(anotherHost))
                return thisHost.compareTo(anotherHost);

            int thisPort = httpURL.getPort();
            int anotherPort= anotherUrl.getPort();
            if (thisPort != anotherPort)
                return (thisPort < anotherPort) ? -1 : 1;

            boolean thisCollection = isCollection();
            boolean anotherCollection = another.isCollection();
            if (thisCollection && !anotherCollection)
                return -1;
            if (anotherCollection && !thisCollection)
                return 1;

            String thisPath = httpURL.getPathQuery();
            String anotherPath= anotherUrl.getPathQuery();
            return thisPath.compareTo(anotherPath);
        } catch (Exception e) {
            // FIXME: not to return 0.
        }

View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

     * @param password password for login to the Slide (WebDAV) server
     * @param timeout timeout of the externally controlled transaction
     * @throws URIException if the given uri is not a valid one
     */
    public WebDAVConnectionSpec(String url, String userName, String password, int timeout) throws URIException {
        this.httpURL = url.startsWith("https") ? new HttpsURL(url) : new HttpURL(url);
        this.httpURL.setUserinfo(userName, password);
        this.timeout = timeout;
    }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

   protected void proppatch(WebdavFileSet fileSet)
      throws IOException, HttpException
   {
      CollectionScanner scanner =
         fileSet.getCollectionScanner(getProject(), getHttpClient(), getUrl());
      HttpURL baseUrl = scanner.getBaseURL();
    
      String[] files = scanner.getIncludedFiles();
      for (int i = 0; i < files.length; i++) {
         HttpURL url = Utils.createHttpURL(baseUrl, files[i]);
         proppatch(url, files[i]);
      }
      String[] colls = scanner.getIncludedDirectories();
      for (int i = 0; i < colls.length; i++) {
         HttpURL url = Utils.createHttpURL(baseUrl, colls[i]);
         proppatch(url, colls[i]);
      }
   }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

   private void deleteFileset(WebdavFileSet fileSet)
      throws IOException, HttpException
   {
      CollectionScanner scanner =
         fileSet.getCollectionScanner(getProject(), getHttpClient(), getUrl());
      HttpURL baseUrl = scanner.getBaseURL();
    
      String[] files = scanner.getIncludedFiles();
      for (int i = 0; i < files.length; i++) {
         HttpURL url = Utils.createHttpURL(baseUrl, files[i]);
         delete(url, files[i]);
      }
      String[] colls = scanner.getIncludedDirectories();
      for (int i = 0; i < colls.length; i++) {
         HttpURL url = Utils.createHttpURL(baseUrl, colls[i]);
         delete(url, colls[i]);
      }
   }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

   * @param pathname complete path to element
   * @param user user name
   * @param pass password
   */
  public WebdavFile(String pathname, String user, String pass) throws URIException {
    this(new HttpURL(user, pass, null, -1, pathname));
  }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

   * @param pass password
   */
  public WebdavFile(URL url, String user, String pass) throws URIException {
    this(url.getProtocol().equals("https")
        ? new HttpsURL(user, pass, url.getHost(), url.getPort(), url.getPath())
        : new HttpURL(user, pass, url.getHost(), url.getPort(), url.getPath()));
  }
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.