Return-Path: Delivered-To: apmail-incubator-chemistry-dev-archive@minotaur.apache.org Received: (qmail 59631 invoked from network); 18 Feb 2011 23:06:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Feb 2011 23:06:59 -0000 Received: (qmail 22424 invoked by uid 500); 18 Feb 2011 23:06:59 -0000 Delivered-To: apmail-incubator-chemistry-dev-archive@incubator.apache.org Received: (qmail 22363 invoked by uid 500); 18 Feb 2011 23:06:59 -0000 Mailing-List: contact chemistry-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chemistry-dev@incubator.apache.org Delivered-To: mailing list chemistry-dev@incubator.apache.org Received: (qmail 22349 invoked by uid 99); 18 Feb 2011 23:06:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 23:06:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Feb 2011 23:06:58 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 7F3061A1485 for ; Fri, 18 Feb 2011 23:06:38 +0000 (UTC) Date: Fri, 18 Feb 2011 23:06:38 +0000 (UTC) From: "Jeff Potts (JIRA)" To: chemistry-dev@incubator.apache.org Message-ID: <1763603242.2110.1298070398517.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <26325132.102291295603085429.JavaMail.jira@thor> Subject: [jira] Commented: (CMIS-295) Unable to set or retrieve Document "description" property a.k.a "summary" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CMIS-295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12996644#comment-12996644 ] Jeff Potts commented on CMIS-295: --------------------------------- It looks like you are using Alfresco as the back-end. In Alfresco, the description property (cm:description) is part of an aspect called cm:titled. The CMIS spec lacks support for aspects, but apparently there is a way to get/set aspect props via policies. At this time, however, cmislib lacks policy support. > Unable to set or retrieve Document "description" property a.k.a "summary" > ------------------------------------------------------------------------- > > Key: CMIS-295 > URL: https://issues.apache.org/jira/browse/CMIS-295 > Project: Chemistry > Issue Type: Bug > Components: python-cmislib > Environment: using revision 1038521 > Reporter: Bernhard Reutner-Fischer > Priority: Critical > > I want to createDocument and store a "Document description". > And i want to retrieve that description. > There is no way i can see to pass in the description. > When i manually set a description for a document in the underlying CMS then i cannot access that description anywhere in the properties! > The only spot where that description show up in the retrieved document is in it's XML-representation, as "" field, which is really, really inconvenient :) > So, both storing as well as retrieving the document description would be great to have! > TIA && cheers, > Gory details: > The creation looks something like this, for reference: > upload_form = DocumentUploadForm(request.POST, request.FILES) > if request.POST.get(u'add_document') and upload_form.is_valid(): > # we now have a django.core.files.uploadedfile.InMemoryUploadedFile > # Note: major takes a string, not a bool! # FIXME! > checkin_props = {u'major' : u'major_change' in request.POST and 'true' or 'false', > u'properties' : {u'cmis:description' : request.POST.get(u'document_description')} > } > ret = create(request, path, request.FILES['document'], auto_revision=True, checkin_props) > def create(request, foldername, filename, auto_revision=False, checkin_props={}): > repo = alf_Client(request, foldername + u'/' + filename.name) > checkinComment, doc_props = (None, None) > if u'checkinComment' in checkin_props: > checkinComment = checkin_props.pop(u'checkinComment') > if u'properties' in checkin_props: > doc_props = checkin_props.pop(u'properties') > if auto_revision: > try: > old = repo.fetch_path(unicode(foldername + u'/' + filename.name)) > except cmislib.exceptions.ObjectNotFoundException: > pass # just create a new one > else: > # create new revision. Omitted for brevity > alf_dir_rs, err = repo.fetch(foldername) > if err: > return err > filename.open('rb') > try: > doc = alf_dir_rs.createDocument(filename.name, > properties=doc_props, > contentFile=filename, > contentType=filename.content_type) > except: > # handler omitted for brevity -- This message is automatically generated by JIRA. - For more information on JIRA, see: http://www.atlassian.com/software/jira