Overview | Module | Use | Devguide | Index

Methods' Summary | Attributes' Summary | Methods' Details | Attributes' Details

:: com :: sun :: star :: resource ::
unpublished | interface XStringResourcePersistence |
  Base Interfaces
      XStringResourcePersistence
      ┗ XStringResourceManager
         ┗ XStringResourceResolver
            ┗ ::com::sun::star::util::XModifyBroadcaster
  XStringResourceManager | (referenced interface's summary:) Interface to manage a resource string table containing a set of strings for different locales. The interface is derived from XStringResourceResolver that allows to access the string table but not to modify it. This interface also allows to modify the string table. It's designed to be used in the context of creating a string table, e.g. from a string table editor or from a Dialog Editor designing localized dialogs.
Usage Restrictions not published Description Interface derived from XStringResourceManager containing basic persistence functionality limited to operations that are independent from a associated location or storage. See also XStringResourceManager .

Methods' Summary
store | Stores all string table data respectively all data modified since the last call to store 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 StringResourceWithLocation and StringResourceWithStorage The StringResourceWithLocation is initialized with an URL specifying a location used to load data from and store data to, see StringResourceWithLocation. The StringResourceWithStorage is initialized with an instance of ::com::sun::star::embed::XStorage used to load data from and store data to, see StringResourceWithStorage. If the string table isn't modified (see isModified) this method does nothing. This method can throw all exceptions thrown by the methods of ::com::sun::star::embed::XStorage respectively a in case of a StringResourceWithLocation for all exceptions that are not handled by a previously specified ::com::sun::star::task::XInteractionHandler. The handler to be used for the store operation can be specified during initialization of StringResourceWithLocation.
isModified | provides the current modify state of the StringResourceManager instance.
setComment | Sets the comment stored first in each locale data file. This interface method can be used to overwrite the comment used during initialization of the services StringResourceWithLocation or StringResourceWithStorage
storeToStorage | Stores all string table data to the provided storage. Calling this method does not affect the association with a location (in case of a StringResourceWithLocation instance) respectively with a storage (in case of a StringResourceWithStorage 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 ::com::sun::star::embed::XStorage
storeToURL | 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 StringResourceWithLocation instance) respectively with a storage (in case of a StringResourceWithStorage 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.
exportBinary | 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 ::com::sun::star::datatransfer::XTransferable and related interfaces. See importBinary).
importBinary | Initializes the string resource with binary data. This method expects the data format returned by exportBinary. 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 ::com::sun::star::datatransfer::XTransferable and related interfaces. See importBinary).

Methods' Details
store
void
store()
raises( | ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::Exception );
Description Stores all string table data respectively all data modified since the last call to store 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 StringResourceWithLocation and StringResourceWithStorage The StringResourceWithLocation is initialized with an URL specifying a location used to load data from and store data to, see StringResourceWithLocation. The StringResourceWithStorage is initialized with an instance of ::com::sun::star::embed::XStorage used to load data from and store data to, see StringResourceWithStorage. If the string table isn't modified (see isModified) this method does nothing. This method can throw all exceptions thrown by the methods of ::com::sun::star::embed::XStorage respectively a in case of a StringResourceWithLocation for all exceptions that are not handled by a previously specified ::com::sun::star::task::XInteractionHandler. The handler to be used for the store operation can be specified during initialization of StringResourceWithLocation. Throws ::com::sun::star::lang::NoSupportException if no URL or no valid storage are provided.
isModified
boolean
isModified();
Description provides the current modify state of the StringResourceManager instance. Returns true if the string table has changed since the last call to store or, if supported `XStringResourceWithStorage::storeAsStorage`. false if the table hasn't changed.
setComment
void
setComment( | [in] string | Comment );
Description Sets the comment stored first in each locale data file. This interface method can be used to overwrite the comment used during initialization of the services StringResourceWithLocation or StringResourceWithStorage Parameter 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 responsible that the passed string is a valid comment in a Java properties file, e.g. "# My strings". The string may be empty.
storeToStorage
void
storeToStorage( | [in] ::com::sun::star::embed::XStorage | Storage,
| [in] string | BaseName,
| [in] string | Comment )
raises( | ::com::sun::star::uno::Exception );
Description Stores all string table data to the provided storage. Calling this method does not affect the association with a location (in case of a StringResourceWithLocation instance) respectively with a storage (in case of a StringResourceWithStorage 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 ::com::sun::star::embed::XStorage Parameter Storage all string table data will be stored to this storage. Parameter 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 scheme. 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. Parameter Comment Comment stored first in each properties file, for a detailed description see setComment. This method can throw all exceptions thrown by the methods of ::com::sun::star::embed::XStorage
storeToURL
void
storeToURL( | [in] string | URL,
| [in] string | BaseName,
| [in] string | Comment,
| [in] ::com::sun::star::task::XInteractionHandler | Handler )
raises( | ::com::sun::star::uno::Exception );
Description 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 StringResourceWithLocation instance) respectively with a storage (in case of a StringResourceWithStorage 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. Parameter URL the location the string table data should be stored to. Parameter 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 scheme. 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. Parameter Comment Comment stored first in each properties file, for a detailed description see setComment. Parameter Handler a ::com::sun::star::task::XInteractionHandler. 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 also ::com::sun::star::task::InteractionHandler
exportBinary
sequence< byte >
exportBinary();
Description 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 ::com::sun::star::datatransfer::XTransferable and related interfaces. See importBinary). Returns a sequence of byte representing the string resource.
importBinary
void
importBinary( | [in] sequence< byte > | Data )
raises( | ::com::sun::star::lang::IllegalArgumentException );
Description Initializes the string resource with binary data. This method expects the data format returned by exportBinary. 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 ::com::sun::star::datatransfer::XTransferable and related interfaces. See importBinary). 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 exportBinary).

Top of Page

Copyright © 2000, 2014 LibreOffice contributors and/or their affiliates. All rights reserved.

LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.

The Document Foundation acknowledges all community members, please find more info at our website.

Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.