Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 74405 invoked from network); 14 Aug 2009 13:55:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 14 Aug 2009 13:55:33 -0000 Received: (qmail 16746 invoked by uid 500); 14 Aug 2009 13:55:39 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 16645 invoked by uid 500); 14 Aug 2009 13:55:39 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 16635 invoked by uid 99); 14 Aug 2009 13:55:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2009 13:55:39 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Aug 2009 13:55:35 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C3BC5234C045 for ; Fri, 14 Aug 2009 06:55:14 -0700 (PDT) Message-ID: <1596145544.1250258114797.JavaMail.jira@brutus> Date: Fri, 14 Aug 2009 06:55:14 -0700 (PDT) From: "Ingo Maas (JIRA)" To: issues@commons.apache.org Subject: [jira] Commented: (VFS-263) WebdavFileObject does not implement doSetAttribute() In-Reply-To: <2130868335.1244535487352.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/VFS-263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743204#action_12743204 ] Ingo Maas commented on VFS-263: ------------------------------- The way I've solved it for me: //// protected void doSetAttribute(String attrName, Object value) throws Exception { try { URLFileName fileName = (URLFileName) getName(); String urlStr = urlString( fileName); DavPropertySet properties = new DavPropertySet(); DavPropertyNameSet propertyNameSet = new DavPropertyNameSet(); DavProperty property = new DefaultDavProperty( attrName, value, Namespace.EMPTY_NAMESPACE); if (value != null) { properties.add( property); } else { propertyNameSet.add( property.getName() ); // remove porperty } PropPatchMethod method = new PropPatchMethod( urlStr, properties, propertyNameSet); setupMethod( method); execute( method); if (!method.succeeded() ) { throw new FileSystemException("Property '" + attrName + "' could not be set."); } } catch (FileSystemException fse) { throw fse; } catch (Exception e) { throw new FileSystemException("vfs.provider.webdav/propfind.error", getName(), e); } } > WebdavFileObject does not implement doSetAttribute() > ---------------------------------------------------- > > Key: VFS-263 > URL: https://issues.apache.org/jira/browse/VFS-263 > Project: Commons VFS > Issue Type: Bug > Affects Versions: 2.0 > Environment: all > Reporter: Ingo Maas > Original Estimate: 0.08h > Remaining Estimate: 0.08h > > Usually, WebDAV servers allow to read from _and_ write to properties (attributes in VFS speech) of a WebDAV resource. > Though WebdavFileObject in current TRUNK allows to read those properties, it doesn't allow to write them. WebdavFileObject should implement doSetAttribute() to fully support WebDAV properties. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.