lockscope
Name: lockscope Namespace: DAV: Purpose: Specifies whether a lock is an exclusive lock, or a shared lock. <!ELEMENT lockscope (exclusive | shared) >
503504505506507508509510511512513514
@Override public String lock(String url) throws IOException { HttpLock entity = new HttpLock(url); Lockinfo body = new Lockinfo(); Lockscope scopeType = new Lockscope(); scopeType.setExclusive(new Exclusive()); body.setLockscope(scopeType); Locktype lockType = new Locktype(); lockType.setWrite(new Write()); body.setLocktype(lockType); entity.setEntity(new StringEntity(SardineUtil.toXml(body), UTF_8));
527528529530531532533534535536537538
@Override public void unlock(String url, String token) throws IOException { HttpUnlock entity = new HttpUnlock(url, token); Lockinfo body = new Lockinfo(); Lockscope scopeType = new Lockscope(); scopeType.setExclusive(new Exclusive()); body.setLockscope(scopeType); Locktype lockType = new Locktype(); lockType.setWrite(new Write()); body.setLocktype(lockType); this.execute(entity, new VoidResponseHandler());
442443444445446447448449450451452453
458459460461462463464465466467468469
244245246247248249250251252253254255
}; 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();