Return-Path: X-Original-To: apmail-chemistry-commits-archive@www.apache.org Delivered-To: apmail-chemistry-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 61ECF10ECF for ; Wed, 5 Mar 2014 09:18:49 +0000 (UTC) Received: (qmail 3354 invoked by uid 500); 5 Mar 2014 09:18:48 -0000 Delivered-To: apmail-chemistry-commits-archive@chemistry.apache.org Received: (qmail 2417 invoked by uid 500); 5 Mar 2014 09:18:41 -0000 Mailing-List: contact commits-help@chemistry.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@chemistry.apache.org Delivered-To: mailing list commits@chemistry.apache.org Received: (qmail 772 invoked by uid 99); 5 Mar 2014 09:18:38 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2014 09:18:38 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Mar 2014 09:18:35 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 370D723888D7; Wed, 5 Mar 2014 09:18:14 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1574399 - in /chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/scripts: mimetype.groovy script-library.properties Date: Wed, 05 Mar 2014 09:18:14 -0000 To: commits@chemistry.apache.org From: fmui@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20140305091814.370D723888D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: fmui Date: Wed Mar 5 09:18:13 2014 New Revision: 1574399 URL: http://svn.apache.org/r1574399 Log: Workbench: added change MIME type script Added: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/scripts/mimetype.groovy Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/scripts/script-library.properties Added: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/scripts/mimetype.groovy URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/scripts/mimetype.groovy?rev=1574399&view=auto ============================================================================== --- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/scripts/mimetype.groovy (added) +++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/scripts/mimetype.groovy Wed Mar 5 09:18:13 2014 @@ -0,0 +1,28 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +import org.apache.chemistry.opencmis.commons.data.* +import org.apache.chemistry.opencmis.client.api.* + +Document doc = session.getObject("..."); + +MutableContentStream contentStream = doc.getContentStream(); +contentStream.setMimeType("application/other"); + +doc.setContentStream(contentStream, true); \ No newline at end of file Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/scripts/script-library.properties URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/scripts/script-library.properties?rev=1574399&r1=1574398&r2=1574399&view=diff ============================================================================== --- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/scripts/script-library.properties (original) +++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/resources/scripts/script-library.properties Wed Mar 5 09:18:13 2014 @@ -34,3 +34,4 @@ upload.groovy = Upload a local folder to download.groovy = Download a repository folder to the local disk ping.groovy = Ping the repository stats.groovy = Count objects and bytes +mimetype.groovy = Change document MIME type