Package org.apache.wink.webdav.model

Examples of org.apache.wink.webdav.model.Lockinfo


            return response;
        }

        // parse the request
        Unmarshaller unmarshaller = WebDAVModelHelper.createUnmarshaller();
        Lockinfo lockinfo =
            WebDAVModelHelper.unmarshal(unmarshaller,
                                        new StringReader(body),
                                        Lockinfo.class,
                                        "lockinfo");

        // make a response
        Activelock activelock = new Activelock();
        // set lock type from the request
        activelock.setLocktype(lockinfo.getLocktype());
        // set lock scope from the request
        activelock.setLockscope(lockinfo.getLockscope());
        // set 0 depth
        activelock.setDepth("0");
        // set owner from the request
        activelock.setOwner(lockinfo.getOwner());
        // set infinite timeout
        activelock.setTimeout(LOCK_TIMEOUT);
        // a lock token is not necessary for MS compatibility

        Lockdiscovery lockdiscovery = new Lockdiscovery();
View Full Code Here


            }
        };
        request.setMethod(WebDAVMethod.LOCK.name());
        request.setRequestURI(path);
        request.setContentType(MediaType.APPLICATION_XML);
        Lockinfo lockinfo = new Lockinfo();
        Lockscope lockscope = new Lockscope();
        lockscope.setExclusive(new Exclusive());
        lockinfo.setLockscope(lockscope);
        Locktype locktype = new Locktype();
        locktype.setWrite(new Write());
        lockinfo.setLocktype(locktype);
        StringWriter writer = new StringWriter();
        WebDAVModelHelper.marshal(WebDAVModelHelper.createMarshaller(),
                                  lockinfo,
                                  writer,
                                  "lockinfo");
View Full Code Here

            return response;
        }

        // parse the request
        Unmarshaller unmarshaller = WebDAVModelHelper.createUnmarshaller();
        Lockinfo lockinfo =
            WebDAVModelHelper.unmarshal(unmarshaller,
                                        new StringReader(body),
                                        Lockinfo.class,
                                        "lockinfo"); //$NON-NLS-1$

        // make a response
        Activelock activelock = new Activelock();
        // set lock type from the request
        activelock.setLocktype(lockinfo.getLocktype());
        // set lock scope from the request
        activelock.setLockscope(lockinfo.getLockscope());
        // set 0 depth
        activelock.setDepth("0"); //$NON-NLS-1$
        // set owner from the request
        activelock.setOwner(lockinfo.getOwner());
        // set infinite timeout
        activelock.setTimeout(LOCK_TIMEOUT);
        // a lock token is not necessary for MS compatibility

        Lockdiscovery lockdiscovery = new Lockdiscovery();
View Full Code Here

            }
        };
        request.setMethod(WebDAVMethod.LOCK.name());
        request.setRequestURI(path);
        request.setContentType(MediaType.APPLICATION_XML);
        Lockinfo lockinfo = new Lockinfo();
        Lockscope lockscope = new Lockscope();
        lockscope.setExclusive(new Exclusive());
        lockinfo.setLockscope(lockscope);
        Locktype locktype = new Locktype();
        locktype.setWrite(new Write());
        lockinfo.setLocktype(locktype);
        StringWriter writer = new StringWriter();
        WebDAVModelHelper.marshal(WebDAVModelHelper.createMarshaller(),
                                  lockinfo,
                                  writer,
                                  "lockinfo");
View Full Code Here

TOP

Related Classes of org.apache.wink.webdav.model.Lockinfo

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.