Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > fc480f9d5aabed8eeaffe8ad3401a94c > files > 4410

openoffice.org-devel-doc-3.2.1-0.3mdv2010.2.i586.rpm

<html>
<head>
<title>Service Package</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="Package-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">Services' Summary</td>
<td class="navisub"><a href="#InterfacesSummary" class="navisub">Interfaces' Summary</a></td>
<td class="navisub">Properties' Summary</td>
<td class="navisub">Services' Details</td>
<td class="navisub"><a href="#InterfacesDetails" class="navisub">Interfaces' Details</a></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">packages</a> :: </p>
</td>
</tr>
<tr>
<td class="title">service Package</td>
</tr>
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>The <a href="Package.html">Package</a> is a service that provides access to a set of
 files and folders contained within a Package. One instance of the 
 Package service exists for each Package file to be manipulated.

 Each instance is created with an argument which specifies the URL of 
 the Package file to which the user requires access. If the instance is
 created without arguments, it must be initialised with the 
 ::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XInitialization.html">XInitialization</a> service methods 
 before it is a valid instance of the service.
</dd>
</dl>
</td>
</tr>
</table>
<hr>
<a name="InterfacesSummary"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Exported Interfaces - Summary</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XInitialization.html">XInitialization</a></td>
<td class="imsum_right"><p>A Package can be initialised with one of the following:
 
 1. A file URL referring to a package.
 2. An XInputStream referring to a package (it must also
 support an XSeekable interface).
 3. An XStream referring to a package. The XInputStream must support
 an XSeekable interface, and the XOutputStream must support an
 XTruncate interface.

 It will throw a css::uno::Exception if initialised with bad data or 
 if the package has an invalid format (for example, a corrupt central d
 irectory record if the file is a ZIP file).
 </p>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/XHierarchicalNameAccess.html">XHierarchicalNameAccess</a></td>
<td class="imsum_right"><p>This interface is used to get access to any entry within the package
 For example:
 getByHierarchicalName ("folder/subfolder/file1.txt");
 This will return a PackageStream which refers to the specified stream.
 This is also used to get access to a particular folder within the
 Package. For example:
 getByHierarchicalName ("folder/subfolder/");
 This will return a PackageFolder which describes the contents of the specified
 folder.

 Calls to methods of XHierarchicalNameAccess must NOT have a leading slash.
 </p>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XSingleServiceFactory.html">XSingleServiceFactory</a></td>
<td class="imsum_right"><p>This interface is used to create new PackageStream or PackageFolder
 implementation objects for addition to the Package.

 createInstance - creates a new stream implementation object (when first
 created, the new object is not part of the Package). It must be added
 to the PackageFolder in which it will reside using the methods in the
 PackageFolder service.

 createInstanceWithArguments - This accepts one boolean value as an
 argument. If it set to true, a PackageFolder implementation is created,
 if it is set to false, a PackageStream implementation is created.

 Creating and inserting a new stream would be done as follows:

 1. xNewStream = package->createInstanceWithArguments( false );
 2. xDataStream = new MyStreamImpl(). (wherever the data comes from)
 3. xNewStream->setInputStream( xDataStream );
 4. parentFolder->insertByName( "image.png", xNewStream );
 
 Replacing an existing stream would be very similar, except that the
 call ->insertByName would be replaced by ->replaceByName.
 </p>
</td>
</tr>
<tr>
<td class="imsum_left">::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XChangesBatch.html">XChangesBatch</a></td>
<td class="imsum_right"><p>This interface is used to commit any changes to the Package. A new
 Package file will be written with any new or changed streams/folders and
 omitting any PackageStream or PackageFolder that has been removed.
 </p>
</td>
</tr>
</table>
<a name="InterfacesDetails"/><table border="1" width="100%" cellpadding="5" cellspacing="0" class="subtitle">
<tr>
<td class="subtitle" colspan="2">Exported Interfaces - Details</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XInitialization" class="membertitle">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XInitialization.html">XInitialization</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>A Package can be initialised with one of the following:
 
 1. A file URL referring to a package.
 2. An XInputStream referring to a package (it must also
 support an XSeekable interface).
 3. An XStream referring to a package. The XInputStream must support
 an XSeekable interface, and the XOutputStream must support an
 XTruncate interface.

 It will throw a css::uno::Exception if initialised with bad data or 
 if the package has an invalid format (for example, a corrupt central d
 irectory record if the file is a ZIP file).
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XHierarchicalNameAccess" class="membertitle">::com::sun::star::<a href="../container/module-ix.html">container</a>::<a href="../container/XHierarchicalNameAccess.html">XHierarchicalNameAccess</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>This interface is used to get access to any entry within the package
 For example:
 getByHierarchicalName ("folder/subfolder/file1.txt");
 This will return a PackageStream which refers to the specified stream.
 This is also used to get access to a particular folder within the
 Package. For example:
 getByHierarchicalName ("folder/subfolder/");
 This will return a PackageFolder which describes the contents of the specified
 folder.

 Calls to methods of XHierarchicalNameAccess must NOT have a leading slash.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XSingleServiceFactory" class="membertitle">::com::sun::star::<a href="../lang/module-ix.html">lang</a>::<a href="../lang/XSingleServiceFactory.html">XSingleServiceFactory</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>This interface is used to create new PackageStream or PackageFolder
 implementation objects for addition to the Package.

 createInstance - creates a new stream implementation object (when first
 created, the new object is not part of the Package). It must be added
 to the PackageFolder in which it will reside using the methods in the
 PackageFolder service.

 createInstanceWithArguments - This accepts one boolean value as an
 argument. If it set to true, a PackageFolder implementation is created,
 if it is set to false, a PackageStream implementation is created.

 Creating and inserting a new stream would be done as follows:

 1. xNewStream = package->createInstanceWithArguments( false );
 2. xDataStream = new MyStreamImpl(). (wherever the data comes from)
 3. xNewStream->setInputStream( xDataStream );
 4. parentFolder->insertByName( "image.png", xNewStream );
 
 Replacing an existing stream would be very similar, except that the
 call ->insertByName would be replaced by ->replaceByName.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
<tr/>
<tr>
<td class="imdetail"><a name="XChangesBatch" class="membertitle">::com::sun::star::<a href="../util/module-ix.html">util</a>::<a href="../util/XChangesBatch.html">XChangesBatch</a></a><table border="0" width="96%" cellpadding="5" cellspacing="0" class="table-in-data" bgcolor="#ffffff" align="center">
<tr>
<td><dl>
<dt><b>Description</b></dt>
<dd>This interface is used to commit any changes to the Package. A new
 Package file will be written with any new or changed streams/folders and
 omitting any PackageStream or PackageFolder that has been removed.
 </dd>
</dl>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br>&nbsp;<a href="#_top_">Top of Page</a><hr size="3"><p class="copyright" align="center">Copyright &copy; 2011, Oracle and/or its affiliates. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.</p>

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

</html>