You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by "Park, Sung-Gu" <je...@thinkfree.com> on 2000/12/10 20:15:19 UTC

Additional Contructors for Webdav Methods

I think they make you to set-up methods easier...

==========================================

public class CopyMethod ................

<snip>

   public CopyMethod() {
        name = "COPY";
    }

    public CopyMethod(String source, String destination) {
        this();
        this.path = source;
        this.destination = destination;
    }

    public CopyMethod(String source, String destination,
        boolean overwrite, int depth) {
        this();
        this.path = source;
        this.destination = destination;
        this.overwrite = overwrite;
        this.depth = depth;
    }

================================================


public class DeleteMethod ................ {
<snip>
    public DeleteMethod() {
        name = "DELETE";
    }

    public DeleteMethod(String path) {
        this();
        this.path = path;
    }

==========================================

public class GetMethod ................ {

<snip>

   public GetMethod() {
        name = "GET";
    }

    public GetMethod(String path) {
        this();
        this.path = path;
    }

    public void setCachePath(String rel_path) {
        checkNotUsed();
        TEMP_DIR = rel_path;
    }

    public String getCachePath(String rel_path) {
        return TEMP_DIR;
    }

==========================================

public class HeadMethod ................ {

    public HeadMethod() {
        name = "HEAD";
    }

    public HeadMethod(String path) {
        this();
        this.path = path;
    }

===============================================

public class LockMethod ................

<snip>

    public LockMethod() {
        name = "LOCK";
    }


    public LockMethod(String path, String owner) {

        this();
        this.path = path;
        this.owner = owner;
    }

    public LockMethod(String path, int depth, long timeout, short scope,
        String owner) {

        this();
        this.path = path;
        this.depth = depth;
        this.timeout = timeout;
        this.scope = scope;
        this.owner = owner;
    }


=============================================

public class MkcolMethod ................ {

    public MkcolMethod() {
        name = "MKCOL";
    }

    public MkcolMethod(String path) {
        this();
        this.path = path;
    }


=============================================


public class MoveMethod extends CopyMethod {

    public MoveMethod() {
        name = "MOVE";
    }

    public MoveMethod(String source, String destination) {
        super(source, destination);
        name = "MOVE";
    }

    public MoveMethod(String source, String destination,
        boolean overwrite, int depth) {

        super(source, destination, overwrite, depth);
        name = "MOVE";
    }
}

=========================================

public class OptionsMethod ................ {
<snip>
    public OptionsMethod() {
        name = "OPTIONS";
    }

    public OptionsMethod(String path) {
        this();
        this.path = path;
    }

=========================================


public class PostMethod ................ {

    public PostMethod() {
        name = "POST";
    }

    public PostMethod(String path) {
        this();
        this.path = path;
    }

<snip>
======================================

public class PropFindMethod ................
<snip>

    public PropFindMethod() {
        name = "PROPFIND";
    }
   
    public PropFindMethod(String path) {
        this();
        this.path = path;
    }

    public PropFindMethod(String path, int depth, int type) {
        this();
        this.path = path;
        this.depth = depth;
        this.type = type;
    }

    public PropFindMethod(String path, int depth, int type,
        Enumeration propertyNames) {

        this();
        this.path = path;
        this.depth = depth;
        this.type = type;
        this.propertyNames = propertyNames;
    }

    public PropFindMethod(String path, int depth, Enumeration propertyNames) {

        this();
        this.path = path;
        this.depth = depth;
        this.type = BY_NAME; // prop
        this.propertyNames = propertyNames;
    }

<snip>
======================================================


public class PutMethod ................ {

<snip>
    public PutMethod() {
        name = "PUT";
    }

    public PutMethod(String path) {
        this();
        this.path = path;
    }

    public PutMethod(String path, byte[] data) {
        this();
        this.path = path;
        this.data = data;
    }

======================================================


public class UnlockMethod ................ {

<snip>
    public UnlockMethod() {
        name = "UNLOCK";
    }

    public UnlockMethod(String path, String lockToken) {
        this();
        this.lockToken = lockToken;
    }

==================================================