Sophie

Sophie

distrib > Mandriva > 2008.1 > x86_64 > media > main-testing > by-pkgid > 2c50825dd66d0497b96a67f7fab2ee84 > files > 2364

openoffice.org64-devel-doc-2.4.1.10-1mdv2008.1.x86_64.rpm

<html>
<head>
<title>Service FilterFactory</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="FilterFactory-xref.html" class="navimain">Use</a></td>
<td class="navimain"><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Integrating_Import_and_Export_Filters" class="navimain">Devguide</a></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">Included Services</td>
<td class="navisub"><a href="#ExportedInterfaces" class="navisub">Exported Interfaces</a></td>
<td class="navisub">Properties' Summary</td>
<td class="navisub">Properties' 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">document</a> :: </p>
</td>
</tr>
<tr>
<td class="title">service FilterFactory</td>
</tr>
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>factory to create filter components.

 </dd>
<dd><p>
 After a generic <a href="TypeDetection.html">TypeDetection</a> an internal type name
 will be known. Further a generic ::com::sun::star::<a href="../frame/module-ix.html">frame</a>::<a href="../frame/FrameLoader.html">FrameLoader</a>
 can use this information, to search a suitable filter (may the default filter) at
 this factory and use it for loading the document into a specified frame.
 </p>

 <p>
 This factory implements read/write access on the underlying configuration set.
 and further a validate and flush mechanism for more performance and a special query mode
 can be used here too.
 </p>
 </dd>
</dl>
<a name="devmanual"> </a><dl>
<dt><b>Developers Guide</b></dt>
<dd><a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OfficeDev/Integrating_Import_and_Export_Filters">OfficeDev - Integrating Import and Export Filters</a></dd>
</dl>
</td>
</tr>
</table>
<hr>
<a name="ExportedInterfaces"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Exported Interfaces</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XMultiServiceFactory.html">XMultiServiceFactory</a></td>
<td class="imsum_right"><dl>
<dt><b>Description</b></dt>
<dd>factory interface to create and initialize filter components.

 </dd>
<dd><p>
 <strong>Current behaviour</strong><p>
 The methods createInstance() or createInstanceWithArguments() of this interface must be
 called with an internal type name!. This name is used internaly to search a suitable
 (mostly the default) filter for this type then. The found filter will be created, initialized
 and returned then. Creation of a filter by using it's internal filter name directly can be
 reached by using createInstanceWithArguments() with an optional property "FilterName" only.
 See the following example:

 <pre>
 private com.sun.star.uno.XInterface createFilterDirect( com.sun.star.lang.XMultiServiceFactory xFilterFactory ,
 java.lang.String sInternalFilterName )
 {
 com.sun.star.beans.PropertyValue aFilterProp = new com.sun.star.beans.PropertyValue();
 aFilterProp.Name = "FilterName";
 aFilterProp.Value = sInternalFilterName;

 com.sun.star.uno.Any[] lProps = new com.sun.star.uno.Any[1];
 lProps[0] = aFilterProp;

 java.lang.Object aFilter = xFilterFactory.createInstanceWithArguments("", lProps);
 return (com.sun.star.uno.XInterface)UnoRuntime.queryInterface(com.sun.star.uno.XInterface.class, aFilter);
 }
 </pre>
 </p>

 <p>
 <strong>Proposed behaviour</strong><p>
 Searching of a suitable filter for a given internal type name, must be done by the new interface
 ::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/XContainerQuery.html">XContainerQuery</a>, available on this factory too.
 The factory interface can be used to create filter components by it's internal filter name only.
 </p>

 <p>
 <strong>How it can be distinguished?</strong><p>
 The new prosposed implementation will throw an ::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/NoSuchElementException.html">NoSuchElementException</a>
 if the first parameter of createInstance() or createInstanceWithArguments() does not match to a valid container (means
 filter) item. Further it will throw an ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/IllegalArgumentException.html">IllegalArgumentException</a> if the optional
 parameter "FilterName" could not be detected inside the argument list of call createInstanceWithArguments().
 </p>

 <p>
 <strong>Initialization of a filter component</strong><p>
 Every filter, which was created by this factory can(!) be intialized with it's own configuration data
 and may given optional arguments of the corresponding createInstanceWithArguments() request. To do so the filter
 instance must support the optional interface ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XInitialization.html">XInitialization</a>.
 The arguments parameter will have the following structure:
 <ul>
 <li>sequence< Any >[0] contains a sequence< <type scope="com::sun::star::beans">PropertyValue >,
 which represent the configuration data set of this filter. The used properties are the same, as
 they are available at the container interface of this factoyr service. (see below)</li>
 <li>Every following item of the argument list sequence< Any >[1..n] contains the copied argument of the
 corresponding createInstanceWithArguments() call. That means: Item 0 or the original list was copied as
 item 1 of the destination list ... etc.
 </ul>
 </p>
 </dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/XNameAccess.html">XNameAccess</a></td>
