summaryrefslogtreecommitdiff
path: root/offapi/com
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2013-03-24 12:21:56 +0000
committerStephan Bergmann <sbergman@redhat.com>2013-08-15 16:55:23 +0200
commit41c05c607cd52d327f51cd986d21aa0cdafa1ae1 (patch)
treecd4e46179724845921dcf8aa03ef845cab1813ed /offapi/com
parent6e0d836ff120ba292ba52f3623a3dd9be04aefc2 (diff)
i121935 - UCB: new "addProperty" and "removeProperty" commands
(cherry picked from commit 3d5d60176c01f9d3504559b816281fca11aea403) Conflicts: offapi/com/sun/star/ucb/Content.idl offapi/com/sun/star/ucb/makefile.mk ucb/source/ucp/webdav/DAVProperties.cxx ucb/source/ucp/webdav/webdavcontent.cxx plus headerize.pl Change-Id: I59b270ef5a72271671ae0857d11f557eec829387
Diffstat (limited to 'offapi/com')
-rw-r--r--offapi/com/sun/star/ucb/Content.idl63
-rw-r--r--offapi/com/sun/star/ucb/PropertyCommandArgument.idl43
2 files changed, 104 insertions, 2 deletions
diff --git a/offapi/com/sun/star/ucb/Content.idl b/offapi/com/sun/star/ucb/Content.idl
index cb55c0ff48e5..4b2f1437a2f5 100644
--- a/offapi/com/sun/star/ucb/Content.idl
+++ b/offapi/com/sun/star/ucb/Content.idl
@@ -448,6 +448,65 @@ published service Content
</p>
</td>
</tr>
+ <tr>
+ <td>addProperty</td>
+ <td>void</td>
+ <td><type>PropertyCommandArgument</type> aCmdArg</td>
+ <td>
+ Adds a new properties to the content.
+ <p>
+ <member>PropertyCommandArgument::Property</member>
+ contains information about the property to be added.
+ <member>PropertyCommandArgument::DefaultValue</member>
+ may contain the default value for the property. Its type must
+ match the one specified in <member scope="com::sun::star::beans">Property::Type</member>.
+ </p>
+ <p>Note that the dynamic properties must be kept persistent. The
+ service <type>Store</type> (UCB persistence service) may be used to
+ implement this.</p>
+ <p><b>Important:</b> The implementation must at least support
+ adding properties of the following basic data types:</p>
+ <p>
+ <ul>
+ <li>boolean
+ <li>char
+ <li>byte
+ <li>string
+ <li>short
+ <li>long
+ <li>hyper
+ <li>float
+ <li>double
+ </ul>
+ </p>
+ <p>
+ Raises a <type scope="com::sun::star::beans">PropertyExistException</type>
+ if a property with the same name already exists;
+ <type scope="com::sun::star::beans">IllegalTypeException</type>
+ if the property has an unsupported type;
+ <type scope="com::sun::star::lang">IllegalArgumentException</type>
+ if the Name of the property is empty.</p>
+ <blockquote>
+ Note: This command replaces the deprecated interface method
+ <member scope="com::sun::star::beans">XPropertyContainer::addProperty</member>.
+ </blockquote>
+ </td>
+ </tr>
+ <tr>
+ <td>removeProperty</td>
+ <td>void</td>
+ <td>string PropertyName</td>
+ <td>Removes the properties from the content.
+ <p>Raises a <type scope="com::sun::star::beans">UnknownPropertyException</type>
+ if the property does not exist;
+ <type scope="com::sun::star::beans">NotRemoveableException</type>
+ if the property is not removable.</p>
+ <blockquote>
+ Note: This command replaces the deprecated interface method
+ <member scope="com::sun::star::beans">XPropertyContainer::removeProperty</member>.
+ </blockquote>
+ </td>
+ </tr>
</table>
<h3>Properties</h3>
@@ -785,7 +844,7 @@ published service Content
<td>TargetURL</td>
<td>string</td>
<td>for contents that are links to other contents, contains the URL of
- the target content</td>
+ the target content</td>
</tr>
<tr>
<td>TimeLimitStore</td>
@@ -796,7 +855,7 @@ published service Content
<td>UserName</td>
<td>string</td>
<td>contains a user name. (e.g. the user name needed to access a
- POP3-Account)</td>
+ POP3-Account)</td>
</tr>
<tr>
<td>VerificationMode</td>
diff --git a/offapi/com/sun/star/ucb/PropertyCommandArgument.idl b/offapi/com/sun/star/ucb/PropertyCommandArgument.idl
new file mode 100644
index 000000000000..f2130467925e
--- /dev/null
+++ b/offapi/com/sun/star/ucb/PropertyCommandArgument.idl
@@ -0,0 +1,43 @@
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * 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 .
+ */
+#ifndef __com_sun_star_ucb_PropertyCommandArgument_idl__
+#define __com_sun_star_ucb_PropertyCommandArgument_idl__
+
+#include <com/sun/star/beans/Property.idl>
+
+module com { module sun { module star { module ucb {
+
+/** The argument for the "addProperty" command.
+
+ @see XCommandProcessor
+ @since Apache OpenOffice 4.0
+*/
+struct PropertyCommandArgument
+{
+ /** The property that the command has to add.
+ */
+ com::sun::star::beans::Property Property;
+
+ /** The default value of the property.
+ */
+ any DefaultValue;
+};
+
+}; }; }; };
+
+#endif