コード例 #1
0
 @PROPPATCH
 public Message proppatch(@PathTranslated Path path, @Context Request request, Depth depth)
     throws IOException {
   final Resource resource = resolveResource(path);
   final Iterable<QName> properties = getProperties(request.buffer());
   final List<RESPONSE> responses = propfind(properties, resource, depth);
   return successMultiStatus(multistatus(responses));
 }
コード例 #2
0
  @PUT
  public Message put(@PathTranslated Path path, @Context Request request) throws IOException {
    final Resource resource = resolveResource(path);
    if (!resource.parent().exists()) {
      return clientErrorConflict();
    }

    if (resource.exists() && resource.isCollection()) {
      return clientErrorMethodNotAllowed();
    }

    ByteBuffer entity = request.buffer();
    resource.put(entity);
    return successCreated();
  }
コード例 #3
0
 @PROPFIND
 public Message propfind(@PathTranslated Path path, Depth depth, @Context Request request)
     throws IOException {
   return propfind(path, depth, request.buffer());
 }