<td class="imsum_right"><dl>
<dt><b>Description</b></dt>
<dd>provides read access to the complete set of configuration data.

 </dd>
<dd><p>
 Every container item is specified as a set of properties and will be
 represented by a sequence< <type scope="com::sun::star::beans">PropertyValue > structure.
 Follow properties are supported:
 (But note: not all of them must be present everytimes!)
 </p>
 <table border=1>
 <tr>
 <td><strong>Property Name</strong></td>
 <td><strong>Value Type</strong></td>
 <td><strong>Description</strong></td>
 </tr>
 <tr>
 <td><em>Name</em></td>
 <td>[string]</td>
 <td>The internal name is the only value, which makes a container item unique.</td>
 </tr>
 <tr>
 <td><em>UIName</em></td>
 <td>[string]</td>
 <td>It contains the localized name for this filter for the current locale.</td>
 </tr>
 <tr>
 <td><em>UINames</em></td>
 <td>[sequence< string >]</td>
 <td>It contains all available localized names for this filter. The are organized
 in pairs and represented as a structure of sequence< <type scope="com::sun::star::beans">PropertyValue >.
 The name of such property must be interpreted as locale; it's value as the localized
 filter name corresponding to this locale.</td>
 </tr>
 <tr>
 <td><em>Type</em></td>
 <td>[string]</td>
 <td>Every filter is registered for a type. This value contains the internal name of it.
 (see service <a href="TypeDetection.html">TypeDetection</a> for further informations)</td>
 </tr>
 <tr>
 <td><em>DocumentService</em></td>
 <td>[string]</td>
 <td>It's the uno service name of the document type, which can be handled by this filter.
 (e.g. ::com::sun::star::<a href="../text/module-ix.html">text</a>::<a href="../text/TextDocument.html">TextDocument</a>)</td>
 </tr>
 <tr>
 <td><em>FilterService</em></td>
 <td>[string]</td>
 <td>It means the uno implementation name of the filter component.
 Note: It means the realy the implementation instead of the uno service name.
 Because it's not possible to distinguish between more then one filters; if all of them
 uses a generic identifier!</td>
 </tr>
 <tr>
 <td><em>Flags</em></td>
 <td>[integer]</td>
 <td>They describe the filter more specific.<br>
 (e.g. they mark it as IMPORT/EXPORT or DEFAULT filter.)</td>
 </tr>
 <tr>
 <td><em>UserData</em></td>
 <td>[string]</td>
 <td>This field contains filter specific configuration data.</td>
 </tr>
 <tr>
 <td><em>FileFormatVersion</em></td>
 <td>[integer]</td>
 <td>It specifies the supported file format version if there exist more then ones.</td>
 </tr>
 <tr>
 <td><em>TemplateName</em></td>
 <td>[string]</td>
 <td>It's the name of a suitable default template.</td>
 </tr>
 </table>
 </p>

 <p>
 Note:<br>
 All elements of this container will be adressed by his internal name,
 and it must be an unambigous value.
 </p>
 </dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/XNameContainer.html">XNameContainer</a></td>
<td class="imsum_right"><dl>
<dt><b>Usage Restrictions</b></dt>
<dd><i>optional</i></dd>
<dt><b>Description</b></dt>
<dd>provides a write access to the configuration data.
 </dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/XContainerQuery.html">XContainerQuery</a></td>
<td class="imsum_right"><dl>
<dt><b>Description</b></dt>
<dd>provides search on the configuration data set.

 </dd>
<dd><p>
 Against simple property search it provides some complex algorithms too.
 For further informations please read the SDK documentation.
 </p>
 </dd>
</dl>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XFlushable.html">XFlushable</a></td>
<td class="imsum_right"><dl>
<dt><b>Usage Restrictions</b></dt>
<dd><i>optional</i></dd>
<dt><b>Description</b></dt>
<dd>can be used to perform container changes.

 </dd>
<dd><p>
 Because the complexness of such configuration set can be very high,
 it seams not very usefull to update the undelying configuration layer
 on every container change request immediatly. Another strategy can be to
 make all changes (adding/changing/removing of items) and call flush at the end.
 That will validate the whole container and reject inconsistent data sets.
 Only in case all made changes was correct, they will be written back to the
 configuration. Further this interface provides the possibelity, that interested
 changes listener can be registered too.
 </p>
 </dd>
</dl>
</td>
</tr>
</table>
<br>&nbsp;<a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2008 Sun Microsystems, Inc.</p>

</div> <!-- id="adc-idlref" -->
</body>

</html>