summaryrefslogtreecommitdiff
path: root/offapi/com/sun/star/resource
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2007-01-29 15:29:28 +0000
committerRüdiger Timm <rt@openoffice.org>2007-01-29 15:29:28 +0000
commitb931f256c856dc330264d59621f37ca5ae48629c (patch)
tree0e759eafda76267f037871fc1909185dde1b9eba /offapi/com/sun/star/resource
parent1fc0b4f5cef5e939ce0d5e4138a4e90a2ba8902f (diff)
INTEGRATION: CWS ab32 (1.1.2); FILE ADDED
2007/01/15 16:34:20 ab 1.1.2.1: #i73373# XStringResourcePersistance -> XStringResourcePersistence
Diffstat (limited to 'offapi/com/sun/star/resource')
-rw-r--r--offapi/com/sun/star/resource/XStringResourcePersistence.idl255
1 files changed, 255 insertions, 0 deletions
diff --git a/offapi/com/sun/star/resource/XStringResourcePersistence.idl b/offapi/com/sun/star/resource/XStringResourcePersistence.idl
new file mode 100644
index 000000000000..8375c749bd19
--- /dev/null
+++ b/offapi/com/sun/star/resource/XStringResourcePersistence.idl
@@ -0,0 +1,255 @@
+/*************************************************************************
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: XStringResourcePersistence.idl,v $
+ *
+ * $Revision: 1.2 $
+ *
+ * last change: $Author: rt $ $Date: 2007-01-29 16:29:28 $
+ *
+ * The Contents of this file are made available subject to
+ * the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ * GNU Lesser General Public License Version 2.1
+ * =============================================
+ * Copyright 2005 by Sun Microsystems, Inc.
+ * 901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1, as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ ************************************************************************/
+#ifndef __com_sun_star_resource_XStringResourcePersistence_idl__
+#define __com_sun_star_resource_XStringResourcePersistence_idl__
+
+#ifndef __com_sun_star_resource_XStringResourceManager_idl__
+#include <com/sun/star/resource/XStringResourceManager.idl>
+#endif
+
+#ifndef __com_sun_star_embed_XStorage_idl__
+#include <com/sun/star/embed/XStorage.idl>
+#endif
+
+#ifndef __com_sun_star_task_XInteractionHandler_idl__
+#include <com/sun/star/task/XInteractionHandler.idl>
+#endif
+
+
+//=============================================================================
+
+module com { module sun { module star { module resource {
+
+//=============================================================================
+/**
+ Interface derived from XStringResourceManager containing
+ basic persistence functionality limited to operations that
+ are independend from a associated location or storage.
+
+ @see <type>XStringResourceManager</type>.
+*/
+interface XStringResourcePersistence: com::sun::star::resource::XStringResourceManager
+{
+ /**
+ Stores all string table data respectively all data modified since
+ the last call to <member>store</member> to the location or storage
+ associated with the StringResourceManager. Each locale is stored
+ in a single file following the format of Java properties files.
+
+ This interface is supported by the services
+ <type>StringResourceWithLocation</type> and
+ <type>StringResourceWithStorage</type>
+
+ The StringResourceWithLocation is initialised with an URL
+ specifying a location used to load data from and store data to,
+ see <type>StringResourceWithLocation</type>.
+
+ The StringResourceWithStorage is initialised with an in-
+ stance of <type scope="com::sun::star::embed">XStorage</type>
+ used to load data from and store data to,
+ see <type>StringResourceWithStorage</type>.
+
+ If the string table isn't modified (see <member>isModified</member>)
+ this method does nothing.
+
+ This method can throw all exceptions thrown by the methods of
+ <type scope="com::sun::star::embed">XStorage</type> respectively
+ a <type scope="com::sun::star::ucb">CommandAbortedException in
+ case of a StringResourceWithLocation for all exceptions that are
+ not handled by a previously specified
+ <type scope="com::sun::star::task">XInteractionHandler</type>.
+ The handler to be used for the store operation can be specified
+ during initialisation of <type>StringResourceWithLocation</type>.
+
+ @throws <type scope="com::sun::star::lang">NoSupportException</type>
+ if no URL or no valid storage are provided.
+ */
+ void store()
+ raises( com::sun::star::lang::NoSupportException,
+ com::sun::star::uno::Exception );
+
+
+ /**
+ provides the current modify state of the StringResourceManager instance.
+
+ @return
+ <TRUE/> if the string table has changed since the last call to
+ <member>store</member> or, if supported
+ <code>XStringResourceWithStorage::storeAsStorage</code>.
+ <FALSE/> if the table hasn't changed.
+ */
+ boolean isModified();
+
+
+ /**
+ Sets the comment stored first in each locale data file.
+
+ This interface method can be used to overwrite the comment used
+ during initialisation of the services
+ <type>StringResourceWithLocation</type> or
+ <type>StringResourceWithStorage</type>
+
+ @param Comment
+ Comment stored first in each properties file followed by a line
+ feed character. The line feed character is added automatically
+ and hasn't to be part of the comment string. The caller is re-
+ sponsible that the passed string is a valid comment in a Java
+ properties file, e.g. "# My strings". The string may be empty.
+ */
+ void setComment( [in] string Comment );
+
+
+ /**
+ Stores all string table data to the provided storage.
+
+ Calling this method does not affect the association with a location
+ (in case of a <type>StringResourceWithLocation</type> instance)
+ repectively with a storage (in case of a
+ <type>StringResourceWithStorage</type> instance).
+ The modified state isn't affected either.
+
+ This method can be used to make a copy of the current string
+ table data to a storage. This method can throw all exceptions
+ thrown by the methods of <type scope="com::sun::star::embed">XStorage</type>
+
+ @param Storage
+ all string table data will be stored to this storage.
+
+ @param BaseName
+ Base string for the file names used to store the locale data.
+ The locale data is stored in Java properties files also following
+ the corresponding naming sceme. The files will be named like this:
+ "[BaseName]_[Language]_[Country].properties",
+ e.g. "MyBaseName_en_US.properties"
+ If an empty string is passed for BaseName, "strings" will be used
+ as BaseName.
+
+ @param Comment
+ Comment stored first in each properties file,
+ for a detailed description see <member>setComment</member>.
+
+ This method can throw all exceptions thrown by the methods of
+ <type scope="com::sun::star::embed">XStorage</type>
+ */
+ void storeToStorage( [in] ::com::sun::star::embed::XStorage Storage,
+ [in] string BaseName, [in] string Comment )
+ raises ( com::sun::star::uno::Exception );
+
+
+ /**
+ Stores all string table data to the location specified by the
+ passed URL string.
+
+ Calling this method does not affect the association with a location
+ (in case of a <type>StringResourceWithLocation</type> instance)
+ repectively with a storage (in case of a
+ <type>StringResourceWithStorage</type> instance).
+ The modified state isn't affected either.
+
+ This method can be used to make a copy of the current string
+ table data to a location.
+
+ @param URL
+ the location the string table data should be stored to.
+
+ @param BaseName
+ Base string for the file names used to store the locale data.
+ The locale data is stored in Java properties files also following
+ the corresponding naming sceme. The files will be named like this:
+ "[BaseName]_[Language]_[Country].properties",
+ e.g. "MyBaseName_en_US.properties"
+ If an empty string is passed for BaseName, "strings" will be used
+ as BaseName.
+
+ @param Comment
+ Comment stored first in each properties file,
+ for a detailed description see <member>setComment</member>.
+
+ @param Handler
+ a <type scope="com::sun::star::task">XInteractionHandler</type>.
+ It will be passed to ucb handle exceptions. Exceptions not processed
+ by this handler will be passed as com::sun::star::uno::Exception. If
+ this parameter is null this applies to all exceptions thrown by ucb.
+
+ @see com::sun::star::task::InteractionHandler
+ */
+ void storeToURL( [in] string URL, [in] string BaseName, [in] string Comment,
+ [in] com::sun::star::task::XInteractionHandler Handler )
+ raises( com::sun::star::uno::Exception );
+
+
+ /**
+ Returns a sequence of byte representing the complete string resource
+ in a binary format.
+
+ This method is intended to support datatransfer functionality, e.g. provided
+ by <type scope="com::sun::star::datatransfer">XTransferable</type> and
+ related interfaces.
+
+ See <member>importBinary</member>).
+
+ @return a sequence of byte representing the string resource.
+ */
+ sequence<byte> exportBinary();
+
+
+ /**
+ Initializes the string resource with binary data. This method
+ expects the data format returned by <member>exportBinary</member>.
+
+ All locales and strings previously added to the string resource
+ will be deleted. So after calling this method the string resource
+ only contains the locales and strings specified in the binary data.
+
+ This method is intended to support datatransfer functionality, e.g. provided
+ by <type scope="com::sun::star::datatransfer">XTransferable</type> and
+ related interfaces.
+
+ See <member>importBinary</member>).
+
+ @throws com::sun::star::lang::IllegalArgumentException
+ if Data is empty or does not meet the binary format returned by
+ the current or earlier version of <member>exportBinary</member>).
+ */
+ void importBinary( [in] sequence<byte> Data )
+ raises ( com::sun::star::lang::IllegalArgumentException );
+
+};
+
+//=============================================================================
+
+}; }; }; };
+
+#endif