<html> <head> <title>Interface XStringResourcePersistence</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link rel="stylesheet" type="text/css" href="../../../../idl.css"> </head> <body> <div id="adc-idlref"> <a name="_top_"> </a><table class="navimain" border="0" cellpadding="3"> <tr> <td class="navimain"><a href="../module-ix.html" class="navimain">Overview</a></td> <td class="navimain"><a href="module-ix.html" class="navimain">Module</a></td> <td class="navimain"><a href="XStringResourcePersistence-xref.html" class="navimain">Use</a></td> <td class="navimainnone">Devguide</td> <td class="navimain"><a href="../../../../index-files/index-1.html" class="navimain">Index</a></td> </tr> </table> <table class="navisub" border="0" cellpadding="0"> <tr> <td class="navisub"><a href="#MethodsSummary" class="navisub">Methods' Summary</a></td> <td class="navisub">Attributes' Summary</td> <td class="navisub"><a href="#MethodsDetails" class="navisub">Methods' Details</a></td> <td class="navisub">Attributes' Details</td> </tr> </table> <hr> <table border="0" width="100%" cellpadding="5" cellspacing="3" class="title-table" style="margin-bottom:6pt;"> <tr> <td><p class="namechain"><a href="../../../../module-ix.html" class="namechain">::</a> <a href="../../../module-ix.html" class="namechain">com</a> :: <a href="../../module-ix.html" class="namechain">sun</a> :: <a href="../module-ix.html" class="namechain">star</a> :: <a href="module-ix.html" class="namechain">resource</a> :: </p> </td> </tr> <tr> <td class="title"><table class="title-table" width="99%"> <tr> <td width="25%" class="title2">unpublished </td> <td width="50%" class="title">interface XStringResourcePersistence</td> <td width="*"/></tr> </table> </td> </tr> <tr> <td><dl> <dt><b>Base Interfaces</b></dt> <dd><pre style="font-family:monospace;"><strong>XStringResourcePersistence</strong> ┗ <a href="XStringResourceManager.html">XStringResourceManager</a> ┗ <a href="XStringResourceResolver.html">XStringResourceResolver</a> ┗ ::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XModifyBroadcaster.html">XModifyBroadcaster</a> </pre></dd> <dd><a name/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="crosstitle"> <tr> <td class="imsum_left"><a href="XStringResourceManager.html">XStringResourceManager</a></td> <td class="imsum_right"><dl> <dt>(referenced interface's summary:)</dt> <dd>Interface to manage a resource string table containing a set of strings for different locales. The interface is derived from <a href="XStringResourceResolver.html">XStringResourceResolver</a> 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. </dd> </dl> </td> </tr> </table> </dd> </dl> </td> </tr> <tr> <td><dl> <dt><b>Description</b></dt> <dd>Interface derived from XStringResourceManager containing basic persistence functionality limited to operations that are independend from a associated location or storage. </dd> <dt><b>See also</b></dt> <dd><a href="XStringResourceManager.html">XStringResourceManager</a><br> . </dd> </dl> </td> </tr> </table> <hr> <a name="MethodsSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle" colspan="2">Methods' Summary</td> </tr> <tr> <td class="imsum_left"><a href="#store">store</a></td> <td class="imsum_right">Stores all string table data respectively all data modified since the last call to <a href="#store">store</a> 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 <a href="StringResourceWithLocation.html">StringResourceWithLocation</a> and <a href="StringResourceWithStorage.html">StringResourceWithStorage</a> The StringResourceWithLocation is initialised with an URL specifying a location used to load data from and store data to, see <a href="StringResourceWithLocation.html">StringResourceWithLocation</a>. The StringResourceWithStorage is initialised with an in- stance of ::com::sun::star::<a href="../embed/module-ix.html">embed</a>::<a href="../embed/XStorage.html">XStorage</a> used to load data from and store data to, see <a href="StringResourceWithStorage.html">StringResourceWithStorage</a>. If the string table isn't modified (see <a href="#isModified">isModified</a>) this method does nothing. This method can throw all exceptions thrown by the methods of ::com::sun::star::<a href="../embed/module-ix.html">embed</a>::<a href="../embed/XStorage.html">XStorage</a> respectively a in case of a StringResourceWithLocation for all exceptions that are not handled by a previously specified ::com::sun::star::<a href="../task/module-ix.html">task</a>::<a href="../task/XInteractionHandler.html">XInteractionHandler</a>. The handler to be used for the store operation can be specified during initialisation of <a href="StringResourceWithLocation.html">StringResourceWithLocation</a>. </td> </tr> <tr> <td class="imsum_left"><a href="#isModified">isModified</a></td> <td class="imsum_right">provides the current modify state of the StringResourceManager instance. </td> </tr> <tr> <td class="imsum_left"><a href="#setComment">setComment</a></td> <td class="imsum_right">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 <a href="StringResourceWithLocation.html">StringResourceWithLocation</a> or <a href="StringResourceWithStorage.html">StringResourceWithStorage</a> </td> </tr> <tr> <td class="imsum_left"><a href="#storeToStorage">storeToStorage</a></td> <td class="imsum_right">Stores all string table data to the provided storage. Calling this method does not affect the association with a location (in case of a <a href="StringResourceWithLocation.html">StringResourceWithLocation</a> instance) repectively with a storage (in case of a <a href="StringResourceWithStorage.html">StringResourceWithStorage</a> 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::<a href="../embed/module-ix.html">embed</a>::<a href="../embed/XStorage.html">XStorage</a> </td> </tr> <tr> <td class="imsum_left"><a href="#storeToURL">storeToURL</a></td> <td class="imsum_right">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 <a href="StringResourceWithLocation.html">StringResourceWithLocation</a> instance) repectively with a storage (in case of a <a href="StringResourceWithStorage.html">StringResourceWithStorage</a> 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. </td> </tr> <tr> <td class="imsum_left"><a href="#exportBinary">exportBinary</a></td> <td class="imsum_right">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::<a href="../datatransfer/module-ix.html">datatransfer</a>::<a href="../datatransfer/XTransferable.html">XTransferable</a> and related interfaces. See <a href="#importBinary">importBinary</a>). </td> </tr> <tr> <td class="imsum_left"><a href="#importBinary">importBinary</a></td> <td class="imsum_right">Initializes the string resource with binary data. This method expects the data format returned by <a href="#exportBinary">exportBinary</a>. 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::<a href="../datatransfer/module-ix.html">datatransfer</a>::<a href="../datatransfer/XTransferable.html">XTransferable</a> and related interfaces. See <a href="#importBinary">importBinary</a>). </td> </tr> </table> <a name="MethodsDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle"> <tr> <td class="subtitle">Methods' Details</td> </tr> <tr> <td class="imdetail"><a name="store" class="membertitle">store</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>store</b>()</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/NoSupportException.html">NoSupportException</a>,<br> ::com::sun::star::<a href="../uno/module-ix.html">uno</a>::<a href="../uno/Exception.html">Exception</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Stores all string table data respectively all data modified since the last call to <a href="#store">store</a> 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 <a href="StringResourceWithLocation.html">StringResourceWithLocation</a> and <a href="StringResourceWithStorage.html">StringResourceWithStorage</a> The StringResourceWithLocation is initialised with an URL specifying a location used to load data from and store data to, see <a href="StringResourceWithLocation.html">StringResourceWithLocation</a>. The StringResourceWithStorage is initialised with an in- stance of ::com::sun::star::<a href="../embed/module-ix.html">embed</a>::<a href="../embed/XStorage.html">XStorage</a> used to load data from and store data to, see <a href="StringResourceWithStorage.html">StringResourceWithStorage</a>. If the string table isn't modified (see <a href="#isModified">isModified</a>) this method does nothing. This method can throw all exceptions thrown by the methods of ::com::sun::star::<a href="../embed/module-ix.html">embed</a>::<a href="../embed/XStorage.html">XStorage</a> respectively a in case of a StringResourceWithLocation for all exceptions that are not handled by a previously specified ::com::sun::star::<a href="../task/module-ix.html">task</a>::<a href="../task/XInteractionHandler.html">XInteractionHandler</a>. The handler to be used for the store operation can be specified during initialisation of <a href="StringResourceWithLocation.html">StringResourceWithLocation</a>. </dd> <dt><b>Throws</b></dt> <dd>::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/NoSupportException.html">NoSupportException</a> if no URL or no valid storage are provided. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="isModified" class="membertitle">isModified</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">boolean</td> </tr> <tr> <td valign="top"><b>isModified</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>provides the current modify state of the StringResourceManager instance. </dd> <dt><b>Returns</b></dt> <dd><b>true</b> if the string table has changed since the last call to <a href="#store">store</a> or, if supported <code>XStringResourceWithStorage::storeAsStorage</code>. <b>false</b> if the table hasn't changed. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="setComment" class="membertitle">setComment</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>setComment</b>(</td> <td valign="top">[in] string</td> <td valign="bottom"> Comment );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>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 <a href="StringResourceWithLocation.html">StringResourceWithLocation</a> or <a href="StringResourceWithStorage.html">StringResourceWithStorage</a> </dd> <dt><b>Parameter Comment</b></dt> <dd>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. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="storeToStorage" class="membertitle">storeToStorage</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>storeToStorage</b>(</td> <td valign="top">[in] ::com::sun::star::<a href="../embed/module-ix.html">embed</a>::<a href="../embed/XStorage.html">XStorage</a></td> <td valign="bottom"> Storage,</td> </tr> <tr> <td/><td valign="top">[in] string</td> <td valign="bottom"> BaseName,</td> </tr> <tr> <td/><td valign="top">[in] string</td> <td valign="bottom"> Comment )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../uno/module-ix.html">uno</a>::<a href="../uno/Exception.html">Exception</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Stores all string table data to the provided storage. Calling this method does not affect the association with a location (in case of a <a href="StringResourceWithLocation.html">StringResourceWithLocation</a> instance) repectively with a storage (in case of a <a href="StringResourceWithStorage.html">StringResourceWithStorage</a> 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::<a href="../embed/module-ix.html">embed</a>::<a href="../embed/XStorage.html">XStorage</a> </dd> <dt><b>Parameter Storage</b></dt> <dd>all string table data will be stored to this storage. </dd> <dt><b>Parameter BaseName</b></dt> <dd>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. </dd> <dt><b>Parameter Comment</b></dt> <dd>Comment stored first in each properties file, for a detailed description see <a href="#setComment">setComment</a>. This method can throw all exceptions thrown by the methods of ::com::sun::star::<a href="../embed/module-ix.html">embed</a>::<a href="../embed/XStorage.html">XStorage</a> </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="storeToURL" class="membertitle">storeToURL</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>storeToURL</b>(</td> <td valign="top">[in] string</td> <td valign="bottom"> URL,</td> </tr> <tr> <td/><td valign="top">[in] string</td> <td valign="bottom"> BaseName,</td> </tr> <tr> <td/><td valign="top">[in] string</td> <td valign="bottom"> Comment,</td> </tr> <tr> <td/><td valign="top">[in] ::com::sun::star::<a href="../task/module-ix.html">task</a>::<a href="../task/XInteractionHandler.html">XInteractionHandler</a></td> <td valign="bottom"> Handler )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../uno/module-ix.html">uno</a>::<a href="../uno/Exception.html">Exception</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>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 <a href="StringResourceWithLocation.html">StringResourceWithLocation</a> instance) repectively with a storage (in case of a <a href="StringResourceWithStorage.html">StringResourceWithStorage</a> 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. </dd> <dt><b>Parameter URL</b></dt> <dd>the location the string table data should be stored to. </dd> <dt><b>Parameter BaseName</b></dt> <dd>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. </dd> <dt><b>Parameter Comment</b></dt> <dd>Comment stored first in each properties file, for a detailed description see <a href="#setComment">setComment</a>. </dd> <dt><b>Parameter Handler</b></dt> <dd>a ::com::sun::star::<a href="../task/module-ix.html">task</a>::<a href="../task/XInteractionHandler.html">XInteractionHandler</a>. 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. </dd> <dt><b/></dt> <dd/></dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="exportBinary" class="membertitle">exportBinary</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">sequence< byte ></td> </tr> <tr> <td valign="top"><b>exportBinary</b>();</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>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::<a href="../datatransfer/module-ix.html">datatransfer</a>::<a href="../datatransfer/XTransferable.html">XTransferable</a> and related interfaces. See <a href="#importBinary">importBinary</a>). </dd> <dt><b>Returns</b></dt> <dd>a sequence of byte representing the string resource. </dd> </dl> </td> </tr> </table> </td> </tr> <tr> <td class="imdetail"><a name="importBinary" class="membertitle">importBinary</a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-method" bgcolor="#ffffff" align="center"> <tr> <td><table class="table-in-method" border="0"> <tr> <td valign="top" colspan="3">void</td> </tr> <tr> <td valign="top"><b>importBinary</b>(</td> <td valign="top">[in] sequence< byte ></td> <td valign="bottom"> Data )</td> </tr> <tr> <td valign="top" align="right">raises( </td> <td valign="top" colspan="2">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> );</td> </tr> </table> <hr> <dl> <dt><b>Description</b></dt> <dd>Initializes the string resource with binary data. This method expects the data format returned by <a href="#exportBinary">exportBinary</a>. 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::<a href="../datatransfer/module-ix.html">datatransfer</a>::<a href="../datatransfer/XTransferable.html">XTransferable</a> and related interfaces. See <a href="#importBinary">importBinary</a>). </dd> <dt><b>Throws</b></dt> <dd>com::sun::star::lang::IllegalArgumentException if Data is empty or does not meet the binary format returned by the current or earlier version of <a href="#exportBinary">exportBinary</a>). </dd> </dl> </td> </tr> </table> </td> </tr> </table> <a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright © 2009 Sun Microsystems, Inc.</p> </div> <!-- id="adc-idlref" --> </body> </html>